/* ============================================================
   GTA Apparel — Custom Order Page
   Design concept: a "character-creator terminal" — the loadout
   screen aesthetic from GTA Online's clothing shops. Dark slate
   background, magenta/cyan signal accents (like an in-game HUD
   readout), condensed industrial-stencil headings for category
   labels, monospace for hashes/prices (data, not decoration).
   ============================================================ */

:root {
    --ink:        #0b0d12;
    --panel:      #12151d;
    --panel-2:    #191d28;
    --line:       #262b3a;
    --text:       #e7e9f0;
    --text-dim:   #8890a4;
    --magenta:    #ff2d92;
    --cyan:       #35e0d0;
    --amber:      #ffb444;
    --ok:         #38d97a;
    --danger:     #ff5c5c;
    --radius:     10px;
    --font-display: 'Oswald', 'Arial Narrow', sans-serif;
    --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono:    'JetBrains Mono', 'Consolas', monospace;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
    margin: 0;
    background: var(--ink);
    background-image:
        radial-gradient(circle at 15% 0%, rgba(255,45,146,0.10), transparent 45%),
        radial-gradient(circle at 85% 15%, rgba(53,224,208,0.08), transparent 40%);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5;
}

a { color: var(--cyan); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px 80px; }

/* ---- Top bar ---- */
.topbar {
    border-bottom: 1px solid var(--line);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: rgba(11,13,18,0.92);
    backdrop-filter: blur(6px);
    z-index: 40;
}
.topbar .brand {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 20px;
    font-weight: 600;
}
.topbar .brand span { color: var(--magenta); }
.topbar .price-note {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-dim);
    border: 1px solid var(--line);
    padding: 6px 12px;
    border-radius: 999px;
}
.topbar .price-note b { color: var(--amber); }

/* ---- Hero / step header ---- */
.hero {
    padding: 48px 0 28px;
}
.eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cyan);
    margin: 0 0 10px;
}
.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    margin: 0 0 12px;
}
.hero p { color: var(--text-dim); max-width: 640px; margin: 0; }

/* ---- Step scaffolding ---- */
.step {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 22px;
}
.step-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 18px;
}
.step-num {
    font-family: var(--font-mono);
    color: var(--ink);
    background: var(--magenta);
    width: 28px; height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.step-title {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 19px;
}
.step-sub { color: var(--text-dim); font-size: 13px; margin-left: auto; }

/* ---- Ped search/select ---- */
.ped-search-box { position: relative; max-width: 480px; }
.ped-search-box input[type=text] {
    width: 100%;
    padding: 13px 14px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font-size: 15px;
    font-family: var(--font-body);
}
.ped-search-box input[type=text]:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(53,224,208,0.15);
}
.ped-results {
    position: absolute;
    left: 0; right: 0; top: calc(100% + 6px);
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 30;
    display: none;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}
.ped-results.open { display: block; }
.ped-result {
    padding: 11px 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}
.ped-result:last-child { border-bottom: none; }
.ped-result:hover, .ped-result.active { background: rgba(255,45,146,0.10); }
.ped-result .g {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-dim);
}
.ped-selected {
    margin-top: 14px;
    display: none;
    align-items: center;
    gap: 12px;
    background: rgba(53,224,208,0.08);
    border: 1px solid rgba(53,224,208,0.35);
    border-radius: 8px;
    padding: 12px 14px;
}
.ped-selected.show { display: flex; }
.ped-selected .badge {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    color: var(--cyan);
    border: 1px solid var(--cyan);
    padding: 2px 8px;
    border-radius: 999px;
}
.ped-selected .name { font-weight: 600; }
.ped-selected .change-btn {
    margin-left: auto;
    background: none; border: none; color: var(--text-dim);
    cursor: pointer; font-size: 13px; text-decoration: underline;
}

/* ---- Category tabs ---- */
.cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.cat-tab {
    font-family: var(--font-mono);
    font-size: 12.5px;
    letter-spacing: 0.05em;
    padding: 9px 14px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--text-dim);
    cursor: pointer;
    text-transform: uppercase;
    transition: border-color .15s, color .15s, background .15s;
}
.cat-tab:hover { color: var(--text); border-color: var(--text-dim); }
.cat-tab.active {
    color: var(--ink);
    background: var(--cyan);
    border-color: var(--cyan);
    font-weight: 700;
}
.gender-toggle {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 20px;
}
.gender-toggle button {
    font-family: var(--font-mono);
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 18px;
    background: var(--panel-2);
    color: var(--text-dim);
    border: none;
    cursor: pointer;
}
.gender-toggle button.active { background: var(--magenta); color: #fff; font-weight: 700; }

/* ---- Clothing grid ---- */
.clothes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    min-height: 120px;
}
.clothes-empty {
    grid-column: 1 / -1;
    color: var(--text-dim);
    text-align: center;
    padding: 40px 10px;
    font-size: 14px;
}
.cloth-card {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: border-color .15s, transform .1s;
}
.cloth-card:hover { border-color: var(--text-dim); }
.cloth-card.selected {
    border-color: var(--magenta);
    box-shadow: 0 0 0 2px rgba(255,45,146,0.35);
}
.cloth-card .thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #0e1017;
    display: block;
}
.cloth-card .info {
    padding: 8px 10px 10px;
}
.cloth-card .name {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cloth-card .price {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--amber);
    margin-top: 3px;
}
.cloth-card .check {
    position: absolute;
    top: 8px; right: 8px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--magenta);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}
.cloth-card.selected .check { display: flex; }

/* ---- Cart / summary ---- */
.cart-bar {
    position: sticky;
    bottom: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 6px;
    box-shadow: 0 -8px 28px rgba(0,0,0,0.4);
}
.cart-bar .count {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-dim);
}
.cart-bar .count b { color: var(--text); }
.cart-bar .total {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--amber);
    margin-left: auto;
}
.cart-bar .total .cur { font-size: 15px; opacity: .8; }
.btn {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 14px;
    padding: 12px 26px;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    background: var(--magenta);
    color: #fff;
    transition: filter .15s, transform .1s;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: var(--line); color: var(--text-dim); cursor: not-allowed; filter: none; }
.btn.secondary { background: transparent; border: 1px solid var(--line); color: var(--text); }

/* ---- Selected items strip ---- */
.selected-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px;
    margin-bottom: 14px;
}
.selected-strip .chip {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 10px 5px 5px;
    font-size: 12.5px;
}
.selected-strip .chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.selected-strip .chip button {
    background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 14px; line-height: 1;
}

/* ---- Checkout form ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field label {
    display: block;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    margin-bottom: 6px;
    font-family: var(--font-mono);
}
.field input, .field textarea {
    width: 100%;
    padding: 12px 13px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
}
.field input:focus, .field textarea:focus {
    outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(53,224,208,0.15);
}
.notice {
    background: rgba(255,180,68,0.08);
    border: 1px solid rgba(255,180,68,0.35);
    color: #ffd699;
    border-radius: 8px;
    padding: 13px 15px;
    font-size: 13.5px;
    margin: 16px 0;
}
.error-box {
    background: rgba(255,92,92,0.10);
    border: 1px solid rgba(255,92,92,0.4);
    color: #ffb3b3;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 13.5px;
    margin-bottom: 16px;
    display: none;
}
.error-box.show { display: block; }

/* ---- Success page ---- */
.success-card {
    text-align: center;
    padding: 60px 24px;
}
.success-card .ref {
    font-family: var(--font-mono);
    font-size: 32px;
    color: var(--cyan);
    letter-spacing: 0.05em;
    margin: 14px 0 20px;
}

footer.site-footer {
    text-align: center;
    color: var(--text-dim);
    font-size: 12.5px;
    padding: 30px 20px;
    border-top: 1px solid var(--line);
    margin-top: 40px;
}

@media (max-width: 640px) {
    .form-grid { grid-template-columns: 1fr; }
    .cart-bar { flex-wrap: wrap; }
    .cart-bar .total { margin-left: 0; width: 100%; text-align: right; }
}
