/* ============================================================
   /v2/css/utilities.css
   Mini Bootstrap-compat utility layer.  Provides the handful of
   Bootstrap classes we still depend on in markup, so we can drop
   bootstrap.min.css entirely without rewriting every class= attr.

   Covers (audited from search-v2.html):
     - Text:    text-center, text-danger
     - Grid:    container, row, col-*-N
     - Buttons: .btn (generic styling — page-specific .btn-buy,
                .btn-search override in search.css)
     - Form:    form-control, form-group
     - List:    list-group
     - Spacing: mb-0
     - A11y:    sr-only

   Total: ~80 lines.  Saves ~155 KB by dropping bootstrap.min.css.

   Loaded by: every page that previously included bootstrap.min.css
   ============================================================ */

/* ---------- Text utilities ---------- */
.text-center { text-align: center !important; }
.text-left   { text-align: left !important; }
.text-right  { text-align: right !important; }
.text-danger { color: #fb7185 !important; }
.text-success { color: #4ade80 !important; }
.text-warning { color: #fbbf24 !important; }
.text-muted  { color: rgba(255, 255, 255, 0.55) !important; }

/* ---------- Display utilities ---------- */
.d-none         { display: none !important; }
.d-block        { display: block !important; }
.d-inline       { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex         { display: flex !important; }
.d-inline-flex  { display: inline-flex !important; }

/* ---------- Spacing utilities (just the ones we use) ---------- */
.mb-0 { margin-bottom: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.m-0  { margin: 0 !important; }

/* ---------- Screen-reader only ---------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Grid: container ---------- */
.container,
.container-fluid {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 15px;
    padding-left: 15px;
    box-sizing: border-box;
}

.container {
    max-width: 1140px;
}

@media (max-width: 1199.98px) { .container { max-width: 960px; } }
@media (max-width: 991.98px)  { .container { max-width: 720px; } }
@media (max-width: 767.98px)  { .container { max-width: 540px; } }
@media (max-width: 575.98px)  { .container { max-width: 100%; } }

/* ---------- Grid: row + columns ---------- */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
    box-sizing: border-box;
}

.row > [class*="col-"] {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    box-sizing: border-box;
}

/* Span columns out of 12 — covers col-12, col-5, col-md-12, col-md-5,
   col-lg-12, col-lg-5, col-sm-12, col-xs-12.                          */
.col,
.col-12, .col-sm-12, .col-md-12, .col-lg-12, .col-xl-12, .col-xs-12 { flex: 0 0 100%; max-width: 100%; }
.col-5,  .col-sm-5,  .col-md-5,  .col-lg-5,  .col-xl-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }

/* Generic n/12 helper for other column sizes that may exist legacy-wise.
   Keep ALL standard column widths so future markup doesn't break.       */
.col-1  { flex: 0 0 8.3333%;  max-width: 8.3333%; }
.col-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
.col-3  { flex: 0 0 25%;       max-width: 25%; }
.col-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-6  { flex: 0 0 50%;       max-width: 50%; }
.col-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
.col-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
.col-9  { flex: 0 0 75%;       max-width: 75%; }
.col-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
.col-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }

/* Stack at small breakpoints (col-sm-* full-width below 768px) */
@media (max-width: 767.98px) {
    [class*="col-sm-"],
    [class*="col-md-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* ---------- Button base (page-specific variants stay in search.css) - */
.btn {
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    transition: color 0.15s ease, background-color 0.15s ease,
                border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { text-decoration: none; }
.btn:focus,
.btn.focus { outline: 0; box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); }
.btn:disabled,
.btn.disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ---------- Form base ---------- */
.form-group {
    margin-bottom: 1rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--v3-ink, #e8eef6);
    background-color: rgba(255, 255, 255, 0.04);
    background-clip: padding-box;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 0.25rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.form-control:focus {
    color: var(--v3-ink, #e8eef6);
    background-color: rgba(255, 255, 255, 0.06);
    border-color: var(--v3-accent, #5dc8f0);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(93, 200, 240, 0.20);
}

/* ---------- List group ---------- */
.list-group {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    border-radius: 0.25rem;
    list-style: none;
}

.list-group-item {
    position: relative;
    display: block;
    padding: 0.75rem 1.25rem;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.list-group-item:first-child {
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.list-group-item:last-child {
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}

.list-group-item + .list-group-item {
    border-top-width: 0;
}
