/* ============================================================
   KingdomFirst Electric — storefront design system
   Palette: porcelain #F7F8FA · ink #10141A · cobalt #1B4FD8 · volt #FFD60A
   Type: Chakra Petch (display) · IBM Plex Sans (body) · IBM Plex Mono (data)
   ============================================================ */

:root {
    --porcelain: #F7F8FA;
    --surface: #FFFFFF;
    --ink: #10141A;
    --slate: #5B6472;
    --line: #E3E8EF;
    --cobalt: #1B4FD8;
    --cobalt-dark: #143CA6;
    --cobalt-soft: #EAF0FE;
    --volt: #FFD60A;
    --danger: #C42B2B;
    --danger-soft: #FBEAEA;
    --green: #12805C;
    --green-soft: #E7F5EF;
    --radius: 12px;
    --radius-sm: 8px;
    --font-display: "Chakra Petch", "Segoe UI", sans-serif;
    --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", Consolas, monospace;
    --shadow: 0 1px 2px rgba(16, 20, 26, .05), 0 8px 24px -12px rgba(16, 20, 26, .12);
    --shadow-lift: 0 2px 4px rgba(16, 20, 26, .06), 0 16px 32px -12px rgba(16, 20, 26, .18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--porcelain);
    color: var(--ink);
    line-height: 1.55;
    font-size: 15.5px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, .display { font-family: var(--font-display); letter-spacing: .01em; }

.mono { font-family: var(--font-mono); }

:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}

/* ---------- announcement bar ---------- */
.announce {
    background: var(--ink);
    color: #E9EDF3;
    font-family: var(--font-mono);
    font-size: 12.5px;
    text-align: center;
    padding: 7px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.announce-node {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--volt);
    box-shadow: 0 0 8px 1px rgba(255, 214, 10, .8);
    flex: none;
}

/* ---------- header ---------- */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 60;
}

.header-row {
    display: flex;
    align-items: center;
    gap: 22px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand-mark svg { display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }

.brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: .04em;
}

.brand-tag { font-size: 11px; color: var(--slate); letter-spacing: .02em; }

.header-search {
    flex: 1;
    display: flex;
    max-width: 520px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color .15s;
}

.header-search:focus-within { border-color: var(--cobalt); }

.header-search input {
    flex: 1;
    border: 0;
    padding: 9px 14px;
    font: inherit;
    font-size: 14px;
    background: var(--porcelain);
    color: var(--ink);
}

.header-search input:focus { outline: none; background: var(--surface); }

.header-search button {
    border: 0;
    background: var(--cobalt);
    color: #fff;
    padding: 0 16px;
    display: grid;
    place-items: center;
}

.header-search button:hover { background: var(--cobalt-dark); }

.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.header-action {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    color: var(--slate);
    transition: color .15s, background .15s;
}

.header-action:hover { color: var(--cobalt); background: var(--cobalt-soft); }

.count-pip {
    position: absolute;
    top: 0; right: 4px;
    background: var(--volt);
    color: var(--ink);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 10.5px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    border: 2px solid var(--surface);
}

/* ---------- category nav ---------- */
.cat-nav { border-top: 1px solid var(--line); background: var(--surface); }

.cat-nav-row {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.cat-nav-row::-webkit-scrollbar { display: none; }

.cat-link {
    flex: none;
    padding: 10px 13px;
    font-size: 13px;
    font-weight: 500;
    color: var(--slate);
    border-bottom: 2.5px solid transparent;
    transition: color .15s;
    white-space: nowrap;
}

.cat-link:hover { color: var(--ink); }
.cat-link.active { color: var(--ink); border-bottom-color: var(--volt); }
.cat-link.deal { color: var(--cobalt); font-weight: 600; }

/* ---------- flash messages ---------- */
.flash {
    margin: 16px 0 0;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    border: 1px solid;
}

.flash-success { background: var(--green-soft); color: var(--green); border-color: #BFE3D4; }
.flash-error { background: var(--danger-soft); color: var(--danger); border-color: #EFC7C7; }

/* ---------- section headers (circuit trace signature) ---------- */
.section { padding: 44px 0 8px; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--cobalt);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.eyebrow::before {
    content: "";
    width: 26px; height: 2px;
    background: var(--cobalt);
    border-radius: 1px;
    box-shadow: 32px 0 0 -0.5px var(--volt);
    position: relative;
}

.section-title { font-size: 26px; font-weight: 700; }

.section-link {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--cobalt);
    white-space: nowrap;
}

.section-link:hover { text-decoration: underline; }

.trace-divider {
    height: 1px;
    background: var(--line);
    position: relative;
    margin: 40px 0 0;
}

.trace-divider::before {
    content: "";
    position: absolute;
    left: 50%; top: -3.5px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--volt);
    border: 2px solid var(--surface);
    transform: translateX(-50%);
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    transition: background .15s, color .15s, border-color .15s, transform .1s;
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-dark); }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #232B36; }

.btn-outline { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-outline:hover { border-color: var(--cobalt); color: var(--cobalt); }

.btn-ghost { background: transparent; color: var(--slate); }
.btn-ghost:hover { color: var(--danger); }

.btn-volt { background: var(--volt); color: var(--ink); }
.btn-volt:hover { background: #EFC500; }

.btn-block { width: 100%; }
.btn-sm { padding: 7px 13px; font-size: 13px; }

.btn[disabled] { opacity: .5; cursor: not-allowed; }

.linklike {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

/* ---------- hero / banner slider ---------- */
.hero { padding: 26px 0 0; }

.slider { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

.slide {
    display: none;
    position: relative;
    min-height: 340px;
    background-size: cover;
    background-position: center;
    color: #fff;
}

.slide.on { display: block; animation: slideIn .5s ease; }

@keyframes slideIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11, 15, 22, .82) 0%, rgba(11, 15, 22, .55) 45%, rgba(11, 15, 22, .08) 100%);
}

.slide-inner {
    position: relative;
    z-index: 1;
    max-width: 560px;
    padding: 62px 56px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.slide-kicker {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .1em;
    color: var(--volt);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.slide-kicker::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--volt);
    box-shadow: 0 0 8px 1px rgba(255, 214, 10, .8);
}

.slide-title { font-size: clamp(26px, 4vw, 42px); font-weight: 700; line-height: 1.12; }
.slide-sub { font-size: 15.5px; color: #D6DDE6; max-width: 46ch; }

.slider-dots {
    position: absolute;
    z-index: 2;
    left: 56px;
    bottom: 22px;
    display: flex;
    gap: 8px;
}

.slider-dot {
    width: 26px; height: 4px;
    border: 0;
    border-radius: 2px;
    background: rgba(255, 255, 255, .35);
    transition: background .2s;
}

.slider-dot.on { background: var(--volt); }

.slider-arrows {
    position: absolute;
    z-index: 2;
    right: 22px;
    bottom: 16px;
    display: flex;
    gap: 8px;
}

.slider-arrow {
    width: 36px; height: 36px;
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(11, 15, 22, .35);
    color: #fff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 16px;
}

.slider-arrow:hover { background: rgba(11, 15, 22, .65); }

/* ---------- perk strip ---------- */
.perks {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 20px;
}

.perk {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.perk svg { color: var(--cobalt); flex: none; }
.perk b { display: block; font-size: 13.5px; }
.perk span { color: var(--slate); font-size: 12.5px; }

/* ---------- category tiles ---------- */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.cat-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--ink);
    box-shadow: var(--shadow);
    transition: transform .18s, box-shadow .18s;
}

.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.cat-card img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }

.cat-card-label {
    position: absolute;
    left: 14px; bottom: 12px; right: 14px;
    color: #fff;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.cat-card-name { font-family: var(--font-display); font-weight: 600; font-size: 15.5px; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.cat-card-count { font-family: var(--font-mono); font-size: 11.5px; color: var(--volt); }

/* ---------- product grid & cards ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform .18s, box-shadow .18s, border-color .18s;
}

.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: #D2DAE4; }

.product-media { position: relative; aspect-ratio: 1; background: var(--porcelain); }
.product-media img { width: 100%; height: 100%; object-fit: cover; }

.badge-row { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; z-index: 2; }

.badge {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .05em;
    padding: 3px 8px;
    border-radius: 5px;
}

.badge-sale { background: var(--volt); color: var(--ink); }
.badge-out { background: var(--ink); color: #fff; }
.badge-featured { background: var(--cobalt); color: #fff; }

.wish-btn {
    position: absolute;
    top: 9px; right: 9px;
    z-index: 2;
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .92);
    color: var(--slate);
    display: grid;
    place-items: center;
    transition: color .15s, border-color .15s, transform .12s;
}

.wish-btn:hover { color: var(--danger); border-color: var(--danger); transform: scale(1.08); }
.wish-btn.saved { color: var(--danger); border-color: var(--danger); }
.wish-btn.saved svg { fill: currentColor; }

.product-body {
    padding: 13px 15px 15px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.product-brand {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--slate);
}

.product-name { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.product-name a:hover { color: var(--cobalt); }

.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 8px; }

.price {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 16px;
}

.price-old {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--slate);
    text-decoration: line-through;
}

.price-off { font-family: var(--font-mono); font-size: 11.5px; color: var(--green); font-weight: 600; }

.card-cart-form { margin-top: 10px; }

/* ---------- shop page ---------- */
.shop-layout { display: grid; grid-template-columns: 230px 1fr; gap: 28px; padding: 30px 0 10px; }

.shop-side { align-self: start; position: sticky; top: 130px; }

.side-block {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 16px;
}

.side-head {
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--slate);
    margin-bottom: 10px;
}

.side-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.side-list a {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13.5px;
    color: var(--slate);
}

.side-list a:hover { background: var(--porcelain); color: var(--ink); }
.side-list a.active { background: var(--cobalt-soft); color: var(--cobalt); font-weight: 600; }
.side-list .n { font-family: var(--font-mono); font-size: 11.5px; }

.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.shop-count { font-size: 13.5px; color: var(--slate); }
.shop-count b { color: var(--ink); font-family: var(--font-mono); }

.sort-form { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--slate); }

select, input[type="text"], input[type="search"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], textarea {
    font: inherit;
    font-size: 14px;
    color: var(--ink);
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    transition: border-color .15s;
}

select:focus, input:focus, textarea:focus { outline: none; border-color: var(--cobalt); }

.empty-state {
    text-align: center;
    padding: 70px 20px;
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--slate);
}

.empty-state h2 { font-size: 20px; color: var(--ink); margin-bottom: 6px; }
.empty-state .btn { margin-top: 16px; }

/* ---------- pagination ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 30px 0 10px; flex-wrap: wrap; }

.page-link {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink);
}

.page-link:hover { border-color: var(--cobalt); color: var(--cobalt); }
.page-link.current { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.page-link.disabled { opacity: .4; pointer-events: none; }

/* ---------- product detail ---------- */
.pd-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; padding: 34px 0 10px; }

.breadcrumbs { font-size: 12.5px; color: var(--slate); padding: 20px 0 0; font-family: var(--font-mono); }
.breadcrumbs a:hover { color: var(--cobalt); }
.breadcrumbs .sep { margin: 0 6px; color: var(--line); }

.pd-media { position: sticky; top: 140px; align-self: start; }

.pd-main-img {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
    aspect-ratio: 1;
}

.pd-main-img img { width: 100%; height: 100%; object-fit: cover; }

.pd-thumbs { display: flex; gap: 10px; margin-top: 12px; }

.pd-thumb {
    width: 72px; height: 72px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--line);
    overflow: hidden;
    padding: 0;
    background: var(--surface);
}

.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb.on { border-color: var(--cobalt); }

.pd-info { display: flex; flex-direction: column; gap: 14px; }

.pd-title { font-size: 27px; font-weight: 700; line-height: 1.2; }

.pd-meta { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 12px; color: var(--slate); }
.pd-meta b { color: var(--ink); font-weight: 500; }

.pd-price-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.pd-price { font-family: var(--font-mono); font-weight: 600; font-size: 28px; }
.pd-price-old { font-family: var(--font-mono); font-size: 16px; color: var(--slate); text-decoration: line-through; }

.stock-note { font-family: var(--font-mono); font-size: 12.5px; }
.stock-note.ok { color: var(--green); }
.stock-note.low { color: #B45309; }
.stock-note.out { color: var(--danger); }

.qty-stepper {
    display: inline-flex;
    align-items: stretch;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.qty-stepper button {
    width: 38px;
    border: 0;
    background: var(--porcelain);
    font-size: 17px;
    color: var(--slate);
}

.qty-stepper button:hover { background: var(--cobalt-soft); color: var(--cobalt); }

.qty-stepper input {
    width: 52px;
    border: 0;
    border-left: 1.5px solid var(--line);
    border-right: 1.5px solid var(--line);
    border-radius: 0;
    text-align: center;
    font-family: var(--font-mono);
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

.pd-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.cod-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FFFBE6;
    border: 1px solid #F0E1A0;
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-size: 13.5px;
}

.cod-chip {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .06em;
    background: var(--volt);
    color: var(--ink);
    padding: 3px 8px;
    border-radius: 5px;
    white-space: nowrap;
}

.pd-desc { color: #333A45; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.spec-table th, .spec-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { color: var(--slate); font-weight: 500; width: 38%; }
.spec-table td { font-family: var(--font-mono); font-size: 13px; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }

.pd-block {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.pd-block-head {
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--slate);
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--porcelain);
}

.pd-block-body { padding: 16px; }

/* ---------- cart & checkout ---------- */
.page-head { padding: 34px 0 6px; }
.page-title { font-size: 28px; font-weight: 700; }
.page-sub { color: var(--slate); margin-top: 4px; font-size: 14.5px; }

.cart-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 26px; padding: 24px 0; align-items: start; }

.cart-table-wrap, .panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.cart-row {
    display: grid;
    grid-template-columns: 76px 1fr auto auto auto;
    gap: 16px;
    align-items: center;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
}

.cart-row:last-child { border-bottom: 0; }

.cart-thumb { width: 76px; height: 76px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-name { font-weight: 600; font-size: 14.5px; }
.cart-item-name a:hover { color: var(--cobalt); }
.cart-item-unit { font-family: var(--font-mono); font-size: 12px; color: var(--slate); margin-top: 2px; }

.cart-line-total { font-family: var(--font-mono); font-weight: 600; font-size: 15px; min-width: 90px; text-align: right; }

.summary { position: sticky; top: 140px; }
.summary-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }

.summary-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--slate); }
.summary-row .v { font-family: var(--font-mono); color: var(--ink); }

.summary-total { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; font-weight: 600; font-size: 16px; }
.summary-total .v { font-family: var(--font-mono); font-size: 19px; }

.free-ship-note { font-size: 12.5px; color: var(--green); background: var(--green-soft); border-radius: 6px; padding: 8px 10px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 13px; font-weight: 600; }
.field .hint { font-size: 12px; color: var(--slate); font-weight: 400; }
.field-error { color: var(--danger); font-size: 12.5px; }

.pay-option {
    display: flex;
    gap: 12px;
    border: 1.5px solid var(--cobalt);
    background: var(--cobalt-soft);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    align-items: flex-start;
}

.pay-option .radio {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 5px solid var(--cobalt);
    background: #fff;
    flex: none;
    margin-top: 2px;
}

.pay-option b { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.pay-option p { font-size: 13px; color: var(--slate); margin-top: 3px; }

/* ---------- order status / tracking ---------- */
.status-chip {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .04em;
    padding: 4px 10px;
    border-radius: 999px;
}

.st-pending { background: #FFF4D6; color: #8A6400; }
.st-confirmed { background: var(--cobalt-soft); color: var(--cobalt); }
.st-shipped { background: #EDE5FB; color: #6D28D9; }
.st-delivered { background: var(--green-soft); color: var(--green); }
.st-cancelled { background: var(--danger-soft); color: var(--danger); }

.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 10px 0 4px; }

.tl-step { text-align: center; position: relative; padding-top: 26px; font-size: 12.5px; color: var(--slate); }

.tl-step::before {
    content: "";
    position: absolute;
    top: 7px; left: 50%;
    transform: translateX(-50%);
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--surface);
    border: 3px solid var(--line);
    z-index: 1;
}

.tl-step::after {
    content: "";
    position: absolute;
    top: 12.5px; left: -50%;
    width: 100%; height: 3px;
    background: var(--line);
}

.tl-step:first-child::after { display: none; }

.tl-step.done { color: var(--ink); font-weight: 600; }
.tl-step.done::before { border-color: var(--cobalt); background: var(--volt); }
.tl-step.done::after { background: var(--cobalt); }

.order-number {
    font-family: var(--font-mono);
    font-weight: 600;
    background: var(--ink);
    color: var(--volt);
    padding: 4px 12px;
    border-radius: 6px;
    letter-spacing: .04em;
}

/* ---------- auth & narrow pages ---------- */
.narrow { max-width: 480px; margin: 0 auto; padding: 44px 20px 60px; }
.mid { max-width: 760px; margin: 0 auto; padding: 30px 20px 60px; }

.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 23px; margin-bottom: 4px; }
.auth-card .lead { color: var(--slate); font-size: 14px; margin-bottom: 20px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-alt { text-align: center; margin-top: 18px; font-size: 14px; color: var(--slate); }
.auth-alt a { color: var(--cobalt); font-weight: 600; }

.check-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--slate); }
.check-row input { accent-color: var(--cobalt); width: 16px; height: 16px; }

/* ---------- account ---------- */
.account-layout { display: grid; grid-template-columns: 220px 1fr; gap: 26px; padding: 30px 0 50px; align-items: start; }

.account-nav { display: flex; flex-direction: column; gap: 4px; }

.account-nav a, .account-nav button {
    text-align: left;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--slate);
    border: 0;
    background: none;
    width: 100%;
}

.account-nav a:hover, .account-nav button:hover { background: var(--surface); color: var(--ink); }
.account-nav a.active { background: var(--cobalt-soft); color: var(--cobalt); font-weight: 600; }

.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
    text-align: left;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--slate);
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--porcelain);
    white-space: nowrap;
}

.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: #FBFCFE; }
.data-table .num { font-family: var(--font-mono); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #A8B2BF; margin-top: 64px; }

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.4fr;
    gap: 34px;
    padding: 46px 20px 34px;
}

.footer-brand { font-family: var(--font-display); font-weight: 700; color: #fff; letter-spacing: .04em; margin-bottom: 10px; }
.footer-about { font-size: 13.5px; line-height: 1.65; }

.footer-head {
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #67717F;
    margin-bottom: 12px;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.footer-links a:hover, .footer-links .linklike:hover { color: var(--volt); }
.footer-contact li { font-family: var(--font-mono); font-size: 12.5px; }

.footer-base { border-top: 1px solid #232B36; }

.footer-base-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: #67717F;
    flex-wrap: wrap;
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
    .product-grid, .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .perks { grid-template-columns: repeat(2, 1fr); }
    .pd-layout { grid-template-columns: 1fr; }
    .pd-media { position: static; }
    .cart-layout { grid-template-columns: 1fr; }
    .shop-layout { grid-template-columns: 1fr; }
    .shop-side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
    .account-layout { grid-template-columns: 1fr; }
    .account-nav { flex-direction: row; flex-wrap: wrap; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .header-row { flex-wrap: wrap; }
    .header-search { order: 3; max-width: none; flex-basis: 100%; }
}

@media (max-width: 640px) {
    .product-grid, .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .perks { grid-template-columns: 1fr; }
    .header-action span:not(.count-pip) { display: none; }
    .slide-inner { padding: 40px 24px; }
    .slider-dots { left: 24px; }
    .form-grid { grid-template-columns: 1fr; }
    .cart-row { grid-template-columns: 60px 1fr; grid-auto-rows: auto; }
    .cart-line-total { text-align: left; }
    .footer-grid { grid-template-columns: 1fr; }
    .shop-side { grid-template-columns: 1fr; }
    .timeline { font-size: 11px; }
    .brand-tag { display: none; }
}
