/* ============================================================
   Faragostar storefront theme — RTL, Persian, doorphone.ir-style
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
    font-family: "IRANSans";
    font-style: normal;
    font-weight: 300;
    src: url("/fonts/IRANSansWeb_Light.woff2") format("woff2");
    font-display: swap;
}
@font-face {
    font-family: "IRANSans";
    font-style: normal;
    font-weight: 400;
    src: url("/fonts/IRANSansWeb.woff2") format("woff2");
    font-display: swap;
}
@font-face {
    font-family: "IRANSans";
    font-style: normal;
    font-weight: 500;
    src: url("/fonts/IRANSansWeb_Medium.woff2") format("woff2");
    font-display: swap;
}
@font-face {
    font-family: "IRANSans";
    font-style: normal;
    font-weight: 700;
    src: url("/fonts/IRANSansWeb_Bold.woff2") format("woff2");
    font-display: swap;
}
@font-face {
    font-family: "IRANSans";
    font-style: normal;
    font-weight: 900;
    src: url("/fonts/IRANSansWeb_Black.woff2") format("woff2");
    font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
    --c-primary: #12468a;
    --c-primary-dark: #0e2f66;
    --c-primary-light: #1d63c4;
    --c-accent: #e8302f;
    --c-accent-dark: #c41f1e;
    --c-amber: #f6a609;
    --c-success: #1ca15a;
    --c-bg: #f3f4f7;
    --c-surface: #ffffff;
    --c-text: #23262b;
    --c-muted: #828892;
    --c-border: #e8eaf0;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(20, 30, 60, .06);
    --shadow: 0 6px 20px rgba(20, 30, 60, .08);
    --container: 1240px;
    --header-h: 0;
}

/* ---------- Base / reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: "IRANSans", Tahoma, Arial, sans-serif;
    background: var(--c-bg);
    color: var(--c-text);
    line-height: 1.8;
    font-size: 14px;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--c-primary); }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0 0 .6rem; line-height: 1.5; font-weight: 700; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

.container { max-width: var(--container); margin: 0 auto; padding-inline: 16px; }
.text-muted { color: var(--c-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ============================================================
   TOP BAR  (the doorphone.ir-style strip with phone numbers)
   ============================================================ */
.topbar {
    background: var(--c-primary-dark);
    color: #dfe7f5;
    font-size: 12.5px;
}
.topbar a { color: #dfe7f5; }
.topbar a:hover { color: #fff; }
.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 42px;
    flex-wrap: wrap;
}
.topbar__contact { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.topbar__phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .3px;
}
.topbar__phone .ic { color: var(--c-amber); display: inline-flex; }
.topbar__phone strong { font-size: 15px; }
.topbar__hours { display: inline-flex; align-items: center; gap: 6px; color: #aebbd6; }
.topbar__links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topbar__links li { position: relative; }
.topbar__links li + li::before {
    content: ""; position: absolute; inset-inline-start: -9px; top: 50%;
    width: 1px; height: 14px; transform: translateY(-50%); background: rgba(255,255,255,.18);
}
.topbar__social { display: inline-flex; gap: 10px; }
.topbar__social a { opacity: .85; }
.topbar__social a:hover { opacity: 1; }

/* ============================================================
   HEADER  (logo + search + account + cart)
   ============================================================ */
.site-header { background: var(--c-surface); box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 50; }
.header__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-block: 16px;
}
.header__logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header__logo img { height: 52px; width: auto; }
.header__logo .brand-name { font-weight: 900; font-size: 20px; color: var(--c-primary-dark); }
.header__logo .brand-sub { font-size: 11px; color: var(--c-muted); font-weight: 400; }

.header__search { flex: 1; max-width: 620px; }
.search-box { display: flex; align-items: center; background: var(--c-bg); border: 1.5px solid var(--c-border); border-radius: var(--radius); overflow: hidden; transition: border-color .15s; }
.search-box:focus-within { border-color: var(--c-primary-light); }
.search-box input { flex: 1; border: 0; background: transparent; padding: 12px 16px; outline: none; color: var(--c-text); }
.search-box button { border: 0; background: var(--c-primary); color: #fff; padding: 0 20px; align-self: stretch; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.search-box button:hover { background: var(--c-primary-dark); }

.header__actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.header-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px; border-radius: var(--radius-sm);
    border: 1.5px solid var(--c-border); color: var(--c-text); background: #fff; font-weight: 600; white-space: nowrap;
}
.header-btn:hover { border-color: var(--c-primary-light); color: var(--c-primary); }
.header-btn.cart { background: var(--c-primary); border-color: var(--c-primary); color: #fff; position: relative; }
.header-btn.cart:hover { background: var(--c-primary-dark); color: #fff; }
.header-btn .badge-count {
    background: var(--c-accent); color: #fff; border-radius: 999px; min-width: 20px; height: 20px;
    display: inline-grid; place-items: center; font-size: 11px; padding: 0 5px;
}

/* ============================================================
   MAIN NAV  (categories mega-menu + links)
   ============================================================ */
.main-nav { background: var(--c-surface); border-top: 1px solid var(--c-border); box-shadow: var(--shadow-sm); }
.main-nav__inner { display: flex; align-items: stretch; gap: 6px; }
.cat-trigger {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--c-primary); color: #fff; padding: 0 20px; font-weight: 700; border: 0;
}
.cat-trigger:hover { background: var(--c-primary-dark); }
.nav-links { display: flex; align-items: stretch; gap: 4px; flex-wrap: wrap; }
.nav-links > li > a { display: inline-flex; align-items: center; padding: 13px 14px; font-weight: 600; color: var(--c-text); }
.nav-links > li > a:hover { color: var(--c-primary); }
.nav-cta { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--c-accent); font-weight: 700; padding-inline: 14px; }

/* Mega menu (hover) */
.has-mega { position: relative; }
.mega {
    position: absolute; inset-inline-start: 0; top: 100%;
    background: #fff; min-width: 760px; box-shadow: var(--shadow); border-radius: 0 0 var(--radius) var(--radius);
    border: 1px solid var(--c-border); padding: 18px; display: none; grid-template-columns: repeat(3, 1fr); gap: 8px 26px; z-index: 60;
}
.has-mega:hover .mega { display: grid; }
.mega__group > a { font-weight: 700; color: var(--c-primary-dark); display: block; padding: 6px 0; border-bottom: 1px dashed var(--c-border); margin-bottom: 6px; }
.mega__group li a { display: block; padding: 5px 0; color: #5a616c; }
.mega__group li a:hover { color: var(--c-primary); }

/* All-categories dropdown panel */
.cat-panel-wrap { position: relative; }
.cat-panel {
    position: absolute; top: 100%; inset-inline-start: 0; width: 280px; background: #fff;
    border: 1px solid var(--c-border); border-top: 0; box-shadow: var(--shadow); z-index: 60; display: none;
}
.cat-panel-wrap:hover .cat-panel { display: block; }
.cat-panel > li > a { display: flex; align-items: center; gap: 10px; padding: 11px 16px; font-weight: 600; border-bottom: 1px solid var(--c-border); }
.cat-panel > li:last-child > a { border-bottom: 0; }
.cat-panel > li > a:hover { background: var(--c-bg); color: var(--c-primary); }

/* ============================================================
   MOBILE: hamburger button + slide-out drawer
   ============================================================ */
.header__burger {
    display: none; align-items: center; justify-content: center;
    background: transparent; border: 0; padding: 4px; color: var(--c-primary-dark);
    border-radius: var(--radius-sm); flex-shrink: 0;
}
.header__burger:hover { background: var(--c-bg); }

.drawer-overlay {
    position: fixed; inset: 0; background: rgba(10, 20, 40, .5); z-index: 90;
    opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
}
body.drawer-open .drawer-overlay { opacity: 1; visibility: visible; }

.drawer {
    position: fixed; inset-block: 0; inset-inline-start: 0; width: min(84vw, 320px);
    background: #fff; z-index: 95; display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform .26s ease;
    box-shadow: -10px 0 34px rgba(0, 0, 0, .18); overflow-y: auto;
}
body.drawer-open .drawer { transform: translateX(0); }
.drawer__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 16px; background: var(--c-primary-dark); color: #fff; position: sticky; top: 0;
}
.drawer__title { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.drawer__close { background: transparent; border: 0; color: #fff; display: inline-flex; padding: 4px; }
.drawer__nav { display: flex; flex-direction: column; padding: 4px 0 16px; }
.drawer__nav a { padding: 13px 18px; font-weight: 600; border-bottom: 1px solid var(--c-border); color: var(--c-text); }
.drawer__nav a:hover { background: var(--c-bg); color: var(--c-primary); }
.drawer__cta { margin-top: 10px; color: var(--c-accent) !important; font-weight: 800; }

/* ============================================================
   BUTTONS / BADGES / PRICE
   ============================================================ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: var(--radius-sm); font-weight: 700; border: 0; transition: background .15s, color .15s; }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); color: #fff; }
.btn-accent { background: var(--c-accent); color: #fff; }
.btn-accent:hover { background: var(--c-accent-dark); color: #fff; }
.btn-ghost { background: transparent; border: 1.5px solid var(--c-border); color: var(--c-text); }
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-block { width: 100%; }

.badge-off { background: var(--c-accent); color: #fff; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; }
.badge-special { background: var(--c-amber); color: #3a2a00; border-radius: 6px; padding: 2px 8px; font-size: 11px; font-weight: 700; }
.badge-out { background: #eceef3; color: var(--c-muted); border-radius: 6px; padding: 2px 8px; font-size: 11px; }

.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price__now { font-weight: 800; font-size: 18px; color: var(--c-text); }
.price__unit { font-size: 12px; color: var(--c-muted); font-weight: 400; }
.price__old { color: var(--c-muted); text-decoration: line-through; font-size: 13px; }

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.grid { display: grid; gap: 16px; }
.grid-products { grid-template-columns: repeat(5, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card-product {
    background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column; position: relative; transition: box-shadow .18s, transform .18s;
}
.card-product:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card-product__media { position: relative; aspect-ratio: 1/1; background: #fff; padding: 14px; }
.card-product__media img { width: 100%; height: 100%; object-fit: contain; }
.card-product__badges { position: absolute; top: 10px; inset-inline-end: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.card-product__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-product__cat { font-size: 11.5px; color: var(--c-muted); }
.card-product__title { font-size: 13.5px; font-weight: 600; color: var(--c-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; line-height: 1.45; }
.card-product__title:hover { color: var(--c-primary); }
.card-product__foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }

/* ============================================================
   SECTIONS / HOME
   ============================================================ */
.section { margin-block: 30px; }
.section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.section__title { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; }
.section__title .bar { width: 5px; height: 22px; border-radius: 3px; background: var(--c-accent); }
.section__title.t-blue .bar { background: var(--c-primary); }
.section__more { color: var(--c-primary); font-weight: 600; font-size: 13px; }
.panel { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px; }

.hero { display: grid; grid-template-columns: 1fr 320px; gap: 16px; margin-top: 20px; }
.hero__slider { position: relative; border-radius: var(--radius); overflow: hidden; background: #dde3ee; min-height: 340px; }
.hero__slider img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero__slide-caption { position: absolute; inset-block: 0; inset-inline-start: 0; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 40px; max-width: 60%; }
.hero__slide-caption h2 { font-size: 30px; font-weight: 900; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.hero__slide-caption p { color: #eef2fb; font-size: 16px; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.hero__side { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; }
.hero__side a { border-radius: var(--radius); overflow: hidden; background: #dde3ee; }
.hero__side img { width: 100%; height: 100%; object-fit: cover; }

.feature-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 20px; }
.feature-strip .item { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 16px; display: flex; align-items: center; gap: 12px; }
.feature-strip .item .ic { width: 42px; height: 42px; flex-shrink: 0; color: var(--c-primary); display: grid; place-items: center; }
.feature-strip .item .t { font-weight: 700; font-size: 13px; }
.feature-strip .item .d { font-size: 11.5px; color: var(--c-muted); }

.banner-grid { display: grid; gap: 16px; }
.banner-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.banner-grid a { border-radius: var(--radius); overflow: hidden; display: block; background: #dde3ee; }
.banner-grid img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   BREADCRUMBS / PAGER / LAYOUT HELPERS
   ============================================================ */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--c-muted); font-size: 12.5px; margin-block: 16px; }
.breadcrumbs a:hover { color: var(--c-primary); }
.breadcrumbs .sep { opacity: .5; }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: var(--radius-sm); border: 1px solid var(--c-border); background: #fff; font-weight: 600; padding: 0 10px; }
.pager a:hover { border-color: var(--c-primary); color: var(--c-primary); }
.pager .current { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.pager .disabled { opacity: .45; pointer-events: none; }

.layout-with-side { display: grid; grid-template-columns: 270px 1fr; gap: 20px; align-items: start; }
.filter-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 16px; position: sticky; top: 96px; }
.filter-card h3 { font-size: 15px; }
.filter-group { padding-block: 12px; border-bottom: 1px solid var(--c-border); }
.filter-group:last-child { border-bottom: 0; }
.field { display: block; margin-bottom: 10px; }
.field label { display: block; font-size: 12.5px; color: var(--c-muted); margin-bottom: 5px; }
.field input, .field select { width: 100%; padding: 9px 12px; border: 1.5px solid var(--c-border); border-radius: var(--radius-sm); background: #fff; }
.field input:focus, .field select:focus { outline: none; border-color: var(--c-primary-light); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 10px 16px; margin-bottom: 16px; flex-wrap: wrap; }
.sort-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.sort-tabs a { padding: 7px 12px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; color: var(--c-muted); }
.sort-tabs a.active { background: var(--c-bg); color: var(--c-primary); }

/* ============================================================
   PRODUCT DETAIL
   ============================================================ */
.product-detail { display: grid; grid-template-columns: 420px 1fr; gap: 26px; }
.gallery__main { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px; aspect-ratio: 1/1; display: grid; place-items: center; }
.gallery__main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.gallery__thumbs img { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 4px; background: #fff; }
.pd-title { font-size: 22px; font-weight: 800; }
.pd-meta { display: flex; gap: 18px; color: var(--c-muted); font-size: 13px; margin-block: 10px 18px; flex-wrap: wrap; }
.pd-meta b { color: var(--c-text); font-weight: 600; }
.buy-box { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: start; padding: 11px 14px; border-bottom: 1px solid var(--c-border); font-size: 13.5px; }
.spec-table th { width: 220px; color: var(--c-muted); font-weight: 600; background: var(--c-bg); }
.prose { line-height: 2.1; color: #3a3f47; }
.prose img { border-radius: var(--radius); margin: 12px 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: #11203c; color: #c4cee0; margin-top: 44px; }
.footer-features { border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-features__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; padding-block: 26px; }
.footer-features .item { display: flex; align-items: center; gap: 12px; }
.footer-features .ic { color: var(--c-amber); }
.footer-features .t { font-weight: 700; color: #fff; font-size: 13px; }
.footer-features .d { font-size: 11.5px; color: #8e9bb5; }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; padding-block: 36px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: #aab6cd; font-size: 13px; }
.footer-col a:hover { color: #fff; }
.footer-about p { font-size: 13px; color: #97a3bb; line-height: 2; }
.footer-contact li { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; font-size: 13px; }
.footer-contact .ic { color: var(--c-amber); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-block: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: #8e9bb5; }

/* ============================================================
   ALERTS / MISC
   ============================================================ */
.alert { padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 600; }
.alert-success { background: #e6f6ee; color: #11713f; border: 1px solid #b6e3ca; }
.alert-error { background: #fdecec; color: #b21f1d; border: 1px solid #f5c2c1; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--c-muted); }
.empty-state .ic { color: var(--c-border); margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--c-bg); border: 1px solid var(--c-border); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; }

/* Auth cards (login / register) */
.auth-card { max-width: 420px; margin: 40px auto; }
.auth-card .field { margin-bottom: 14px; }
.auth-card form { margin-block: 16px; }
.auth-card .btn-block { margin-top: 6px; }

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; background: var(--c-bg); }
.admin-side { background: #11203c; color: #c4cee0; padding: 18px 0; position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; }
.admin-side__brand { display: flex; align-items: center; gap: 10px; padding: 6px 20px 18px; font-weight: 900; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-side__brand img { height: 34px; }
.admin-nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 3px; }
.admin-nav a { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: var(--radius-sm); color: #aab6cd; font-weight: 600; font-size: 13.5px; }
.admin-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-nav a.active { background: var(--c-primary); color: #fff; }
.admin-main { padding: 22px 26px; min-width: 0; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-topbar h1 { font-size: 20px; margin: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px; display: flex; align-items: center; gap: 14px; }
.stat-card .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: #eef3fb; color: var(--c-primary); flex-shrink: 0; }
.stat-card .num { font-size: 22px; font-weight: 800; line-height: 1.2; }
.stat-card .lbl { font-size: 12.5px; color: var(--c-muted); }

.table-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; }
.atable { width: 100%; border-collapse: collapse; }
.atable th, .atable td { padding: 11px 14px; text-align: start; border-bottom: 1px solid var(--c-border); font-size: 13px; white-space: nowrap; }
.atable th { background: var(--c-bg); color: var(--c-muted); font-weight: 600; }
.atable tbody tr:hover { background: #fafbfc; }
.atable .thumb { width: 42px; height: 42px; object-fit: contain; border-radius: 8px; border: 1px solid var(--c-border); background: #fff; }
.atable .actions { display: flex; gap: 6px; }
.badge-on { background: #e6f6ee; color: #11713f; border-radius: 6px; padding: 2px 8px; font-size: 11.5px; font-weight: 700; }
.badge-off2 { background: #fdecec; color: #b21f1d; border-radius: 6px; padding: 2px 8px; font-size: 11.5px; font-weight: 700; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 7px; }
.btn-danger { background: #fdecec; color: #b21f1d; }
.btn-danger:hover { background: #f7d4d3; color: #b21f1d; }
.admin-form { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 20px; max-width: 820px; }
.admin-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-form textarea { min-height: 120px; resize: vertical; }
.switch-row { display: flex; gap: 18px; flex-wrap: wrap; padding: 8px 0; }
.switch-row label { display: flex; align-items: center; gap: 7px; font-size: 13.5px; }
.switch-row input { width: auto; }

@media (max-width: 880px) {
    .admin { grid-template-columns: 1fr; }
    .admin-side { position: static; height: auto; display: flex; flex-direction: column; }
    .admin-nav { flex-direction: row; flex-wrap: wrap; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .admin-form .row2 { grid-template-columns: 1fr; }
    .atable { display: block; overflow-x: auto; }
}

/* Floating WhatsApp button */
.whatsapp-fab {
    position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 70;
    width: 54px; height: 54px; border-radius: 50%; background: #25d366; color: #fff;
    display: grid; place-items: center; box-shadow: 0 8px 24px rgba(37, 211, 102, .45);
}
.whatsapp-fab:hover { color: #fff; transform: scale(1.06); }

/* Horizontal product rail */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.rail > * { scroll-snap-align: start; }

/* Bottom mobile nav (hidden on desktop) */
.mobile-nav { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .grid-products { grid-template-columns: repeat(4, 1fr); }
    .product-detail { grid-template-columns: 360px 1fr; }
}
@media (max-width: 900px) {
    .topbar__hours, .topbar__links .hide-sm { display: none; }
    .grid-products, .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .hero { grid-template-columns: 1fr; }
    .hero__side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
    .feature-strip { grid-template-columns: repeat(2, 1fr); }
    .footer-features__grid { grid-template-columns: repeat(2, 1fr); }
    .footer-main { grid-template-columns: 1fr 1fr; }
    .layout-with-side { grid-template-columns: 1fr; }
    .filter-card { position: static; }
    .product-detail { grid-template-columns: 1fr; }
    .header__search { order: 3; flex-basis: 100%; max-width: none; }
    .header__inner { flex-wrap: wrap; }
    /* Desktop mega-menu off; hamburger drawer on. */
    .main-nav { display: none; }
    .header__burger { display: inline-flex; }
}
@media (max-width: 600px) {
    .container { padding-inline: 12px; }
    .grid-products, .grid-4, .grid-3, .banner-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid { gap: 12px; }
    .feature-strip { grid-template-columns: 1fr; }
    .footer-main { grid-template-columns: 1fr; }
    .header__actions .label { display: none; }
    body { padding-bottom: 64px; }
    .mobile-nav {
        display: flex; position: fixed; bottom: 0; inset-inline: 0; height: 60px; background: #fff;
        border-top: 1px solid var(--c-border); z-index: 80; justify-content: space-around; align-items: center;
    }
    .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--c-muted); }
    .mobile-nav a.active { color: var(--c-primary); }

    /* Compact header */
    .header__inner { gap: 10px; padding-block: 10px; }
    .header__logo img { height: 38px; }
    .header__logo .brand-sub { display: none; }
    .header__logo .brand-name { font-size: 16px; }
    .header__actions { gap: 6px; }
    .header-btn { padding: 9px 11px; }
    .search-box input { padding: 10px 13px; }

    /* Smaller hero so the caption doesn't overwhelm the screen */
    .hero { margin-top: 14px; }
    .hero__slider { min-height: 180px; }
    .hero__slide-caption { max-width: 100%; padding: 18px; }
    .hero__slide-caption h2 { font-size: 18px; }
    .hero__slide-caption p { font-size: 12.5px; }

    .section { margin-block: 22px; }
    .section__title { font-size: 16px; }
    .pd-title { font-size: 18px; }
}
