/* ============================================================
   P4SHOP - storefront styles
   Lightweight: no frameworks, system fonts, GPU-friendly.
   ============================================================ */

:root {
    --brand: #068eb8;
    --brand-dark: #056f91;
    --brand-light: #e6f6fb;
    --accent: #FFBA00;
    --accent-dark: #e0a300;
    --text: #1f2430;
    --muted: #6b7280;
    --line: #e8eaee;
    --bg: #f5f7f9;
    --white: #ffffff;
    --success: #16a34a;
    --danger: #dc2626;
    --warn: #d97706;
    --radius: 10px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --shadow-lg: 0 8px 24px rgba(16, 24, 40, .12);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--brand); }
h1, h2, h3, h4 { margin: 0 0 10px; line-height: 1.25; }
h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 10px; }
input, select, textarea, button { font: inherit; }
.hide { display: none !important; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 14px; }
.row { display: flex; gap: 16px; }
.grid { display: grid; gap: 14px; }
.section { padding: 26px 0 6px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 19px; }
.section-head .see-all { font-size: 13px; color: var(--brand); font-weight: 600; }
.section-head .see-all:hover { text-decoration: underline; }

/* ---------- top bar ---------- */
.topbar { background: var(--brand); color: #fff; font-size: 12.5px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 34px; }
.topbar a { color: #fff; opacity: .95; }
.topbar a:hover { opacity: 1; color: #fff; text-decoration: underline; }
.topbar .tagline { opacity: .95; }
.topbar .links { display: flex; gap: 16px; }

/* ---------- header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 60; }
.header-main { display: flex; align-items: center; gap: 18px; padding: 12px 0; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 24px; color: var(--brand); letter-spacing: -.5px; flex-shrink: 0; }
.logo img { height: 40px; width: auto; }
.logo span em { color: var(--accent); font-style: normal; }
.hamburger { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }

.search-bar { flex: 1; display: flex; background: var(--bg); border: 1.5px solid var(--line); border-radius: 40px; overflow: hidden; max-width: 620px; }
.search-bar input { flex: 1; border: 0; background: transparent; padding: 11px 16px; outline: none; font-size: 14px; }
.search-bar button { border: 0; background: var(--brand); color: #fff; padding: 0 20px; cursor: pointer; font-weight: 600; }
.search-bar button:hover { background: var(--brand-dark); }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.header-action { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 12.5px; color: var(--muted); }
.header-action:hover { background: var(--bg); color: var(--text); }
.header-action svg { width: 22px; height: 22px; stroke: var(--text); }
.header-action .label { line-height: 1.15; }
.header-action .label strong { display: block; color: var(--text); font-size: 13px; }
.cart-btn { position: relative; }
.cart-count { position: absolute; top: 2px; left: 24px; background: var(--accent); color: #402c00; font-size: 10.5px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }

/* ---------- category nav ---------- */
.cat-nav { background: var(--white); border-bottom: 1px solid var(--line); }
.cat-nav .container { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cat-nav .container::-webkit-scrollbar { display: none; }
.cat-nav a { padding: 10px 12px; font-size: 13.5px; font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; }
.cat-nav a:hover, .cat-nav a.active { color: var(--brand); border-bottom-color: var(--brand); }
.cat-nav .all-cats { font-weight: 700; display: flex; align-items: center; gap: 6px; }

/* ---------- mobile drawer ---------- */
.drawer { position: fixed; inset: 0 auto 0 0; width: 290px; background: #fff; z-index: 200; transform: translateX(-100%); transition: transform .25s ease; display: flex; flex-direction: column; }
.drawer.open { transform: none; box-shadow: var(--shadow-lg); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-body { overflow-y: auto; padding: 8px 0; }
.drawer-body a { display: block; padding: 12px 16px; font-size: 14px; border-bottom: 1px solid #f3f4f6; }
.drawer-body a:hover { background: var(--bg); }
.drawer-close { background: none; border: 0; font-size: 22px; cursor: pointer; line-height: 1; }
.backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 190; opacity: 0; pointer-events: none; transition: opacity .2s; }
.backdrop.show { opacity: 1; pointer-events: auto; }

/* ---------- mobile bottom nav ---------- */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); z-index: 80; }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; font-size: 10.5px; color: var(--muted); position: relative; }
.bottom-nav a.active, .bottom-nav a:hover { color: var(--brand); }
.bottom-nav svg { width: 21px; height: 21px; stroke: currentColor; }
.bottom-nav .cart-count { top: 2px; left: 50%; margin-left: 2px; }

/* ---------- banner fit modes (Admin > Settings > Branding) ---------- */
body.fit-cover .hero-slide .slide-img,
body.fit-cover .hero-side .slide-img { object-fit: cover; }
body.fit-cover .hero-slide .slide-bg,
body.fit-cover .hero-side .slide-bg { display: none; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-top: 18px; }
.hero-slider { position: relative; border-radius: var(--radius); overflow: hidden; background: #0b6b8c; aspect-ratio: 1 / 1; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease; overflow: hidden; }
.hero-slide.active { opacity: 1; }
.hero-slide > a { position: absolute; inset: 0; display: block; }
/* soft blurred backdrop = the same image, always fills the frame */
.hero-slide .slide-bg { position: absolute; inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); object-fit: cover; filter: blur(26px) saturate(1.15) brightness(.9); transform: scale(1.08); }
/* the real banner - always shown complete, never cropped */
.hero-slide .slide-img { position: relative; width: 100%; height: 100%; object-fit: contain; display: block; }
.hero-slide .hero-text { position: absolute; left: 30px; bottom: 26px; color: #fff; max-width: 62%; text-shadow: 0 2px 10px rgba(0,0,0,.55); z-index: 3; }
.hero-slide .hero-text h3 { font-size: 28px; margin-bottom: 4px; }
.hero-slide .hero-text p { font-size: 14.5px; opacity: .95; margin: 0; }
.hero-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; z-index: 5; }
.hero-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: rgba(255,255,255,.55); cursor: pointer; padding: 0; }
.hero-dots button.active { background: #fff; width: 22px; border-radius: 5px; }
.hero-side { display: contents; }
.hero-side a { border-radius: var(--radius); overflow: hidden; position: relative; background: var(--white); box-shadow: var(--shadow); display: block; aspect-ratio: 1 / 1; }
.hero-side .slide-bg { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); object-fit: cover; filter: blur(22px) saturate(1.15) brightness(.92); }
.hero-side .slide-img { position: relative; width: 100%; height: 100%; object-fit: contain; display: block; }
.hero-side .side-text { position: absolute; left: 14px; bottom: 12px; z-index: 3; text-shadow: 0 1px 8px rgba(255,255,255,.65); }
.hero-side .side-text strong { display: block; font-size: 15px; }
.hero-side .side-text small { color: #374151; }

/* ---------- trust badges ---------- */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 18px 0 4px; }
.trust-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px; display: flex; gap: 10px; align-items: center; }
.trust-item svg { width: 26px; height: 26px; stroke: var(--brand); flex-shrink: 0; }
.trust-item strong { display: block; font-size: 13.5px; }
.trust-item small { color: var(--muted); font-size: 12px; }

/* ---------- category tiles ---------- */
.cat-tiles { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.cat-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 6px; text-align: center; transition: .15s; }
.cat-tile:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-tile .thumb { width: 62px; height: 62px; margin: 0 auto 8px; border-radius: 50%; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.cat-tile .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-tile strong { font-size: 12.5px; font-weight: 600; display: block; line-height: 1.25; }

/* ---------- product cards ---------- */
.products-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.product-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: .15s; position: relative; }
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: #dbe1e8; }
.product-thumb { position: relative; background: #fff; padding: 10px 10px 4px; }
.product-thumb a { display: block; }
.product-thumb img { width: 100%; height: auto; aspect-ratio: 1/1; object-fit: contain; }
.badge-discount { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #4a3500; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; z-index: 2; }
.badge-out { position: absolute; top: 10px; left: 10px; background: #374151; color: #fff; font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 6px; z-index: 2; }
.wish-btn { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; }
.wish-btn svg { width: 16px; height: 16px; stroke: var(--muted); }
.wish-btn.active svg, .wish-btn:hover svg { stroke: var(--danger); fill: #ffe4e6; }
.product-body { padding: 0 11px 11px; display: flex; flex-direction: column; flex: 1; }
.product-title { font-size: 13.5px; font-weight: 600; line-height: 1.35; margin: 0 0 5px; min-height: 36px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-title a:hover { color: var(--brand); }
.price-row { display: flex; align-items: baseline; gap: 7px; margin-bottom: 8px; min-height: 24px; }
.deal-timer { font-size: 12px; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--muted); }
.price { font-size: 17px; font-weight: 800; color: var(--brand); }
.price-old { font-size: 12.5px; color: var(--muted); text-decoration: line-through; }
.btn-add { margin-top: auto; width: 100%; border: 0; background: var(--brand); color: #fff; padding: 9px 10px; border-radius: var(--radius-sm); font-weight: 600; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: .15s; }
.btn-add:hover { background: var(--brand-dark); }
.btn-add:disabled { background: #cbd5e1; cursor: not-allowed; }
.btn-add svg { width: 16px; height: 16px; stroke: #fff; }
.btn-add.adding { opacity: .7; pointer-events: none; }

/* ---------- horizontal product row (scroll on mobile) ---------- */
.product-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }

/* ---------- promo strip ---------- */
.promo-strip { border-radius: var(--radius); overflow: hidden; margin: 20px 0 4px; background: linear-gradient(90deg, var(--brand) 0%, #0aa5d4 100%); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 22px 28px; gap: 20px; }
.promo-strip h3 { font-size: 22px; margin: 0 0 4px; }
.promo-strip p { margin: 0; opacity: .92; }
.promo-strip img { max-height: 110px; border-radius: 8px; }

/* ---------- promo banner grid (strip banners + category cards) ---------- */
.promo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.promo-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #eef2f6; aspect-ratio: 1 / 1.18; }
.promo-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.promo-card:hover img { transform: scale(1.05); }
.promo-card .promo-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 16px 14px; background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, .74) 100%); color: #fff; font-weight: 700; font-size: 15px; line-height: 1.3; }
.promo-card .promo-label small { display: block; font-weight: 500; font-size: 12px; opacity: .88; margin-top: 2px; }

/* ---------- product page ---------- */
.breadcrumbs { font-size: 12.5px; color: var(--muted); padding: 14px 0 4px; }

/* ---------- smart bar ---------- */
.smart-bar { border-radius: var(--radius-sm); padding: 10px 16px; margin: 12px 0; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13.5px; font-weight: 600; text-align: center; }
.smart-bar a { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- sale alert popup ---------- */
.sale-alert { position: fixed; left: 18px; bottom: 18px; z-index: 250; display: none; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, .18); padding: 12px 34px 12px 12px; max-width: 370px; transform: translateY(16px); opacity: 0; transition: .35s; }
.sale-alert.show { display: flex; transform: none; opacity: 1; }
.sale-alert img { width: 60px; height: 60px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.sale-alert .sa-body { min-width: 0; font-size: 13px; line-height: 1.35; }
.sale-alert .sa-buyer { color: var(--muted); font-size: 12px; }
.sale-alert a { color: var(--text); }
.sale-alert a:hover strong { color: var(--brand); }
.sale-alert .sa-price { color: var(--brand); font-weight: 800; font-size: 14px; margin-top: 2px; }
.sale-alert .sa-note { color: var(--muted); font-size: 11.5px; }
.sale-alert .sa-close { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 18px; color: var(--muted); cursor: pointer; line-height: 1; }
@media (max-width: 720px) { .sale-alert { left: 10px; right: 10px; bottom: 74px; max-width: none; } }

/* ---------- app install (PWA) ---------- */
.app-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #fff !important; background: var(--brand); padding: 3px 11px; border-radius: 999px; transition: background .15s; }
.app-link:hover { background: var(--brand-dark, #056a8a); }
.app-link svg { stroke: #fff; }

/* the download icon blinks continuously to draw attention */
@keyframes appIconBlink {
    0%, 100% { opacity: 1; transform: translateY(0) scale(1); }
    50% { opacity: .35; transform: translateY(2px) scale(.88); }
}
@keyframes appRing {
    0% { opacity: .75; transform: scale(.82); }
    100% { opacity: 0; transform: scale(1.45); }
}
.blink-icon svg { animation: appIconBlink 1.15s ease-in-out infinite; }
.header-action.app-action { position: relative; }
.header-action.app-action::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand); animation: appRing 1.8s ease-out infinite; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
    .blink-icon svg, .header-action.app-action::after { animation: none; }
}

.app-modal { position: fixed; inset: 0; z-index: 320; background: rgba(15, 23, 42, .58); display: flex; align-items: center; justify-content: center; padding: 18px; }
.app-modal[hidden] { display: none; }
.app-modal-card { position: relative; width: 100%; max-width: 520px; background: #fff; border-radius: 16px; padding: 22px 22px 18px; box-shadow: 0 24px 60px rgba(16, 24, 40, .28); max-height: 90vh; overflow: auto; }
.app-modal-x { position: absolute; top: 10px; right: 14px; border: 0; background: none; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; }
.app-modal-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.app-modal-head img { border-radius: 14px; flex: 0 0 auto; }
.app-modal-head h3 { margin: 0 0 4px; font-size: 18px; }
.app-modal-head p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.app-install-btn { margin: 6px 0 14px; }
.app-steps { display: grid; gap: 8px; }
.app-step { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.45; }
.app-notify { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 12px; padding: 12px 14px; margin: 4px 0 14px; }
.app-notify-icon { font-size: 22px; line-height: 1; }
.app-notify-body { flex: 1; min-width: 200px; }
.app-notify-body strong { display: block; font-size: 14px; margin-bottom: 2px; }
.app-notify-body span { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.app-notify .btn { flex: 0 0 auto; }
.app-step strong { display: block; margin-bottom: 2px; }
.app-step span { color: #374151; }
.app-share { display: inline-block; border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; font-size: 11px; background: #fff; }
.app-modal-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; }

/* ---------- WhatsApp live chat ---------- */
.wa-chat { position: fixed; right: 18px; bottom: 18px; z-index: 260; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.wa-btn { display: inline-flex; align-items: center; gap: 9px; background: #25d366; color: #fff; border: 0; border-radius: 999px; padding: 11px 18px 11px 14px; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 10px 26px rgba(37, 211, 102, .40); transition: transform .15s, box-shadow .15s; }
.wa-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37, 211, 102, .48); }
.wa-btn svg { width: 22px; height: 22px; stroke: #fff; }
.wa-card { width: 322px; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 18px 48px rgba(16, 24, 40, .22); border: 1px solid var(--line); animation: waIn .22s ease; }
@keyframes waIn { from { opacity: 0; transform: translateY(10px); } }
.wa-head { display: flex; align-items: center; gap: 10px; background: #075e54; color: #fff; padding: 12px 14px; }
.wa-head .wa-avatar { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .16); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.wa-head .wa-avatar svg { width: 18px; height: 18px; stroke: #fff; }
.wa-head strong { display: block; font-size: 14px; }
.wa-head small { opacity: .82; font-size: 11.5px; }
.wa-head .wa-x { margin-left: auto; background: none; border: 0; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; opacity: .8; padding: 0 2px; }
.wa-head .wa-x:hover { opacity: 1; }
.wa-body { padding: 14px; background: #ece5dd; }
.wa-bubble { background: #fff; border-radius: 10px 10px 10px 2px; padding: 9px 12px; font-size: 13px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); margin-bottom: 10px; }
.wa-body .form-control { font-size: 13px; }
.wa-send { display: flex; align-items: center; justify-content: center; gap: 7px; background: #25d366; color: #fff; font-weight: 700; font-size: 13.5px; padding: 11px 14px; }
.wa-send:hover { background: #1fb457; color: #fff; }
.wa-send svg { width: 15px; height: 15px; stroke: #fff; }
@media (max-width: 720px) {
    .wa-chat { right: 12px; bottom: 78px; }
    .wa-hide-mobile { display: none !important; }
    .wa-card { width: min(322px, calc(100vw - 24px)); }
    .wa-btn .wa-label { display: none; }
    .wa-btn { padding: 13px; border-radius: 50%; }
    /* keep the sale-alert popup clear of the chat button on phones */
    body.has-wa-chat .sale-alert { right: 70px; }
}

/* ---------- product extras: size guide, warranty, notes ---------- */
.pd-extra { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 12px 0; background: #f8fafc; font-size: 13.5px; }
.pd-extra strong { display: block; margin-bottom: 4px; }
.pd-extra .muted { color: var(--muted); }
.notes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.note-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; font-size: 13.5px; }
.note-card h4 { margin: 0 0 6px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.note-card img { max-width: 100%; border-radius: 8px; margin-bottom: 8px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); display: none; align-items: center; justify-content: center; z-index: 300; padding: 18px; }
.modal-card { background: #fff; border-radius: var(--radius); max-width: 720px; width: 100%; max-height: 86vh; overflow: auto; }
.modal-card .modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-card .modal-body { padding: 18px; font-size: 14px; }
table.size-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.size-table th, table.size-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: center; }
table.size-table th { background: #f8fafc; }
.review-reply { background: var(--brand-light); border-left: 3px solid var(--brand); border-radius: 6px; padding: 8px 12px; margin-top: 8px; font-size: 13.5px; }
@media (max-width: 720px) { .notes-grid { grid-template-columns: 1fr; } }

/* ---------- flash deals ---------- */.deal-countdown { background: #dc2626; color: #fff; padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.deal-countdown.ended { background: #6b7280; }
.deal-countdown.lg { font-size: 15px; padding: 6px 14px; }
.badge-deal { position: absolute; top: 10px; left: 10px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; z-index: 2; }
.flash-bar { background: linear-gradient(90deg, #b91c1c, #ef4444); color: #fff; border-radius: var(--radius); padding: 13px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.flash-bar h2 { margin: 0; font-size: 19px; color: #fff; }
.flash-bar .sub { font-size: 12.5px; opacity: .9; }
.flash-bar .timer { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.flash-bar .deal-countdown { background: rgba(0,0,0,.35); }
.deal-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.deal-tile .info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.deal-tile img { width: 54px; height: 54px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; }
.deal-tile .off { background: #fee2e2; color: #b91c1c; font-weight: 800; border-radius: 8px; padding: 6px 10px; font-size: 14px; }

/* ---------- charts & analytics ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart-empty { color: var(--muted); font-size: 13.5px; padding: 26px 0; text-align: center; }
.hbar-list { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: 170px 1fr 90px; gap: 10px; align-items: center; font-size: 13px; }
.hbar-label { color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-note { color: var(--muted); font-size: 11.5px; }
.hbar-track { background: #eef1f4; border-radius: 20px; height: 10px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--brand), #34a9d1); }
.hbar-value { text-align: right; font-weight: 700; color: var(--brand); }
.kpi-delta { font-size: 12px; font-weight: 700; }
.kpi-up { color: var(--success); }
.kpi-down { color: var(--danger); }
.range-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.range-tabs a { border: 1px solid var(--line); border-radius: 20px; padding: 6px 13px; font-size: 13px; background: #fff; }
.range-tabs a.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
@media (max-width: 720px) { .hbar { grid-template-columns: 110px 1fr 70px; font-size: 12px; } }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs span { margin: 0 5px; }
.product-detail { display: grid; grid-template-columns: minmax(0, 460px) 1fr; gap: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.gallery-main { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.gallery-main img { width: 100%; height: auto; aspect-ratio: 1/1; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumbs button { width: 62px; height: 62px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; padding: 3px; cursor: pointer; }
.gallery-thumbs button.active { border-color: var(--brand); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pd-title { font-size: 22px; margin-bottom: 6px; }
.pd-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.pd-price { display: flex; align-items: baseline; gap: 10px; margin: 12px 0; }
.pd-price .price { font-size: 28px; }
.pd-stock { font-size: 13px; margin-bottom: 12px; }
.pd-stock.in { color: var(--success); font-weight: 600; }
.pd-stock.out { color: var(--danger); font-weight: 600; }
.pd-stock.low { color: var(--danger); font-weight: 700; }

/* ---------- variations (product page) ---------- */
.variation-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 14px 0; background: #fff; }
.variation-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.variation-head h3 { margin: 0; font-size: 13px; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.variation-guide { border: 0; background: none; color: var(--brand); font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: underline; padding: 0; }
.variant-group { margin-bottom: 13px; }
.variant-group:last-of-type { margin-bottom: 4px; }
.variant-label { font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.variant-label strong { color: var(--text); }
.variant-options { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-btn { min-width: 52px; padding: 8px 15px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; transition: .15s; }
.variant-btn:hover { border-color: var(--brand); color: var(--brand); }
.variant-btn.selected { border-color: var(--brand); color: var(--brand); background: var(--brand-light); box-shadow: inset 0 0 0 1px var(--brand); }
.variant-btn.soldout { color: #b9c0c9; text-decoration: line-through; cursor: not-allowed; background: #f8fafc; }
.variant-btn.soldout:hover { border-color: var(--line); color: #b9c0c9; }
.stock-bar { height: 6px; border-radius: 6px; background: #eef1f4; overflow: hidden; max-width: 280px; margin: -4px 0 12px; }
.stock-bar span { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #dc2626); border-radius: 6px; }
.pd-viewers { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #4b5563; margin: 10px 0 4px; }
.pd-viewers strong { color: var(--brand); font-size: 14.5px; transition: transform .2s; }
.pd-viewers .v-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; animation: viewerPulse 1.8s infinite; flex: 0 0 auto; }
.pd-viewers.bump strong { transform: scale(1.2); }
@keyframes viewerPulse { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); } 70% { box-shadow: 0 0 0 9px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }
.pd-desc { color: #374151; font-size: 14px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.qty-control { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty-control button { width: 38px; height: 42px; border: 0; background: #fff; cursor: pointer; font-size: 18px; color: var(--muted); }
.qty-control button:hover { background: var(--bg); color: var(--text); }
.qty-control input { width: 52px; height: 42px; border: 0; text-align: center; font-weight: 600; outline: none; }
.pd-actions { display: flex; gap: 10px; align-items: center; margin: 16px 0; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--radius-sm); padding: 12px 22px; font-weight: 600; font-size: 14px; cursor: pointer; transition: .15s; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #402c00; }
.btn-accent:hover { background: var(--accent-dark); color: #402c00; }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1da851; color: #fff; }
.btn-outline { background: #fff; border: 1.5px solid var(--line); color: var(--text); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- tabs (product description/reviews) ---------- */
.tabs { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 18px; }
.tab-head { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab-head button { border: 0; background: none; padding: 13px 18px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab-head button.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-pane { padding: 18px; display: none; }
.tab-pane.active { display: block; }
.review-item { border-bottom: 1px solid var(--line); padding: 12px 0; }
.review-item:last-child { border: 0; }
.review-item .who { font-weight: 600; font-size: 13.5px; }
.review-item .when { color: var(--muted); font-size: 12px; }
.review-item .stars { color: var(--accent); }
.rating-input { display: flex; gap: 4px; }
.rating-input span { cursor: pointer; font-size: 24px; color: #d1d5db; }
.rating-input span.on { color: var(--accent); }

/* ---------- forms ---------- */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.form-control { width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; outline: none; background: #fff; transition: .15s; }
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
textarea.form-control { min-height: 110px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.checkbox { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; }
.checkbox input { margin-top: 2px; }

/* ---------- alerts ---------- */
.alert { border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 14px; font-size: 13.5px; border: 1px solid transparent; }
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

/* ---------- badges ---------- */
.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.badge-ok { background: #ecfdf5; color: #047857; }
.badge-warn { background: #fffbeb; color: #b45309; }
.badge-info { background: #eff6ff; color: #1d4ed8; }
.badge-danger { background: #fef2f2; color: #b91c1c; }
.badge-brand { background: var(--brand-light); color: var(--brand-dark); }

/* ---------- cart page ---------- */
.page-head { padding: 20px 0 4px; }
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.card-body { padding: 16px; }
.cart-line { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.cart-line:last-child { border-bottom: 0; }
.cart-line img { width: 76px; height: 76px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 4px; }
.cart-line .name { font-weight: 600; font-size: 14px; }
.cart-line .opts { color: var(--muted); font-size: 12.5px; }
.cart-line .line-price { font-weight: 700; color: var(--brand); }
.cart-remove { background: none; border: 0; color: var(--muted); font-size: 12.5px; cursor: pointer; padding: 2px 0; }
.cart-remove:hover { color: var(--danger); text-decoration: underline; }
.summary-line { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.summary-line.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-weight: 800; font-size: 17px; }
.summary-line.total .amount { color: var(--brand); }

/* ---------- checkout ---------- */
.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 18px; align-items: start; }
.pay-option { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; }
.pay-option:hover { border-color: var(--brand); }
.pay-option input { margin-top: 3px; }
.pay-option strong { display: block; font-size: 14px; }
.pay-option small { color: var(--muted); }
.order-success { text-align: center; padding: 40px 20px; }
.order-success .icon { width: 74px; height: 74px; border-radius: 50%; background: #ecfdf5; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.order-success .icon svg { width: 38px; height: 38px; stroke: var(--success); }

/* ---------- auth pages ---------- */
.auth-wrap { max-width: 430px; margin: 34px auto; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.auth-switch { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 14px; }

/* ---------- account ---------- */
.account-layout { display: grid; grid-template-columns: 250px 1fr; gap: 18px; padding: 18px 0 30px; align-items: start; }
.account-nav { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.account-nav .who { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.account-nav .who strong { display: block; }
.account-nav .who small { color: var(--muted); }
.account-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 16px; font-size: 13.5px; border-left: 3px solid transparent; }
.account-nav a:hover { background: var(--bg); }
.account-nav a.active { border-left-color: var(--brand); color: var(--brand); background: var(--brand-light); font-weight: 600; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat-card strong { font-size: 22px; display: block; color: var(--brand); }
.stat-card small { color: var(--muted); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; background: #fff; font-size: 13.5px; }
table.table th { text-align: left; padding: 11px 12px; border-bottom: 2px solid var(--line); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
table.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.table tr:hover td { background: #fafbfc; }

/* ---------- pagination ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 22px 0; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 13.5px; padding: 0 10px; }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }

/* ---------- footer ---------- */
.site-footer { background: #0f2233; color: #cbd5e1; margin-top: 34px; padding-bottom: 64px; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 26px; padding: 34px 0 26px; }
.site-footer h4 { color: #fff; font-size: 14.5px; margin-bottom: 12px; }
.site-footer a { color: #cbd5e1; display: block; padding: 4px 0; font-size: 13.5px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-about p { font-size: 13.5px; color: #9fb0c0; line-height: 1.6; }
.newsletter-form { display: flex; gap: 8px; margin-top: 8px; }
.newsletter-form input { flex: 1; border: 0; border-radius: 8px; padding: 10px 12px; outline: none; font-size: 13.5px; }
.newsletter-form button { border: 0; background: var(--accent); color: #402c00; border-radius: 8px; padding: 0 16px; font-weight: 700; cursor: pointer; }
.footer-bottom { border-top: 1px solid #1d3548; padding-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: #8ba0b5; }
.pay-methods { display: flex; gap: 8px; align-items: center; }
.pay-methods span { background: #fff; color: #0f2233; border-radius: 6px; padding: 4px 9px; font-size: 11.5px; font-weight: 700; }

/* ---------- empty states ---------- */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty svg { width: 56px; height: 56px; stroke: #cbd5e1; margin: 0 auto 12px; }

/* ---------- admin ---------- */
.admin-body { background: #f1f4f8; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-side { width: 232px; background: #10202f; color: #cbd5e1; flex-shrink: 0; display: flex; flex-direction: column; }
.admin-side .brand { padding: 16px; font-weight: 800; font-size: 19px; color: #fff; border-bottom: 1px solid #1d3548; }
.admin-side .brand em { color: var(--accent); font-style: normal; }
.admin-side nav { padding: 10px 0; overflow-y: auto; flex: 1; }
.admin-side nav a { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 13.5px; color: #cbd5e1; border-left: 3px solid transparent; }
.admin-side nav a:hover { background: #16293a; color: #fff; }
.admin-side nav a.active { background: #16293a; color: #fff; border-left-color: var(--accent); }
.admin-side nav a svg { width: 17px; height: 17px; stroke: currentColor; opacity: .85; }
.admin-side .side-foot { padding: 12px 16px; border-top: 1px solid #1d3548; font-size: 12px; }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-top { background: #fff; border-bottom: 1px solid var(--line); padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.admin-top h1 { font-size: 18px; margin: 0; }
.admin-content { padding: 20px; }
.admin-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.admin-card .num { font-size: 26px; font-weight: 800; color: var(--brand); }
.admin-card .lbl { color: var(--muted); font-size: 12.5px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; }
.panel-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-head h3 { margin: 0; font-size: 15px; }
.panel-body { padding: 16px; }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-form-grid .full { grid-column: 1 / -1; }
.settings-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.settings-tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 13.5px; }
.settings-tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.settings-pane { display: none; }
.settings-pane.active { display: block; }
.img-preview { width: 110px; height: 110px; border: 1px dashed var(--line); border-radius: 10px; object-fit: contain; background: #fff; padding: 4px; }

/* ---------- misc ---------- */
.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 0; }
.filter-bar select { border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; font-size: 13.5px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 30px; padding: 6px 12px; font-size: 12.5px; }
.chip a { color: var(--muted); }
.skeleton { background: linear-gradient(90deg, #eef1f4 25%, #f7f9fb 50%, #eef1f4 75%); background-size: 400% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: #111827; color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 13.5px; opacity: 0; pointer-events: none; transition: .25s; z-index: 300; box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.error { background: #b91c1c; }
.toast.success { background: #047857; }
.sidebar-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; padding: 18px 0 30px; align-items: start; }
.filter-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.filter-card h4 { font-size: 14px; margin-bottom: 10px; }
.filter-card ul { list-style: none; margin: 0 0 14px; padding: 0; }
.filter-card li { padding: 3px 0; font-size: 13.5px; }
.filter-card li label { display: flex; gap: 8px; align-items: center; cursor: pointer; color: #374151; }
.product-count { color: var(--muted); font-size: 13.5px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
    .products-grid, .product-row { grid-template-columns: repeat(4, 1fr); }
    .cat-tiles { grid-template-columns: repeat(6, 1fr); }
    .admin-cards, .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
    .hero-slider { width: 100%; max-width: 480px; margin: 0 auto; }
    .hero-side { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: none; }
    .product-detail { grid-template-columns: 1fr; }
    .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
    .account-layout, .sidebar-layout { grid-template-columns: 1fr; }
    .trust { grid-template-columns: repeat(2, 1fr); }
    .admin-shell { flex-direction: column; }
    .admin-side { width: 100%; }
    .admin-side nav { display: grid; grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
    .topbar .links { display: none; }
    .header-main { flex-wrap: wrap; gap: 10px; }
    .hamburger { display: block; }
    .search-bar { order: 3; flex-basis: 100%; max-width: none; }
    .header-action .label { display: none; }
    .products-grid, .product-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .cat-tiles { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .cat-tile .thumb { width: 48px; height: 48px; }
    .hero-slide .hero-text { left: 16px; bottom: 14px; max-width: 80%; }
    .hero-slide .hero-text h3 { font-size: 19px; }
    .hero-slide .hero-text p { font-size: 13px; }
    .promo-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .promo-card .promo-label { padding: 26px 12px 10px; font-size: 13.5px; }
    .promo-strip { flex-direction: column; text-align: center; padding: 18px; }
    .promo-strip img { max-height: 80px; }
    .footer-top { grid-template-columns: 1fr; gap: 18px; }
    .form-row { grid-template-columns: 1fr; }
    .admin-form-grid { grid-template-columns: 1fr; }
    .bottom-nav { display: flex; }
    .site-footer { padding-bottom: 74px; }
    .cart-line { grid-template-columns: 60px 1fr; }
    .cart-line img { width: 60px; height: 60px; }
    .cart-line .line-total { grid-column: 2; }
    .section { padding: 18px 0 4px; }
    .breadcrumbs { padding-top: 10px; }
    .review-item { padding: 10px 0; }
}

/* ============================================================
   Responsive product grids + mobile polish
   (these replace the old hard-coded inline column styles)
   ============================================================ */

/* generic responsive grids used on the sellers / coupons pages */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* product cards must be able to shrink (fixes grid overflow / clipped prices) */
.product-card, .product-body, .product-title { min-width: 0; }
.price { white-space: nowrap; }
.price-row { flex-wrap: wrap; }
.btn-add { white-space: nowrap; }
.cat-tile { min-width: 0; }
.cat-tile strong { overflow-wrap: anywhere; }

/* variation rows in the admin / seller product forms */
.variant-row { display: grid; grid-template-columns: 1fr 1fr 1fr .7fr auto; gap: 8px; margin-bottom: 8px; }

/* mobile-only "Filters" toggle on listing pages */
.filters-toggle { display: none; }
.filters-open .sidebar-layout > aside { display: block !important; }

@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    /* filters collapse behind a button on tablets + phones */
    .filters-toggle { display: inline-flex; width: 100%; justify-content: center; margin-bottom: 12px; }
    .sidebar-layout > aside { display: none; }
    .filters-open .sidebar-layout > aside { display: block !important; }
}

@media (max-width: 720px) {
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .variant-row { grid-template-columns: 1fr 1fr; }

    /* tighter, never-clipped cards on phones */
    .product-thumb { padding: 8px 8px 3px; }
    .product-body { padding: 0 9px 9px; }
    .product-title { font-size: 13px; line-height: 1.3; margin-bottom: 4px; }
    .price { font-size: 15px; }
    .price-old { font-size: 11.5px; }
    .price-row { gap: 5px; margin-bottom: 6px; }
    .btn-add { font-size: 12px; padding: 8px 6px; gap: 5px; }
    .btn-add svg { width: 14px; height: 14px; }
    .badge-discount, .badge-deal, .badge-out { font-size: 10px; padding: 2px 6px; }
    .wish-btn { width: 26px; height: 26px; top: 6px; right: 6px; }
    .wish-btn svg { width: 14px; height: 14px; }
}

