/* DARK THEME — Updated 2026-04-05 | Cache Buster v4 */
/* ── Design tokens ──────────────────────────────────────────────────────────── */
:root {
    --bg:            #0F0F0F;
    --bg-raised:     #1A1A1A;
    --bg-subtle:     #2A2A2A;
    --text:          #FFFFFF;
    --text-muted:    #A0A0A0;
    --text-light:    #808080;
    --accent:        #00D9FF;
    --accent-hover:  #00B8D4;
    --accent-light:  rgba(0, 217, 255, 0.1);
    --border:        #333333;
    --border-strong: #444444;
    --success:       #16A34A;
    --danger:        #DC2626;
    --shadow-sm:     0 1px 4px rgba(0, 217, 255, .05);
    --shadow-md:     0 4px 20px rgba(0, 217, 255, .08);
    --shadow-lg:     0 8px 40px rgba(0, 217, 255, .12);
    --radius:        10px;
    --radius-lg:     16px;
    --header-h:      68px;
    --sidebar-w:     256px;
    --transition:    140ms ease;
}

/* ── Reset & base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #0F0F0F !important;
    color: #FFFFFF !important;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; object-fit: cover; }
button { cursor: pointer; font: inherit; border: none; background: none; }
input, select { font: inherit; }

/* ── Typography ─────────────────────────────────────────────────────────────── */
h1 { font-family: 'Playfair Display', serif; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
h2 { font-family: 'Playfair Display', serif; font-size: 1.125rem; font-weight: 700; }
h3 { font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-light); }

/* ── Header ─────────────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: #0F0F0F !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #333333 !important;
    box-shadow: 0 4px 30px rgba(0, 217, 255, 0.05);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    height: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 1rem;
}

.store-logo {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -.05em;
    color: var(--text);
    white-space: nowrap;
    transition: color var(--transition);
}
.store-logo span { color: var(--accent); }
.store-logo:hover { color: var(--accent); }

.search-wrap {
    position: relative;
    max-width: 520px;
    width: 100%;
}

.search-wrap svg {
    position: absolute;
    left: .875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

#search-input {
    width: 100%;
    padding: .625rem .875rem .625rem 2.5rem;
    background: #2A2A2A !important;
    border: 1.5px solid #333333 !important;
    border-radius: 999px;
    font-size: .9375rem;
    color: #FFFFFF !important;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
#search-input::placeholder { color: #808080 !important; }
#search-input:focus {
    border-color: #00D9FF !important;
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
    background: #1A1A1A !important;
}

.header-actions { display: flex; align-items: center; gap: .5rem; }

.cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    background: var(--accent);
    color: #000;
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 700;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 2px 8px rgba(0,217,255,.30);
}
.cart-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,217,255,.35);
}

.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: #000;
    color: var(--accent);
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 800;
}
.cart-count[hidden] { display: none; }

.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--bg-subtle);
    border: 1.5px solid var(--border);
    transition: background var(--transition);
}
.sidebar-toggle:hover { background: var(--border); }

/* ── Page layout ────────────────────────────────────────────────────────────── */
.page-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    gap: 2rem;
    align-items: start;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────────── */
.sidebar {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    background: #1A1A1A !important;
    border: 1.5px solid #333333 !important;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    max-height: calc(100vh - var(--header-h) - 3rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #333333 transparent;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.sidebar-close { display: none; }

.sidebar section { margin-bottom: 1.5rem; }
.sidebar h3 { margin-bottom: .75rem; }

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

.cat-link {
    display: block;
    padding: .5rem .75rem;
    border-radius: var(--radius);
    font-size: .9375rem;
    font-weight: 500;
    color: #A0A0A0;
    transition: background var(--transition), color var(--transition);
}
.cat-link:hover { background: #2A2A2A; color: #FFFFFF; }
.cat-link.active {
    background: rgba(0, 217, 255, 0.1);
    color: #00D9FF;
    font-weight: 700;
}

/* ── Main content ────────────────────────────────────────────────────────────── */
.main-content { min-width: 0; }

.results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.result-count { font-size: .9375rem; color: #A0A0A0; }

#sort-select {
    padding: .5rem .875rem;
    background: #1A1A1A !important;
    border: 1.5px solid #333333 !important;
    border-radius: var(--radius);
    font-size: .875rem;
    color: #FFFFFF !important;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition);
}
#sort-select:focus { border-color: #00D9FF !important; }

/* ── Product grid ────────────────────────────────────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.5rem;
}

/* ── Product card ────────────────────────────────────────────────────────────── */
.product-card {
    background: #1A1A1A !important;
    border: 1.5px solid #333333 !important;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 300ms cubic-bezier(.4,0,.2,1);
    position: relative;
}
.product-card:hover {
    box-shadow: 0 8px 32px rgba(0, 217, 255, 0.15);
    transform: translateY(-4px);
    border-color: rgba(0, 217, 255, 0.3);
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(8px);
}

.product-card-img-wrap {
    display: block;
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bg-subtle);
}
.product-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms cubic-bezier(.4,0,.2,1);
}
.product-card:hover .product-card-img-wrap img { transform: scale(1.08); }

.product-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border-strong);
}

/* Video card thumbnail */
.product-card-video-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a2e;
    color: rgba(255,255,255,.8);
}
.product-card-video-thumb svg { opacity: .9; }

.out-of-stock-badge {
    position: absolute;
    top: .625rem;
    left: .625rem;
    padding: .25rem .625rem;
    background: rgba(255,255,255,.92);
    color: var(--danger);
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    border: 1.5px solid currentColor;
    backdrop-filter: blur(4px);
}

.low-stock-badge {
    position: absolute;
    top: .625rem;
    right: .625rem;
    padding: .375rem .75rem;
    background: rgba(0, 217, 255, 0.95);
    color: #000;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    backdrop-filter: blur(4px);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 0.95; }
    50% { opacity: 1; }
}

.product-card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: .5rem;
    position: relative;
}

.product-card-cats {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin-bottom: .125rem;
}

.product-cat {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent);
    transition: opacity var(--transition);
}
.product-cat:hover { opacity: .7; color: var(--accent); }

.product-card-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.35;
    flex: 1;
    color: var(--text);
}
.product-card-name a { color: inherit; }
.product-card-name a:hover { color: var(--accent); }

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .5rem;
}

.product-card-price {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--accent);
}

.add-to-cart-btn {
    padding: .5rem 1rem;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    transition: all 280ms cubic-bezier(.4,0,.2,1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-width: 120px;
}
.add-to-cart-btn:hover:not(.disabled) {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(0,217,255,.4);
    transform: scale(1.05);
}
.add-to-cart-btn.disabled, .add-to-cart-btn:disabled {
    background: var(--bg-subtle);
    color: var(--text-light);
    cursor: not-allowed;
}

/* Add to cart button checkmark animation */
.add-to-cart-btn.added::before {
    content: '✓';
    position: absolute;
    left: .5rem;
    animation: checkmark-pop 600ms cubic-bezier(.34,1.56,.64,1);
}

@keyframes checkmark-pop {
    0% { transform: scale(0) rotate(-45deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(0deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* ── Pagination ──────────────────────────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
}

.page-btn {
    padding: .5rem 1.25rem;
    background: var(--bg-raised);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .875rem;
    font-weight: 700;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.page-btn:hover:not([disabled]) {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.page-btn[disabled] { opacity: .4; cursor: not-allowed; }
.page-info { font-size: .875rem; color: var(--text-muted); }

/* ── Empty / Error state ─────────────────────────────────────────────────────── */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-muted);
}
.empty-state svg { opacity: .3; }
.empty-state.error { color: var(--danger); }

/* ── Skeleton loading ────────────────────────────────────────────────────────── */
.skeleton {
    pointer-events: none;
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .5; }
}
.skeleton-img { aspect-ratio: 1; background: var(--bg-subtle); }
.skeleton-body { padding: .875rem 1rem 1rem; display: flex; flex-direction: column; gap: .5rem; }
.skeleton-line { height: 14px; background: var(--bg-subtle); border-radius: 4px; }
.skeleton-line.short { width: 40%; }
.skeleton-line.med   { width: 60%; }

/* ── Cart drawer ─────────────────────────────────────────────────────────────── */
.cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(26,23,16,.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
}
.cart-overlay.visible { opacity: 1; pointer-events: all; }

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 201;
    width: min(400px, 100vw);
    background: var(--bg-raised);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 260ms cubic-bezier(.4,0,.2,1);
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.cart-drawer-header h2 { font-size: 1.125rem; font-weight: 800; }

.cart-close {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.375rem;
    line-height: 1;
    color: var(--text-muted);
    transition: background var(--transition), color var(--transition);
}
.cart-close:hover { background: var(--bg-subtle); color: var(--text); }

#cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.cart-empty { color: var(--text-muted); text-align: center; padding: 3rem 0; font-size: .9375rem; }

.cart-item {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: .875rem;
    align-items: start;
}

.cart-item-img {
    width: 72px;
    height: 72px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-subtle);
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-no-img { width: 100%; height: 100%; }

.cart-item-name { font-size: .9rem; font-weight: 700; line-height: 1.3; margin-bottom: .25rem; }
.cart-item-price { font-size: .875rem; color: var(--text-muted); margin-bottom: .5rem; }

.cart-item-remove {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.25rem;
    color: var(--text-light);
    transition: background var(--transition), color var(--transition);
}
.cart-item-remove:hover { background: #FEE2E2; color: var(--danger); }

/* ── Cart upsell section ──────────────────────────────────────────────────── */
.cart-upsell-section {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.upsell-header {
    font-family: 'Playfair Display', serif;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.upsell-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.upsell-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-subtle);
    border-radius: 999px;
    overflow: hidden;
}

.upsell-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #00B0D9);
    border-radius: 999px;
    transition: width 400ms cubic-bezier(.4,0,.2,1);
}

.cart-drawer-footer {
    border-top: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .875rem;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .9375rem;
}
.cart-total-row span:last-child { font-size: 1.125rem; font-weight: 800; }

/* ── Qty controls ────────────────────────────────────────────────────────────── */
.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.qty-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text);
    background: var(--bg-subtle);
    transition: background var(--transition);
}
.qty-btn:hover { background: var(--border); }
.qty-value, .qty-control input[type="number"] {
    width: 36px;
    text-align: center;
    font-size: .875rem;
    font-weight: 700;
    border: none;
    outline: none;
    background: var(--bg-raised);
    -moz-appearance: textfield;
}
.qty-control input[type="number"]::-webkit-outer-spin-button,
.qty-control input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

.qty-control.large .qty-btn { width: 44px; height: 44px; font-size: 1.25rem; }
.qty-control.large input[type="number"] { width: 52px; font-size: 1rem; }

/* ── Checkout modal ──────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(26,23,16,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
}
.modal-overlay.visible { opacity: 1; pointer-events: all; }

.checkout-modal {
    background: var(--bg-raised);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    transform: translateY(14px);
    transition: transform 220ms ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.modal-overlay.open .checkout-modal { transform: translateY(0); }

.checkout-modal h2 { font-size: 1.375rem; }
.checkout-modal p  { font-size: .9375rem; color: var(--text-muted); }

.checkout-email-input {
    width: 100%;
    padding: .75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.checkout-email-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.checkout-error {
    font-size: .875rem;
    color: var(--danger);
    min-height: 1.25em;
}

.checkout-modal-actions { display: flex; gap: .625rem; justify-content: flex-end; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .625rem 1.375rem;
    background: var(--accent);
    color: #000;
    border-radius: var(--radius);
    font-size: .9375rem;
    font-weight: 700;
    transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0,217,255,.25);
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: #000;
    box-shadow: 0 4px 14px rgba(0,217,255,.32);
    transform: translateY(-1px);
}
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary.btn-lg { padding: .875rem 1.5rem; font-size: 1.0625rem; border-radius: var(--radius-lg); width: 100%; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: .625rem 1.25rem;
    background: var(--bg-raised);
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .9375rem;
    font-weight: 600;
    transition: background var(--transition), border-color var(--transition);
}
.btn-secondary:hover { background: var(--bg-subtle); color: var(--text); border-color: var(--border-strong); }

.btn-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--accent);
    font-size: .9375rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.btn-link:hover { color: var(--accent-hover); }

/* ── Product detail page ─────────────────────────────────────────────────────── */
.detail-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .875rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--text-light); }

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: start;
}

/* ── Media gallery ───────────────────────────────────────────────────────────── */
.media-gallery { display: flex; flex-direction: column; gap: .75rem; }

.media-gallery-main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-subtle);
    aspect-ratio: 1;
    border: 1.5px solid var(--border);
    position: relative;
}
.media-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 180ms ease;
}
.media-gallery-main iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
.media-gallery-main video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-gallery-thumbs {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    padding-bottom: 2px;
}

.media-thumb {
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--border);
    background: var(--bg-subtle);
    cursor: pointer;
    transition: border-color var(--transition), transform var(--transition);
    padding: 0;
}
.media-thumb:hover { border-color: var(--accent); transform: translateY(-1px); }
.media-thumb.active { border-color: var(--accent); }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }

.media-thumb-video {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a2e;
    color: rgba(255,255,255,.85);
}

/* Fallback single image (no gallery) */
.product-detail-img {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-subtle);
    aspect-ratio: 1;
    border: 1.5px solid var(--border);
}
.product-detail-img img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border-strong);
}

.product-detail-info { display: flex; flex-direction: column; gap: 1.125rem; }

.product-cats-row {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
}

.product-detail-name { font-size: clamp(1.5rem, 3vw, 2.125rem); }

.product-detail-price {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.04em;
    color: var(--accent);
}

.product-detail-stock {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
    font-weight: 700;
}
.stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.in-stock  { color: var(--success); }
.in-stock .stock-dot  { background: var(--success); }
.out-of-stock { color: var(--danger); }
.out-of-stock .stock-dot { background: var(--danger); }

.product-detail-desc {
    font-size: .9375rem;
    line-height: 1.75;
    color: var(--text-muted);
    white-space: pre-wrap;
    max-width: 480px;
}
.product-detail-desc.placeholder {
    color: var(--text-light);
    font-style: italic;
}

.product-tags { display: flex; flex-wrap: wrap; gap: .375rem; }

.tag-chip {
    padding: .3125rem .75rem;
    background: var(--bg-subtle);
    border: 1.5px solid var(--border);
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

.product-add-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: .5rem;
    flex-wrap: wrap;
}

/* ── Technical Specs Accordion ───────────────────────────────────────────────── */
.specs-section {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.specs-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    transition: color var(--transition);
}
.specs-toggle:hover { color: var(--accent); }

.specs-label {
    font-family: 'Playfair Display', serif;
    font-size: 1.0625rem;
    font-weight: 700;
}

.specs-icon {
    flex-shrink: 0;
    transition: transform 300ms cubic-bezier(.4,0,.2,1);
}
.specs-toggle.open .specs-icon {
    transform: rotate(180deg);
}

.specs-content {
    margin-top: 1rem;
    animation: slideDown 300ms cubic-bezier(.4,0,.2,1) forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: .375rem;
}

.spec-label {
    font-size: .875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-light);
}

.spec-value {
    font-size: .9375rem;
    font-weight: 500;
    color: var(--text);
}

/* ── Newsletter section ──────────────────────────────────────────────────────── */
.newsletter-section {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.08) 0%, rgba(0, 217, 255, 0.03) 100%);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 3rem 1.5rem;
    margin: 3rem 0 0 0;
}

.newsletter-content {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.newsletter-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.newsletter-text p {
    font-size: 1.0625rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-input-wrap {
    display: flex;
    gap: 0.75rem;
    border-radius: 999px;
    background: var(--bg-subtle);
    padding: 0.375rem;
    overflow: hidden;
    border: 1px solid var(--border);
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 1rem;
    outline: none;
}

.newsletter-input::placeholder {
    color: var(--text-light);
}

.newsletter-btn {
    padding: 0.75rem 1.75rem !important;
    border-radius: 999px;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--accent) !important;
    color: #000 !important;
}
.newsletter-btn:hover {
    background: var(--accent-hover) !important;
}

.newsletter-disclaimer {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin: 0;
}

/* ── Success page ────────────────────────────────────────────────────────────── */
.success-page {
    max-width: 520px;
    margin: 5rem auto;
    padding: 0 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}
.success-icon {
    width: 72px;
    height: 72px;
    background: #DCFCE7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
}
.success-page h1 { font-size: 1.875rem; }
.success-page p  { color: var(--text-muted); font-size: 1rem; }

/* ── Sidebar overlay (mobile) ────────────────────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(26,23,16,.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
}
.sidebar-overlay.visible { opacity: 1; pointer-events: all; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer {
    margin-top: 4rem;
    border-top: 1px solid var(--border);
    background: var(--bg-raised);
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .page-layout { grid-template-columns: 220px 1fr; }
}

@media (max-width: 768px) {
    /* Header — 2 visible items: logo left, actions right */
    .header-inner {
        grid-template-columns: auto 1fr;
        gap: .5rem;
    }
    .header-inner .search-wrap { display: none; }
    .header-actions { justify-content: flex-end; }

    .sidebar-toggle { display: flex; }

    /* Catalog layout */
    .page-layout { grid-template-columns: 1fr; padding: 1rem; }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 160;
        border-radius: 0;
        border: none;
        max-height: 100dvh;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 260ms cubic-bezier(.4,0,.2,1);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay { display: block; }
    .sidebar-close { display: flex; align-items: center; }

    .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }

    /* Product detail */
    .product-detail { grid-template-columns: 1fr; gap: 1.75rem; }
    .product-detail-img { max-width: 100%; }
    .media-gallery { max-width: 100%; }
    .product-detail-desc { max-width: 100%; }
    .detail-page { padding: 1.25rem 1rem; }

    /* Hero */
    .hero-banner { padding: 2.5rem 1.25rem; }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-banner h1 { font-size: 1.75rem; }
    
    .hero-banner p { font-size: 1rem; }

    /* Newsletter */
    .newsletter-content { grid-template-columns: 1fr; gap: 1.5rem; }
    
    .newsletter-text h2 { font-size: 1.5rem; }
    
    .newsletter-input-wrap { flex-direction: column; }
    
    .newsletter-btn { width: 100%; }

    /* Checkout modal */
    .checkout-modal {
        padding: 1.375rem 1.25rem;
        border-radius: var(--radius);
        max-height: 92dvh;
        overflow-y: auto;
    }

    /* Success */
    .success-page { margin: 2.5rem auto; }

    /* Legal / info pages */
    .legal-page { padding: 2rem 1.25rem 3rem; }
    .about-content { padding: 2rem 1.25rem 3rem; }
    .about-hero { padding: 2.5rem 1.25rem; }
    .contact-form-wrap { padding: 1.375rem 1.25rem; }

    /* Footer */
    .footer-main { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-brand-desc { max-width: 100%; }

    /* About/contact */
    .about-grid { grid-template-columns: 1fr; gap: 2rem; }

    /* Navigation */
    .site-nav { display: none; }
}

@media (max-width: 480px) {
    /* Product grid */
    .product-grid { grid-template-columns: 1fr 1fr; }

    /* Product detail add row */
    .product-add-row { flex-direction: column; align-items: stretch; }
    .qty-control.large { align-self: center; }

    /* Hero */
    .hero-banner { padding: 1.5rem 1rem; }
    .hero-banner h1 { font-size: 1.5rem; }

    /* Cart */
    .cart-drawer { width: 100vw; }
    .cart-item { grid-template-columns: 60px 1fr auto; gap: .625rem; }
    .cart-item-img { width: 60px; height: 60px; }

    /* Checkout modal */
    .checkout-modal { padding: 1.25rem 1rem; border-radius: var(--radius); }
    .checkout-modal-actions { flex-direction: column-reverse; gap: .5rem; }
    .checkout-modal-actions .btn-primary,
    .checkout-modal-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    .fee-breakdown { font-size: .8125rem; }

    /* Footer */
    .footer-main { grid-template-columns: 1fr; gap: 1.75rem; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: .75rem; }

    /* Legal pages */
    .legal-page { padding: 1.5rem 1rem 2.5rem; }
    .about-content { padding: 1.5rem 1rem 2.5rem; }
    .about-hero { padding: 2rem 1rem; }
    .contact-form-wrap { padding: 1.25rem 1rem; }

    /* Success */
    .success-page { margin: 2rem auto; padding: 0 1rem; }
    .success-page h1 { font-size: 1.5rem; }

    /* Breadcrumb */
    .breadcrumb { flex-wrap: wrap; gap: .25rem; }
}

/* ── Fee breakdown (checkout modal) ─────────────────────────────────────────── */
.fee-breakdown {
    background: var(--bg-subtle);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: .875rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.fee-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .875rem;
    color: var(--text-muted);
}
.fee-line-total {
    padding-top: .5rem;
    margin-top: .125rem;
    border-top: 1px solid var(--border-strong);
    font-size: .9375rem;
    font-weight: 800;
    color: var(--text);
}
.fee-stripe-note {
    display: flex;
    align-items: flex-start;
    gap: .375rem;
    font-size: .75rem;
    color: var(--text-light);
    margin-top: .25rem;
    line-height: 1.4;
}
.fee-stripe-note svg { margin-top: 1px; }

/* ── Stripe branding ─────────────────────────────────────────────────────────── */
.stripe-trust-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}
.stripe-trust-link:hover { opacity: .8; color: inherit; }
.stripe-wordmark-text {
    color: #635BFF;
    font-weight: 800;
    letter-spacing: -.01em;
}
.footer-payment-logo.stripe-logo {
    color: #635BFF;
    border-color: rgba(99, 91, 255, .35);
}

/* ── Site navigation ─────────────────────────────────────────────────────────── */
.site-nav {
    display: flex;
    align-items: center;
    gap: .125rem;
}
.nav-link {
    padding: .375rem .75rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius);
    transition: color var(--transition), background var(--transition);
    white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--bg-subtle); }

/* ── Trust bar ───────────────────────────────────────────────────────────────── */
.trust-bar {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    color: var(--text-muted);
    padding: .625rem 0 0;
    border-top: 1px solid var(--border);
    margin-top: .25rem;
    flex-wrap: wrap;
}
.trust-bar svg { color: var(--success); flex-shrink: 0; }
.trust-bar-centered { justify-content: center; }

.payment-logos {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-wrap: wrap;
    margin-top: .375rem;
}
.payment-logo {
    padding: 2px 6px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .04em;
    color: var(--text-muted);
}

/* ── Hero banner ─────────────────────────────────────────────────────────────── */
.hero-banner {
    background: linear-gradient(135deg, #1A1A1A 0%, #0F0F0F 100%) !important;
    border-bottom: 1px solid #333333 !important;
    padding: 4rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-text { text-align: left; }

.hero-banner h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: #FFFFFF !important;
    margin-bottom: 1rem;
    letter-spacing: -.04em;
    line-height: 1.15;
}

.hero-banner h1 span { color: #00D9FF !important; }

.hero-banner p { font-size: 1.0625rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 1.75rem; }

.hero-cta { display: inline-flex; padding: 0.875rem 2rem !important; font-size: 1rem !important; border-radius: 999px; font-weight: 700; }

/* ── Expanded footer ─────────────────────────────────────────────────────────── */
.footer-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 1.5rem 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
}
.footer-brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -.05em;
    color: var(--text);
    margin-bottom: .5rem;
}
.footer-brand-desc {
    font-size: .875rem;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 280px;
    margin-bottom: 1rem;
}
.footer-socials {
    display: flex;
    gap: .5rem;
}
.social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--bg-subtle);
    border: 1.5px solid var(--border);
    color: var(--text-muted);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.social-link:hover { background: var(--accent); border-color: var(--accent); color: #000; }
.footer-col-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-light);
    margin-bottom: .875rem;
}
.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.footer-links a {
    font-size: .875rem;
    color: var(--text-muted);
    transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.footer-copyright { font-size: .8125rem; color: var(--text-light); }
.footer-payment-logos { display: flex; align-items: center; gap: .375rem; }
.footer-payment-logo {
    padding: 3px 8px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: .6rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: .04em;
}

/* ── Legal / Info pages ──────────────────────────────────────────────────────── */
.legal-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}
.legal-page h1 { margin-bottom: .375rem; }
.legal-date { font-size: .875rem; color: var(--text-light); margin-bottom: 2.5rem; display: block; }
.legal-page h2 { font-size: 1rem; font-weight: 700; margin: 2rem 0 .625rem; color: var(--text); }
.legal-page p  { font-size: .9375rem; color: var(--text-muted); line-height: 1.75; margin-bottom: .75rem; }
.legal-page ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.legal-page li { font-size: .9375rem; color: var(--text-muted); line-height: 1.75; margin-bottom: .375rem; }
.legal-page a  { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ── Contact / About page ────────────────────────────────────────────────────── */
.about-hero {
    background: linear-gradient(135deg, var(--bg-subtle) 0%, var(--accent-light) 100%);
    border-bottom: 1px solid var(--border);
    padding: 3.5rem 1.5rem;
    text-align: center;
}
.about-hero h1 { margin-bottom: .625rem; }
.about-hero p {
    font-size: 1.0625rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}
.about-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3.5rem;
}
.about-section h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: .875rem; }
.about-section p  { font-size: .9375rem; color: var(--text-muted); line-height: 1.75; margin-bottom: .75rem; }
.contact-methods { display: flex; flex-direction: column; gap: .875rem; margin-top: 1rem; }
.contact-method {
    display: flex;
    align-items: center;
    gap: .875rem;
    padding: 1rem 1.25rem;
    background: var(--bg-raised);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .9375rem;
    color: var(--text-muted);
    transition: border-color var(--transition), color var(--transition);
}
.contact-method:hover { border-color: var(--accent); color: var(--text); }
.contact-method svg { color: var(--accent); flex-shrink: 0; }
.contact-form-wrap {
    background: var(--bg-raised);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}
.contact-form-wrap h2 { margin-bottom: 1.5rem; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .375rem; }
.form-label { font-size: .875rem; font-weight: 600; color: var(--text); }
.form-input, .form-textarea {
    padding: .75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
    font-size: .9375rem;
    color: var(--text);
    background: var(--bg-raised);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus, .form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}
.form-textarea { min-height: 130px; resize: vertical; }
.form-success {
    padding: 1rem;
    background: #DCFCE7;
    border: 1.5px solid #86EFAC;
    border-radius: var(--radius);
    color: var(--success);
    font-size: .9375rem;
    font-weight: 600;
    display: none;
}
.form-success.visible { display: block; }

/* (responsive rules for footer/about/nav consolidated into the main @media blocks above) */
