:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #2563eb;
    --brand-d: #1d4ed8;
    --brand-2: #06b6d4;
    --brand-soft: #eff6ff;
    --sale: #f97316;
    --ok: #16a34a;
    --warn: #d97706;
    --danger: #dc2626;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 20px rgba(15, 23, 42, .06);
    --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; padding-bottom: 64px; }
@media (min-width: 900px) { body { padding-bottom: 0; } }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.75rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.sr-only, .skip-link:not(:focus) { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html, body { overflow-x: clip; } /* safety net: nothing may cause sideways scrolling on phones */
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 8px; }
.small { font-size: .875rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 24px; }
.hide { display: none !important; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 10px; border: 1px solid transparent; font: 600 .95rem var(--font); cursor: pointer; text-decoration: none !important; transition: background .15s, transform .05s, box-shadow .15s; line-height: 1.2; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-d); }
.btn-accent { background: linear-gradient(135deg, #f97316, #f59e0b); color: #fff; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-danger { background: #fff; color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 7px 12px; font-size: .85rem; border-radius: 8px; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], input[type=url], input[type=date], select, textarea {
    width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 1rem; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
textarea { min-height: 110px; resize: vertical; }
.field { margin-bottom: 16px; }
.field-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } .field-row.three { grid-template-columns: 1fr 1fr 1fr; } }
.checkbox { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.checkbox input { width: 18px; height: 18px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid; font-weight: 500; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-info { background: var(--brand-soft); border-color: #bfdbfe; color: #1e40af; }
.alert-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* ---------- Header ---------- */
.announce { background: linear-gradient(90deg, #f97316, #db2777); color: #fff; text-align: center; font-size: .88rem; font-weight: 600; padding: 7px 16px; }
.topbar { background: #0f172a; color: #cbd5e1; font-size: .82rem; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; min-height: 34px; gap: 12px; }
.topbar a { color: #e2e8f0; margin-left: 16px; }
@media (max-width: 700px) { .topbar-in > span { display: none; } .topbar nav { margin: 0 auto; } .topbar a { margin: 0 8px; } }
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-in { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.logo { display: inline-flex; color: var(--ink); flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.logo-light, .admin-side .logo { color: #fff; }
.logo-light tspan, .admin-side .logo tspan { fill: #38bdf8; }
a.feature { color: var(--ink); text-decoration: none; }
a.feature:hover { border-color: var(--brand); }
.search { flex: 1; display: flex; min-width: 0; order: 3; flex-basis: 100%; }
.search input { border-radius: 10px 0 0 10px; border-right: 0; background: var(--bg); }
.search button { border: 0; background: var(--brand); color: #fff; padding: 0 16px; border-radius: 0 10px 10px 0; cursor: pointer; }
.header-actions { display: flex; gap: 6px; margin-left: auto; }
.h-icon { position: relative; display: flex; align-items: center; gap: 6px; color: var(--ink); padding: 8px 10px; border-radius: 10px; font-weight: 600; font-size: .9rem; }
.h-icon:hover { background: var(--bg); text-decoration: none; }
.h-label { display: none; }
.cart-count { position: absolute; top: 0; left: 24px; background: var(--sale); color: #fff; font-size: .7rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.nav-toggle { display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; padding: 0 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
.main-nav { display: none; border-top: 1px solid var(--line); }
.main-nav.open { display: block; }
.nav-in { display: flex; flex-direction: column; padding-top: 6px; padding-bottom: 10px; }
.main-nav a { color: var(--ink-2); font-weight: 600; font-size: .92rem; text-decoration: none; }
.main-nav a:hover { color: var(--brand); }
.nav-top { display: flex; justify-content: space-between; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.caret { font-size: .7rem; color: var(--muted); }
.nav-drop { display: none; padding: 4px 0 8px 12px; border-bottom: 1px solid var(--line); }
.nav-item.open .nav-drop { display: grid; }
.nav-drop a { padding: 8px 4px; font-weight: 500; display: flex; gap: 8px; align-items: center; }
.nav-drop .nd-all { color: var(--brand); font-weight: 700; }
.nd-ic { width: 22px; text-align: center; }
@media (min-width: 900px) {
    .search { order: 0; flex-basis: auto; max-width: 560px; margin: 0 auto; }
    .h-label { display: inline; }
    .nav-toggle { display: none; }
    .main-nav { display: block; }
    .nav-in { flex-direction: row; flex-wrap: nowrap; gap: 0 26px; padding-top: 0; padding-bottom: 0; align-items: center; }
    .nav-top { border: 0; padding: 12px 0; gap: 4px; white-space: nowrap; }
    .nav-item { position: relative; }
    .nav-drop { position: absolute; top: 100%; left: -14px; min-width: 250px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; z-index: 60; }
    .nav-item:hover .nav-drop, .nav-item:focus-within .nav-drop { display: grid; }
    .nav-drop a { padding: 9px 10px; border-radius: 8px; }
    .nav-drop a:hover { background: var(--brand-soft); }
    .nav-drop .nd-all { border-top: 1px solid var(--line); margin-top: 4px; border-radius: 0 0 8px 8px; }
}
.subcat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.subcat-chips a { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.subcat-chips a.active, .subcat-chips a:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); text-decoration: none; }
.subcat-chips small { color: var(--muted); font-weight: 500; }
.sidebar-box ul.sub { padding-left: 12px; border-left: 2px solid var(--line); margin: 2px 0 6px 4px; }
.sidebar-box ul.sub a { font-size: .86rem; padding: 5px 0; }

/* ---------- Hero ---------- */
.hero { background: radial-gradient(1200px 400px at 80% -10%, rgba(6, 182, 212, .35), transparent), linear-gradient(135deg, #0b1d4d 0%, #1d4ed8 60%, #0891b2 100%); color: #fff; }
.hero-in { display: grid; gap: 32px; padding: 48px 16px; align-items: center; }
@media (min-width: 900px) { .hero-in { grid-template-columns: 1.15fr 1fr; padding: 72px 16px; } }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3.1rem); font-weight: 800; }
.hero h1 span { background: linear-gradient(90deg, #67e8f9, #fde68a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.1rem; color: #dbeafe; max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero .btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.hero-stats { display: flex; gap: 28px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats strong { display: block; font-size: 1.5rem; }
.hero-stats span { color: #bfdbfe; font-size: .85rem; }
.hero-card { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); border-radius: 20px; padding: 22px; backdrop-filter: blur(6px); }
.hero-card .hk { background: #0f172a; border-radius: 12px; padding: 14px; font-family: ui-monospace, Consolas, monospace; font-size: 1rem; letter-spacing: .06em; color: #67e8f9; margin: 12px 0; text-align: center; }
.hero-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hero-card li { display: flex; gap: 10px; align-items: center; }

/* ---------- Sections ---------- */
.section { padding: 40px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .cat-grid { grid-template-columns: repeat(6, 1fr); } }
.cat-subs { font-size: .75rem; color: var(--muted); line-height: 1.4; }
.cat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--ink); display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .15s; }
.cat-card:hover { border-color: var(--brand); transform: translateY(-2px); text-decoration: none; }
.cat-card .ic { font-size: 1.7rem; }
.cat-card strong { font-size: .98rem; }
.cat-card span { font-size: .8rem; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 900px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature { background: var(--card); border-radius: var(--radius); padding: 18px; border: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.feature .ic { font-size: 1.5rem; line-height: 1; }
.feature strong { display: block; font-size: .95rem; }
.feature span { font-size: .82rem; color: var(--muted); }

/* ---------- Product grid & cards ---------- */
.grid-products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .grid-products { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1100px) { .grid-products { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.shop-layout .grid-products { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1100px) { .shop-layout .grid-products { grid-template-columns: repeat(3, 1fr); } }
.card-product { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.card-product:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.cp-img { position: relative; background: #f1f5f9; aspect-ratio: 1; display: block; }
.cp-img img { width: 100%; height: 100%; object-fit: cover; }
.badge-sale { position: absolute; top: 10px; left: 10px; background: var(--sale); color: #fff; font-weight: 700; font-size: .78rem; padding: 3px 8px; border-radius: 6px; z-index: 1; }
.cp-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cp-meta { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.cp-title { font-size: .95rem; margin: 0; font-weight: 700; flex: 1; }
.cp-title a { color: var(--ink); }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price strong { font-size: 1.1rem; color: var(--ink); }
.price del { color: var(--muted); font-size: .85rem; }
.card-product .btn { padding: 9px 12px; font-size: .88rem; }
@media (min-width: 700px) { .cp-body { padding: 16px; } }

/* ---------- Shop ---------- */
.page-head { background: #fff; border-bottom: 1px solid var(--line); padding: 22px 0; }
.page-head h1 { margin: 6px 0 4px; }
.breadcrumb { font-size: .85rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb span::before { content: '/'; margin: 0 8px; color: #cbd5e1; }
.shop-layout { display: grid; gap: 24px; padding-top: 24px; padding-bottom: 40px; }
@media (min-width: 900px) { .shop-layout { grid-template-columns: 250px 1fr; } }
.sidebar-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.sidebar-box h2 { font-size: 1rem; }
.sidebar-box ul { list-style: none; margin: 0; padding: 0; }
.sidebar-box li a { display: flex; justify-content: space-between; padding: 7px 0; color: var(--ink-2); font-size: .92rem; }
.sidebar-box li a.active { color: var(--brand); font-weight: 700; }
@media (max-width: 899px) {
    .shop-sidebar { display: flex; gap: 8px; overflow-x: auto; }
    .shop-sidebar .sidebar-box { margin: 0; padding: 0; border: 0; background: none; }
    .shop-sidebar .sidebar-box h2, .shop-sidebar .price-box { display: none; }
    .shop-sidebar ul { display: flex; gap: 8px; }
    .shop-sidebar li a { white-space: nowrap; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
    .shop-sidebar li a small { display: none; }
}
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar select { width: auto; padding: 8px 12px; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-weight: 600; }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.empty { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px 20px; text-align: center; color: var(--muted); }

/* ---------- Product page ---------- */
.product-top { display: grid; gap: 28px; padding-top: 24px; padding-bottom: 24px; }
@media (min-width: 900px) { .product-top { grid-template-columns: 1fr 1.1fr; gap: 44px; padding-top: 36px; padding-bottom: 36px; } }
.product-media { background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; aspect-ratio: 1; position: relative; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: clamp(1.4rem, 3.4vw, 2rem); }
.rating-line { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); margin-bottom: 10px; }
.stars { color: #f59e0b; letter-spacing: 1px; }
.stars .off { color: #cbd5e1; }
.product-info .price strong { font-size: 1.9rem; }
.product-info .price del { font-size: 1.05rem; }
.save-tag { background: #dcfce7; color: #166534; font-weight: 700; font-size: .82rem; padding: 3px 9px; border-radius: 6px; }
.spec-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; padding: 0; list-style: none; }
.spec-list li { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: .88rem; }
.spec-list li b { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.buy-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.qty { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.qty button { width: 40px; border: 0; background: var(--bg); font-size: 1.2rem; cursor: pointer; }
.qty input { width: 50px; border: 0; text-align: center; border-radius: 0; padding: 10px 0; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.buy-row .btn { flex: 1; min-width: 150px; }
.trust-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; font-size: .92rem; color: var(--ink-2); }
.stock { font-size: .88rem; font-weight: 600; }
.stock.in { color: var(--ok); }
.stock.low { color: var(--warn); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 12px 16px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.active, .tabs a:hover { color: var(--brand); border-color: var(--brand); text-decoration: none; }
.tab-panel { background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); padding: 22px; margin-bottom: 32px; }
.prose { max-width: 820px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.review { border-bottom: 1px solid var(--line); padding: 14px 0; }
.review:last-child { border: 0; }

/* ---------- Cart & checkout ---------- */
.cart-layout { display: grid; gap: 24px; padding-top: 24px; padding-bottom: 48px; }
@media (min-width: 900px) { .cart-layout { grid-template-columns: 1fr 360px; align-items: start; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.cart-item { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item:first-child { padding-top: 0; }
.cart-item img { border-radius: 10px; width: 72px; height: 72px; object-fit: cover; }
.cart-item h3 { font-size: .98rem; margin: 0 0 4px; }
.cart-item-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.link-btn { background: none; border: 0; color: var(--danger); font: 600 .85rem var(--font); cursor: pointer; padding: 0; }
.sum-row { display: flex; justify-content: space-between; padding: 8px 0; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 1.15rem; font-weight: 800; }
.coupon-form { display: flex; gap: 8px; margin: 14px 0; }
.coupon-form input { text-transform: uppercase; }
.pay-box { max-width: 520px; margin: 40px auto; text-align: center; }

/* ---------- Auth ---------- */
.auth-wrap { max-width: 440px; margin: 40px auto 60px; padding: 0 16px; }
.auth-wrap .panel { padding: 28px; }
.auth-wrap h1 { font-size: 1.6rem; text-align: center; }

/* ---------- Account / dashboard ---------- */
/* minmax(0,1fr) + min-width:0 stop wide children (menus, tables) from stretching the page past the screen */
.dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 20px; padding-bottom: 48px; }
.dash > * { min-width: 0; }
@media (min-width: 900px) { .dash { grid-template-columns: 240px minmax(0, 1fr); gap: 24px; padding-top: 24px; } }
/* Phone: menu is a grid of tiles (icon above label) so every section is visible */
.dash-nav { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.dash-nav a, .dash-nav-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 10px 4px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: .78rem; line-height: 1.2; min-height: 64px; }
.dash-nav .dn-ico { font-size: 1.25rem; line-height: 1; }
.dash-nav a.active, .dash-nav a:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.dash-nav-out { display: contents; }
.dash-nav-btn { width: 100%; background: none; border: 0; cursor: pointer; font-family: inherit; color: var(--danger); }
.dash-nav-btn:hover { background: #fef2f2; }
@media (min-width: 560px) { .dash-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 900px) {
    .dash-nav { display: flex; flex-direction: column; gap: 2px; padding: 10px; align-self: start; position: sticky; top: 140px; }
    .dash-nav a, .dash-nav-btn { flex-direction: row; justify-content: flex-start; gap: 8px; text-align: left; padding: 10px 14px; font-size: .93rem; min-height: 0; }
    .dash-nav .dn-ico { font-size: 1rem; width: 1.3em; text-align: center; }
}
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-width: 0; }
.stat span { color: var(--muted); font-size: .82rem; font-weight: 600; }
.stat strong { display: block; font-size: clamp(1.05rem, 4.6vw, 1.5rem); margin-top: 4px; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f8fafc; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-processing { background: #dbeafe; color: #1e40af; }
.status-completed { background: #dcfce7; color: #166534; }
.status-cancelled, .status-refunded { background: #f1f5f9; color: #475569; }
.key-box { display: flex; align-items: stretch; gap: 8px; margin-top: 8px; }
.key-box code { flex: 1; background: #0f172a; color: #67e8f9; padding: 10px 14px; border-radius: 10px; font-family: ui-monospace, Consolas, monospace; font-size: .98rem; letter-spacing: .04em; word-break: break-all; white-space: pre-wrap; }
.order-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; background: #fff; }
.order-item-head { display: flex; gap: 14px; align-items: center; }
.order-item-head img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.order-item-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.dl-card { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.dl-card img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
@media (min-width: 700px) { .dl-card { grid-template-columns: 64px 1fr auto; } }

/* ---------- Content pages ---------- */
.content-page { padding-top: 28px; padding-bottom: 48px; }
.content-page .panel { padding: 28px; }
details.faq { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
details.faq summary { font-weight: 700; cursor: pointer; }
details.faq[open] summary { margin-bottom: 8px; color: var(--brand); }
.seo-text { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; color: var(--ink-2); }
.seo-text h2 { font-size: 1.25rem; color: var(--ink); }
.seo-text h3 { margin-top: 1.2em; }

/* ---------- Footer ---------- */
.site-footer { background: #0b1224; color: #94a3b8; margin-top: 40px; font-size: .88rem; }
.footer-top { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 20px; border-bottom: 1px solid #1e293b; }
.footer-tag { margin: 0; flex: 1; min-width: 220px; }
.footer-top .newsletter { margin: 0; }
.footer-cols { display: grid; padding-top: 8px; padding-bottom: 16px; }
.fcol { border-bottom: 1px solid #1e293b; }
.fcol summary { color: #fff; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 14px 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.fcol summary::-webkit-details-marker { display: none; }
.fcol summary::after { content: '+'; font-size: 1rem; color: #64748b; }
.fcol[open] summary::after { content: '−'; }
.fcol ul { padding-bottom: 14px; }
.social { display: flex; gap: 8px; margin: 4px 0 14px; }
.social a { width: 34px; height: 34px; border-radius: 50%; background: #1e293b; display: grid; place-items: center; color: #e2e8f0; }
.social a:hover { background: var(--brand); color: #fff; }
@media (min-width: 900px) {
    .footer-cols { grid-template-columns: 1.1fr 1.1fr 1fr 1.1fr 1.3fr; gap: 28px; padding-top: 28px; padding-bottom: 20px; }
    .fcol { border: 0; }
    .fcol summary { pointer-events: none; padding: 0 0 12px; }
    .fcol summary::after { display: none; }
    .fcol ul { padding-bottom: 0; }
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; line-height: 1.35; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 14px; padding-bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; font-size: .8rem; }
.footer-legal { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-legal a { color: #94a3b8; }

.mobile-bar { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); z-index: 60; padding-bottom: env(safe-area-inset-bottom); }
.mobile-bar a { display: flex; flex-direction: column; align-items: center; padding: 7px 0 8px; font-size: .72rem; font-weight: 600; color: var(--ink-2); }
.mobile-bar span { font-size: 1.2rem; line-height: 1.2; }
@media (min-width: 900px) { .mobile-bar { display: none; } }
.wa-float { position: fixed; right: 16px; bottom: 80px; width: 54px; height: 54px; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); z-index: 55; }
@media (min-width: 900px) { .wa-float { bottom: 24px; } }

/* ---------- Admin ---------- */
.admin-body { padding-bottom: 0; }
.admin { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1fr); align-content: start; }
@media (min-width: 960px) { .admin { grid-template-columns: 240px minmax(0, 1fr); align-content: stretch; } }
.admin-side { background: #0b1224; color: #cbd5e1; padding: 16px; }
.admin-side .logo { color: #fff; margin: 4px 4px 18px; }
.admin-side nav { display: flex; gap: 4px; overflow-x: auto; align-items: center; }
@media (min-width: 960px) { .admin-side nav { align-items: stretch; } }
@media (min-width: 960px) { .admin-side nav { flex-direction: column; } .admin-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; } }
.admin-side nav a { color: #cbd5e1; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.admin-side nav a.active, .admin-side nav a:hover { background: #1e293b; color: #fff; text-decoration: none; }
.admin-main { padding: 20px 16px 48px; min-width: 0; }
@media (min-width: 960px) { .admin-main { padding: 28px 32px 48px; } }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-top h1 { margin: 0; font-size: 1.5rem; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.inline { display: inline; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters input, .filters select { width: auto; flex: 1; min-width: 140px; }
.grid-2 { display: grid; gap: 20px; }
@media (min-width: 1100px) { .grid-2 { grid-template-columns: 2fr 1fr; } }
.admin-nav-group { display: none; }
@media (min-width: 960px) { .admin-nav-group { display: block; color: #64748b; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 14px 12px 4px; } }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; }

/* ---------- Payments ---------- */
.status-verifying { background: #ede9fe; color: #5b21b6; }
.gw-list { display: grid; gap: 10px; text-align: left; }
.gw-option { display: flex; flex-direction: column; gap: 2px; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--ink); background: #fff; }
.gw-option:hover { border-color: var(--brand); background: var(--brand-soft); text-decoration: none; }
.gw-option span { color: var(--muted); font-size: .88rem; }
.upi-qr { display: flex; justify-content: center; margin: 12px auto; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; width: max-content; }
.upi-app-btn { display: flex; }
@media (min-width: 900px) { .upi-app-btn { display: none; } }

/* ---------- Tickets ---------- */
.msg { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.msg-admin { background: var(--brand-soft); border-color: #bfdbfe; margin-left: 24px; }
.msg-customer { margin-right: 24px; }
.msg-head { display: flex; justify-content: space-between; gap: 10px; font-size: .85rem; margin-bottom: 6px; flex-wrap: wrap; }
.msg-head span { color: var(--muted); }

/* ---------- Newsletter & logo ---------- */
.newsletter { display: flex; margin-top: 14px; max-width: 340px; flex-basis: 100%; }
.newsletter input[type=email] { background: #111a33; border: 1px solid #1e293b; color: #fff; border-radius: 8px 0 0 8px; padding: 9px 12px; font-size: .88rem; }
.newsletter button { border: 0; background: var(--brand); color: #fff; font: 600 .85rem var(--font); padding: 0 14px; border-radius: 0 8px 8px 0; cursor: pointer; }
.logo-img { height: 40px; width: auto; max-width: 200px; object-fit: contain; }

/* ---------- Search suggestions, switches, bought-together ---------- */
.search { position: relative; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 70; overflow: hidden; }
.suggest a { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; color: var(--ink); font-size: .9rem; }
.suggest a:hover { background: var(--brand-soft); text-decoration: none; }
.suggest img { border-radius: 6px; width: 36px; height: 36px; object-fit: cover; }
.suggest strong { font-size: .85rem; white-space: nowrap; }
.suggest .suggest-all { display: block; color: var(--brand); font-weight: 600; border-top: 1px solid var(--line); }
.tb-switch { display: inline-flex; align-items: center; gap: 8px; margin-left: 16px; }
.tb-switch a { margin: 0 !important; font-weight: 600; }
.tb-switch select { width: auto; padding: 1px 4px; font-size: .78rem; background: #1e293b; color: #e2e8f0; border: 1px solid #334155; border-radius: 6px; }
.fbt { margin-bottom: 24px; }
.fbt-row { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.fbt-item { display: flex; flex-direction: column; gap: 6px; width: 150px; font-size: .85rem; color: var(--ink); }
.fbt-item img { border-radius: 10px; width: 72px; height: 72px; object-fit: cover; }
.fbt-plus { align-self: center; font-size: 1.4rem; color: var(--muted); }
.status-review { background: #fee2e2; color: #991b1b; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding-top: 10px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 4px; }
.bar-col .bar { width: 100%; background: linear-gradient(180deg, var(--brand-2), var(--brand)); border-radius: 4px 4px 0 0; }
.bar-col span { font-size: .65rem; color: var(--muted); height: 14px; }

/* ---------- Tools ---------- */
.tool-wrap { max-width: 860px; }
.tool-wrap h3 { font-size: 1rem; margin: 16px 0 6px; }
.tool-others { margin-top: 32px; }
kbd { background: #f1f5f9; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; font-size: .85em; font-family: inherit; }
@media (max-width: 899px) { .shop-sidebar ul.sub { display: none; } }

/* ---------- Guides ---------- */
.guide-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.guide-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--ink); display: flex; flex-direction: column; gap: 8px; }
.guide-card:hover { border-color: var(--brand); text-decoration: none; }
.guide-card span { color: var(--muted); font-size: .88rem; }
.guide-card em { color: var(--brand); font-style: normal; font-weight: 600; font-size: .88rem; margin-top: auto; }
.prose table { width: 100%; border: 1px solid var(--line); border-radius: 10px; margin: 12px 0; display: block; overflow-x: auto; }
.prose code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: .9em; }

/* ---------- Chat assistant ---------- */
.bot-fab { position: fixed; right: 16px; bottom: 80px; width: 56px; height: 56px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 8px 22px rgba(37, 99, 235, .35); display: grid; place-items: center; cursor: pointer; z-index: 70; }
.wa-float { bottom: 146px; }
@media (min-width: 900px) { .bot-fab { bottom: 24px; } .wa-float { bottom: 90px; } }
.bot-panel { position: fixed; right: 16px; bottom: 80px; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 110px)); background: #fff; border-radius: 18px; box-shadow: 0 20px 50px rgba(15, 23, 42, .25); display: flex; flex-direction: column; overflow: hidden; z-index: 80; border: 1px solid var(--line); }
.bot-panel[hidden] { display: none; }
@media (min-width: 900px) { .bot-panel { bottom: 24px; } }
.bot-open .bot-fab, .bot-open .wa-float { display: none; }
.bot-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: linear-gradient(135deg, #1d4ed8, #0891b2); color: #fff; }
.bot-head span { display: block; font-size: .75rem; color: #bbf7d0; }
.bot-head button { background: none; border: 0; color: #fff; font-size: 1.1rem; cursor: pointer; }
.bot-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.bot-msg { max-width: 88%; padding: 10px 12px; border-radius: 14px; font-size: .9rem; line-height: 1.45; word-wrap: break-word; }
.bot-msg ul, .bot-msg ol { margin: 6px 0; padding-left: 18px; }
.bot-msg li { margin-bottom: 5px; }
.bot-msg p { margin: 6px 0; }
.bot-msg h3 { font-size: .9rem; margin: 10px 0 4px; }
.bot-msg code { background: #f1f5f9; padding: 1px 4px; border-radius: 4px; font-size: .8rem; word-break: break-all; }
.bot-msg .muted { color: var(--muted); }
.bot-bot { background: #fff; border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.bot-user { background: var(--brand); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.bot-typing { color: var(--muted); letter-spacing: 2px; }
.bot-product { margin: 6px 0; padding: 8px; background: var(--bg); border-radius: 8px; }
.bot-chips { display: flex; gap: 6px; padding: 8px 12px 0; flex-wrap: wrap; background: #fff; }
.bot-chips button { border: 1px solid #bfdbfe; background: var(--brand-soft); color: var(--brand-d); border-radius: 999px; padding: 5px 10px; font: 600 .78rem var(--font); cursor: pointer; }
.bot-form { display: flex; gap: 8px; padding: 10px 12px 12px; background: #fff; }
.bot-form input { border-radius: 999px; padding: 10px 14px; }
.bot-form button { border: 0; background: var(--brand); color: #fff; width: 42px; border-radius: 50%; cursor: pointer; flex-shrink: 0; }

/* ---------- Blog: product box inside articles ---------- */
.prose .blog-product { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 14px 0; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; background: #f8fafc; color: var(--ink); text-decoration: none; }
.prose .blog-product:hover { border-color: var(--brand); background: var(--brand-soft); text-decoration: none; }
.blog-product .bp-name { font-weight: 700; flex: 1 1 220px; }
.blog-product .bp-price { font-weight: 800; color: var(--brand); }
.blog-product .bp-buy { background: var(--brand); color: #fff; padding: 7px 14px; border-radius: 8px; font-weight: 700; font-size: .9rem; }
.prose .faq h3 { font-size: 1.02rem; margin: 18px 0 4px; }
.prose table { margin: 14px 0; }
.prose .table-wrap { margin: 14px 0; }
.related-guides { margin-top: 18px; }
.related-guides a { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; font-weight: 600; }