:root {
    --accent: #f59e0b;
    --accent-light: #fcd34d;
    --accent-dark: #b45309;
    --bg: #0a0a0f;
    --surface: #16161f;
    --surface-raised: #1e1e2a;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f0f0f5;
    --text2: #9090a8;
    --green: #22c55e;
    --blue: #3b82f6;
    --purple: #a855f7;
    --red: #ef4444;
    --font-head: "IBM Plex Sans", sans-serif;
    --font-body: "DM Sans", sans-serif;
    --radius: 8px;
    --shadow-amber: 0 8px 32px rgba(245, 158, 11, 0.18);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
main { min-height: 72vh; }
.container { width: min(1600px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: auto minmax(240px, 480px) auto auto;
    gap: 18px;
    align-items: center;
    padding: 14px clamp(16px, 3vw, 36px);
    background: rgba(10, 10, 15, 0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; border-radius: 6px; }
.brand-mark {
    display: grid; place-items: center; width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #111; border-radius: var(--radius); font-weight: 800;
}
.main-nav { display: flex; align-items: center; gap: 16px; color: var(--text2); }
.main-nav a:hover { color: var(--text); }
.cart-link { position: relative; }
.cart-badge {
    display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
    margin-left: 4px; border-radius: 999px; background: var(--accent); color: #111; font-size: 12px; font-weight: 800;
}
.mobile-nav-toggle { display: none; }

.header-search { position: relative; display: flex; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.header-search input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); padding: 12px 12px 12px 18px; outline: none; }
.header-search button { border: 0; background: transparent; color: var(--text2); padding: 0 12px; cursor: pointer; }
.header-search button[type=submit] { color: var(--accent); font-weight: 700; }
.clear-search { display: none; }
.suggestions {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0; overflow: hidden;
    background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 18px 60px rgba(0,0,0,.45);
}
.suggestion-group { padding: 8px; }
.suggestion-title { color: var(--text2); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 8px; }
.suggestion-item { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 6px; cursor: pointer; }
.suggestion-item:hover, .suggestion-item.active { background: rgba(245,158,11,.12); }
.suggestion-item img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent);
    color: #12120f; font-weight: 800; padding: 13px 18px; cursor: pointer;
}
.btn:hover { background: var(--accent-light); }
.btn-outline { background: transparent; color: var(--accent); }
.btn-outline:hover { background: rgba(245,158,11,.12); color: var(--accent-light); }
.btn-small { padding: 9px 12px; font-size: 13px; }
.btn-danger { border-color: var(--red); background: var(--red); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.hero {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 560px); gap: 48px; align-items: center;
    padding: clamp(42px, 7vw, 92px) 0 48px;
}
.eyebrow { color: var(--accent); font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: .12em; }
h1, h2, h3 { font-family: var(--font-head); margin: 0; }
h1 { font-size: clamp(34px, 6vw, 62px); line-height: 1.02; }
h2 { font-size: clamp(24px, 3vw, 34px); }
p { color: var(--text2); line-height: 1.7; }
.hero-copy p { max-width: 660px; }
.hero-actions, .stats-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.stat { padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.stat strong { display: block; color: var(--text); font-family: var(--font-head); }
.hero-media { position: relative; }
.hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-amber); }
.floating-deal { position: absolute; right: 18px; bottom: 18px; padding: 12px 14px; background: rgba(10,10,15,.88); border: 1px solid var(--accent); border-radius: var(--radius); font-weight: 800; }

.section { padding: 42px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.feature-strip, .category-grid, .product-grid, .testimonial-grid, .admin-grid { display: grid; gap: 16px; }
.feature-strip { grid-template-columns: repeat(5, 1fr); padding: 18px; background: var(--surface); border-block: 1px solid var(--border); }
.feature { padding: 16px; border-radius: var(--radius); }
.feature b, .category-card b { display: block; margin-bottom: 6px; }
.feature span, .category-card span { color: var(--text2); font-size: 13px; }
.category-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.category-card, .panel, .product-card, .testimonial, .auth-card, .admin-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.category-card { padding: 20px; min-height: 112px; }
.category-card:hover, .product-card:hover { border-color: rgba(245,158,11,.55); transform: translateY(-4px); box-shadow: var(--shadow-amber); }
.product-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.product-card { overflow: hidden; transition: .2s ease; }
.product-image { position: relative; display: block; background: #111; aspect-ratio: 16 / 10; overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.product-card:hover .product-image img { transform: scale(1.04); }
.badge { position: absolute; left: 10px; top: 10px; z-index: 2; padding: 5px 8px; border-radius: 999px; background: var(--accent); color: #111; font-size: 11px; font-weight: 900; }
.wishlist-btn { position: absolute; right: 10px; top: 10px; z-index: 2; width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 50%; background: rgba(10,10,15,.76); color: var(--text); cursor: pointer; }
.product-body { padding: 14px; }
.product-meta, .price-row, .cart-line, .summary-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.product-meta { color: var(--text2); font-size: 12px; margin-bottom: 10px; }
.product-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; font-weight: 800; }
.rating { margin: 10px 0; color: var(--accent-light); font-size: 13px; }
.rating span { color: var(--text2); }
.price { color: var(--accent); font-weight: 900; font-size: 18px; }
.old-price { color: var(--text2); text-decoration: line-through; font-size: 13px; }
.condition-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 800; }
.condition-new { background: var(--green); color: #fff; }
.condition-like-new { background: var(--blue); color: #fff; }
.condition-used { background: var(--accent); color: #111; }
.condition-refurbished { background: var(--purple); color: #fff; }

.deal-banner { display: grid; grid-template-columns: 1fr 280px 1fr; gap: 24px; align-items: center; padding: 24px; background: linear-gradient(135deg, rgba(245,158,11,.16), rgba(59,130,246,.10)); border: 1px solid var(--border); border-radius: var(--radius); }
.deal-banner img { aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); }
.countdown { display: flex; gap: 8px; margin: 16px 0; }
.countdown span { display: grid; place-items: center; min-width: 56px; padding: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); font-weight: 900; }
.newsletter { background: var(--accent); color: #111; padding: 28px; border-radius: var(--radius); display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.newsletter p { color: rgba(0,0,0,.72); }
.newsletter-form { display: flex; gap: 8px; background: #fff; padding: 6px; border-radius: 999px; }
.newsletter-form input { border: 0; min-width: 260px; padding: 0 12px; outline: 0; }

.shop-layout, .checkout-layout, .account-layout, .product-detail, .cart-layout { display: grid; gap: 24px; align-items: start; }
.shop-layout { grid-template-columns: 260px 1fr; }
.sidebar, .summary-card { position: sticky; top: 86px; }
.panel { padding: 18px; }
.filter-group { margin-bottom: 18px; }
.filter-group label { display: block; color: var(--text2); margin: 8px 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--text2); font-size: 13px; }
.field input, .field select, .field textarea, .input {
    width: 100%; border: 1px solid var(--border); background: #101018; color: var(--text); border-radius: var(--radius); padding: 12px; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--accent); }
.alert { padding: 12px 14px; border-radius: var(--radius); margin-bottom: 16px; background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.35); color: #fecaca; }
.success { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.35); color: #bbf7d0; }
.setup-alert { margin: 18px auto; width: min(920px, calc(100% - 32px)); padding: 14px; border: 1px solid var(--accent); background: rgba(245,158,11,.12); border-radius: var(--radius); }

.product-detail { grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); padding: 36px 0; }
.gallery-main img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }
.gallery-main video { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #000; border-radius: var(--radius); border: 1px solid var(--border); }
.thumbs { display: flex; gap: 10px; margin-top: 10px; }
.thumbs img { width: 76px; height: 60px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 1px solid var(--border); }
.qty-row { display: flex; gap: 10px; margin: 18px 0; }
.qty-row input { width: 82px; text-align: center; }
.tabs { margin-top: 28px; }
.tab-buttons { display: flex; gap: 8px; border-bottom: 1px solid var(--border); }
.tab-buttons button { background: transparent; border: 0; color: var(--text2); padding: 12px; cursor: pointer; }
.tab-buttons button.active { color: var(--accent); border-bottom: 2px solid var(--accent); }
.tab-panel { padding: 18px 0; }

.cart-layout, .checkout-layout { grid-template-columns: minmax(0, 1fr) 340px; padding: 34px 0; }
.cart-item { display: grid; grid-template-columns: 88px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cart-item img { width: 88px; height: 70px; object-fit: cover; border-radius: 6px; }
.qty-controls { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.qty-controls button { width: 34px; height: 34px; border: 0; background: var(--surface-raised); color: var(--text); cursor: pointer; }
.qty-controls input { width: 46px; height: 34px; border: 0; background: #101018; color: var(--text); text-align: center; }
.summary-card { padding: 18px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius); }
.summary-row { padding: 10px 0; border-bottom: 1px solid var(--border); }
.summary-total { font-size: 22px; font-weight: 900; color: var(--accent); }
.progress { height: 8px; background: #0f0f16; border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); }

.auth-wrap { min-height: 72vh; display: grid; place-items: center; padding: 36px 16px; }
.auth-card { width: min(460px, 100%); padding: 28px; border-top: 3px solid var(--accent); }
.account-layout { grid-template-columns: 260px 1fr; padding: 34px 0; }
.account-nav a { display: block; padding: 11px 12px; border-radius: 6px; color: var(--text2); }
.account-nav a.active, .account-nav a:hover { background: rgba(245,158,11,.12); color: var(--accent); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; }
th { color: var(--text2); font-size: 12px; text-transform: uppercase; }
.status { padding: 5px 8px; border-radius: 999px; background: rgba(59,130,246,.15); color: #bfdbfe; font-size: 12px; font-weight: 800; }

.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: #0f0f16; border-right: 1px solid var(--border); padding: 18px; position: sticky; top: 0; height: 100vh; }
.admin-sidebar nav { display: grid; gap: 6px; margin-top: 20px; }
.admin-sidebar a { padding: 10px 12px; border-radius: 6px; color: var(--text2); }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(245,158,11,.12); color: var(--accent); }
.admin-main { padding: 26px; }
.admin-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.admin-card { padding: 18px; }

.site-footer { display: flex; justify-content: space-between; gap: 24px; padding: 30px clamp(16px,3vw,36px); border-top: 1px solid var(--border); color: var(--text2); }
.footer-links { display: flex; gap: 14px; }
.mobile-cart-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; display: none; align-items: center; justify-content: space-between; padding: 10px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(0,0,0,.45); }
.reveal { opacity: 0; transform: translateY(14px); transition: .45s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 1023px) {
    .site-header { grid-template-columns: 1fr auto; }
    .header-search { grid-column: 1 / -1; order: 3; }
    .main-nav { display: none; grid-column: 1 / -1; flex-wrap: wrap; }
    .main-nav.open { display: flex; }
    .mobile-nav-toggle { display: inline-flex; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 9px 12px; }
    .hero, .deal-banner, .shop-layout, .product-detail, .cart-layout, .checkout-layout, .account-layout { grid-template-columns: 1fr; }
    .sidebar, .summary-card { position: static; }
    .feature-strip { grid-template-columns: repeat(2, 1fr); }
    .newsletter { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .container { width: min(100% - 22px, 1600px); }
    .feature-strip, .form-grid { grid-template-columns: 1fr; }
    .newsletter-form { border-radius: var(--radius); flex-direction: column; }
    .newsletter-form input { min-width: 0; padding: 12px; }
    .cart-item { grid-template-columns: 72px 1fr; }
    .cart-line { grid-column: 1 / -1; }
    .mobile-cart-bar { display: flex; }
    .site-footer { display: block; }
}
