/* ==========================================================================
   Agrovet public storefront — curved glass theme (dark default, light option)
   ========================================================================== */
:root {
    --brand: #2f9e44;
    --accent: #f59f00;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
    --blur: saturate(180%) blur(20px);
    --r-lg: 32px;
    --r-md: 22px;
    --r-sm: 14px;
    --header-h: 78px;
}
[data-theme="dark"] {
    --bg: #0b1110; --bg-soft: #101917;
    --mesh1: rgba(47,158,68,.26); --mesh2: rgba(245,159,0,.12); --mesh3: rgba(64,120,200,.14);
    --glass: rgba(26,36,33,.6); --glass-strong: rgba(24,33,30,.92); --border: rgba(255,255,255,.10);
    --text: #eef3f0; --muted: #9aaba2; --input: rgba(255,255,255,.07);
    --shadow: 0 14px 44px rgba(0,0,0,.45); color-scheme: dark;
}
[data-theme="light"] {
    --bg: #f3f7f2; --bg-soft: #e8f0e8;
    --mesh1: rgba(47,158,68,.20); --mesh2: rgba(245,159,0,.16); --mesh3: rgba(64,120,200,.12);
    --glass: rgba(255,255,255,.72); --glass-strong: rgba(255,255,255,.96); --border: rgba(20,33,27,.10);
    --text: #14211b; --muted: #5d6e65; --input: rgba(255,255,255,.9);
    --shadow: 0 14px 44px rgba(30,60,45,.14); color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text);
    background-color: var(--bg);
    background-image:
        radial-gradient(900px 600px at 5% 0%, var(--mesh1), transparent 60%),
        radial-gradient(800px 600px at 100% 12%, var(--mesh2), transparent 60%),
        radial-gradient(1000px 700px at 55% 100%, var(--mesh3), transparent 60%);
    background-attachment: fixed; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
.wrap { width: min(1240px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(860px, 100% - 40px); }
.muted { color: var(--muted); }
.pre { white-space: pre-line; }
.center { text-align: center; margin-top: 34px; }
.small { font-size: 13px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    height: 48px; padding: 0 26px; border: 0; border-radius: 999px; cursor: pointer;
    font: inherit; font-weight: 600; color: #fff; white-space: nowrap;
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 90%, #fff), var(--brand));
    box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 38%, transparent);
    transition: transform .15s, filter .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.07); }
.btn:active { transform: scale(.97); }
.btn.sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn.wide { width: 100%; margin-bottom: 10px; }
.btn.ghost { background: var(--input); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn.ghost.light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); backdrop-filter: blur(8px); }
.btn.wa { background: linear-gradient(180deg, #34d36b, #1faa52); box-shadow: 0 8px 22px rgba(31,170,82,.35); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- Top bar ---------- */
.topbar { background: color-mix(in srgb, var(--brand) 78%, #000); color: #fff; font-size: 13.5px; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; }
.topbar-msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-links { display: flex; align-items: center; gap: 20px; flex: none; }
.topbar-links a { opacity: .92; } .topbar-links a:hover { opacity: 1; text-decoration: underline; }
.theme-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }

/* ---------- Header ---------- */
.header {
    position: sticky; top: 0; z-index: 60; margin: 12px 0 0;
}
.header-in {
    display: flex; align-items: center; gap: 22px; min-height: var(--header-h); padding: 0 22px;
    background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow);
}
.logo { display: flex; align-items: center; gap: 12px; flex: none; }
.logo-mark {
    width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; overflow: hidden; flex: none;
    background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #000)); color: #fff; font-size: 20px;
}
.logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.logo-text strong { display: block; font-size: 17px; line-height: 1.15; }
.logo-text small { display: block; color: var(--muted); font-size: 11.5px; max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Desktop navigation + mega menu */
.nav { flex: 1; min-width: 0; }
.nav > ul { display: flex; align-items: center; justify-content: center; gap: 2px; }
.nav li { position: relative; }
.nav-top { display: inline-flex; align-items: center; gap: 7px; padding: 10px 15px; border-radius: 999px; font-weight: 600; font-size: 15px; transition: background .15s, color .15s; }
.nav-top i { font-size: 10px; opacity: .7; transition: transform .2s; }
.nav li:hover > .nav-top, .nav li:focus-within > .nav-top { background: color-mix(in srgb, var(--brand) 18%, transparent); color: var(--brand); }
.nav li:hover > .nav-top i { transform: rotate(180deg); }
.sub-toggle { display: none; }

.drop, .mega {
    position: absolute; top: 100%; z-index: 70; opacity: 0; visibility: hidden; transform: translateY(14px);
    transition: opacity .2s, transform .2s, visibility .2s;
    background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--border); box-shadow: var(--shadow);
}
.nav li:hover > .drop, .nav li:focus-within > .drop,
.nav li:hover > .mega, .nav li:focus-within > .mega { opacity: 1; visibility: visible; transform: none; }
/* invisible bridge so the pointer can travel from the link to the panel */
.drop::before, .mega::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }

.drop { left: 0; min-width: 230px; margin-top: 10px; padding: 10px; border-radius: var(--r-md); border-top: 5px solid var(--brand); }
.drop a { display: block; padding: 10px 14px; border-radius: 12px; font-weight: 500; }
.drop a:hover { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); }

.nav li.has-mega { position: static; }
.header-in { position: relative; }
.mega {
    left: 0; right: 0; margin-top: 10px; padding: 22px; border-radius: var(--r-lg); border-top: 6px solid var(--brand);
    max-height: calc(100vh - 160px); overflow-y: auto;
}
.mega-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.mega-col { padding: 14px; background: var(--input); }
.mega-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.mega-head img { width: 100%; height: 112px; object-fit: cover; border-radius: 18px; }
.mega-head strong { font-size: 15.5px; }
.mega-ico { width: 100%; height: 112px; border-radius: 18px; display: grid; place-items: center; font-size: 34px; color: #fff; background: linear-gradient(135deg, var(--card-accent), color-mix(in srgb, var(--card-accent) 55%, #000)); }
.mega-col p { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.mega-col li a { display: block; padding: 5px 4px; font-size: 14px; color: var(--muted); border-radius: 8px; transition: color .15s, padding .15s; }
.mega-col li a:hover { color: var(--card-accent); padding-left: 10px; }
.mega-foot { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-weight: 600; color: var(--brand); }

.header-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.hsearch { position: relative; }
.hsearch input {
    width: 190px; height: 42px; padding: 0 44px 0 18px; border-radius: 999px; border: 1px solid var(--border);
    background: var(--input); color: var(--text); font: inherit; font-size: 14px; outline: none; transition: width .25s, border-color .15s;
}
.hsearch input:focus { width: 250px; border-color: var(--brand); }
.hsearch button { position: absolute; right: 4px; top: 4px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; cursor: pointer; }

/* Cart + hover mini-cart */
.cart-dd { position: relative; }
.cart-btn { position: relative; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--input); border: 1px solid var(--border); font-size: 18px; transition: background .15s, transform .15s; }
.cart-dd:hover .cart-btn { background: var(--brand); color: #fff; transform: translateY(-2px); }
.cart-count { position: absolute; top: -5px; right: -5px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--accent); }
.cart-count.bump { animation: bump .4s; }
@keyframes bump { 40% { transform: scale(1.45); } }
.mini-cart {
    position: absolute; right: 0; top: 100%; margin-top: 14px; width: 340px; padding: 18px; z-index: 80;
    background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--border); border-top: 6px solid var(--accent); border-radius: var(--r-md); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity .2s, transform .2s, visibility .2s;
}
.mini-cart::before { content: ""; position: absolute; left: 0; right: 0; top: -22px; height: 22px; }
.cart-dd:hover .mini-cart, .cart-dd:focus-within .mini-cart, .mini-cart.pulse { opacity: 1; visibility: visible; transform: none; }
.mc-empty { text-align: center; padding: 10px 0 4px; }
.mc-empty i { font-size: 34px; color: var(--muted); margin-bottom: 8px; }
.mc-empty p { color: var(--muted); }
.mc-list { max-height: 280px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.mc-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.mc-thumb { width: 54px; height: 54px; flex: none; border-radius: 16px; overflow: hidden; display: grid; place-items: center; background: var(--input); color: var(--brand); font-size: 20px; }
.mc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mc-info { flex: 1; min-width: 0; }
.mc-info a { display: block; font-weight: 600; font-size: 14px; line-height: 1.3; }
.mc-info a:hover { color: var(--brand); }
.mc-info small { color: var(--muted); }
.mc-remove { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.mc-remove:hover { background: rgba(224,49,49,.16); color: #ff6b6b; }
.mc-total { display: flex; justify-content: space-between; padding: 14px 0; font-size: 16px; }
.mc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.burger { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border); background: var(--input); color: var(--text); font-size: 18px; cursor: pointer; }
.scrim { display: none; }

/* ---------- Cards with admin-controlled top border ---------- */
.card-x {
    --card-accent: var(--brand);
    background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--border); border-top: 7px solid var(--card-accent);
    border-radius: var(--r-lg); box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}
.card-x:hover { transform: translateY(-6px); box-shadow: 0 22px 50px color-mix(in srgb, var(--card-accent) 28%, rgba(0,0,0,.25)); }

/* ---------- Section headers: ──── Title ──── ---------- */
.sec-head { text-align: center; margin: 0 auto 38px; max-width: 900px; }
.sec-title { display: flex; align-items: center; gap: 22px; }
.sec-title h2 { flex: none; font-size: clamp(24px, 3.4vw, 36px); max-width: 80%; }
.sec-title hr { flex: 1; height: 2px; border: 0; margin: 0; border-radius: 2px; min-width: 24px; }
.sec-title hr:first-child { background: linear-gradient(90deg, transparent, var(--brand)); }
.sec-title hr:last-child { background: linear-gradient(270deg, transparent, var(--brand)); }
.sec-head p { margin: 12px 0 0; color: var(--muted); }

/* ---------- Layout helpers ---------- */
.section { padding: 56px 0; }
.grid { display: grid; gap: 26px; }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.eyebrow { display: inline-block; padding: 6px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: .04em; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); color: #fff; backdrop-filter: blur(8px); }
.eyebrow.dark { background: color-mix(in srgb, var(--brand) 18%, transparent); border-color: transparent; color: var(--brand); }
.more { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--brand); }
.more i { transition: transform .2s; } .more:hover i { transform: translateX(5px); }
.btns { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }

/* ---------- Hero ---------- */
.hero { position: relative; margin-top: -90px; padding-top: 90px; min-height: 680px; overflow: hidden; color: #fff; isolation: isolate; }
.slide {
    position: absolute; inset: 0; display: flex; align-items: center; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s;
    background: radial-gradient(700px 500px at 85% 20%, rgba(245,159,0,.35), transparent 60%), radial-gradient(800px 600px at 10% 90%, rgba(255,255,255,.12), transparent 60%),
        linear-gradient(135deg, color-mix(in srgb, var(--brand) 85%, #000), color-mix(in srgb, var(--brand) 40%, #06100b));
    background-size: cover; background-position: center;
}
.slide.active { opacity: 1; visibility: visible; z-index: 1; }
.slide-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,14,9,.78) 10%, rgba(5,14,9,.25) 70%); }
.slide-inner { position: relative; padding: 70px 0 120px; }
.slide-inner h1 { font-size: clamp(34px, 5.4vw, 66px); max-width: 780px; margin: 18px 0 14px; text-wrap: balance; }
.slide-inner p { max-width: 580px; font-size: 18px; opacity: .92; }
.slide.active .eyebrow, .slide.active h1, .slide.active p, .slide.active .btns { animation: rise .8s both; }
.slide.active h1 { animation-delay: .1s; } .slide.active p { animation-delay: .2s; } .slide.active .btns { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
.hero-nav { position: absolute; top: 50%; z-index: 3; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.14); color: #fff; cursor: pointer; backdrop-filter: blur(8px); transition: background .15s; }
.hero-nav:hover { background: var(--brand); }
.hero-nav.prev { left: 22px; } .hero-nav.next { right: 22px; }
.hero-dots { position: absolute; z-index: 3; left: 50%; bottom: 96px; transform: translateX(-50%); display: flex; gap: 10px; }
.hero-dots button { width: 12px; height: 12px; border-radius: 999px; border: 0; background: rgba(255,255,255,.5); cursor: pointer; transition: width .25s, background .25s; }
.hero-dots button.on { width: 34px; background: var(--accent); }
.hero-wave, .footer-wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 90px; z-index: 2; fill: var(--bg); }

/* ---------- Highlights ---------- */
.highlights { position: relative; z-index: 4; margin-top: -60px; }
.hl, .svc, .cc { padding: 26px; display: flex; gap: 18px; align-items: flex-start; }
.svc { flex-direction: column; gap: 12px; }
.svc-img { width: 100%; height: 170px; object-fit: cover; border-radius: 20px; }
.hl h3, .svc h3, .cc h3 { font-size: 19px; margin-bottom: 6px; }
.hl p, .svc p { color: var(--muted); margin-bottom: 10px; }
.hl-ico { width: 58px; height: 58px; flex: none; border-radius: 20px 20px 20px 6px; display: grid; place-items: center; font-size: 23px; color: #fff; background: linear-gradient(135deg, var(--card-accent), color-mix(in srgb, var(--card-accent) 55%, #000)); }

/* ---------- Categories ---------- */
.cat { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 30px 20px 26px; }
.cat-pic { width: 112px; height: 112px; border-radius: 42% 58% 55% 45% / 50% 45% 55% 50%; overflow: hidden; display: grid; place-items: center; font-size: 42px; color: #fff; margin-bottom: 8px; background: linear-gradient(135deg, var(--card-accent), color-mix(in srgb, var(--card-accent) 55%, #000)); transition: border-radius .5s, transform .3s; }
.cat:hover .cat-pic { border-radius: 58% 42% 45% 55% / 45% 55% 45% 55%; transform: scale(1.06); }
.cat-pic img { width: 100%; height: 100%; object-fit: cover; }
.cat h3 { font-size: 18px; } .cat small { color: var(--muted); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.about-pic { aspect-ratio: 1 / 1; max-width: 520px; width: 100%; margin-inline: auto; overflow: hidden; border-radius: 38% 62% 55% 45% / 48% 42% 58% 52%; border: 8px solid var(--glass); box-shadow: var(--shadow); }
.about-pic img { width: 100%; height: 100%; object-fit: cover; }
.about-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-size: 96px; color: #fff; background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--accent) 60%, var(--brand))); }
.about-text h2 { font-size: clamp(28px, 3.6vw, 42px); margin: 14px 0; }
.about-text p { color: var(--muted); font-size: 17px; }
.ticks { display: grid; gap: 10px; margin: 18px 0 0; }
.ticks i { color: var(--brand); margin-right: 8px; }

/* ---------- Products ---------- */
.pcard { overflow: hidden; display: flex; flex-direction: column; }
.pimg { position: relative; aspect-ratio: 1 / 0.9; overflow: hidden; background: var(--input); border-radius: 0 0 40px 40px; }
.pimg-link { display: block; width: 100%; height: 100%; }
.pimg img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pcard:hover .pimg img { transform: scale(1.09); }
.pimg-empty { width: 100%; height: 100%; display: grid; place-items: center; font-size: 56px; color: #fff; background: linear-gradient(135deg, var(--card-accent), color-mix(in srgb, var(--card-accent) 50%, #000)); }
.pimg-empty.big { font-size: 110px; min-height: 380px; }
.ribbon { position: absolute; top: 14px; left: 14px; padding: 4px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #fff; background: #e03131; }
.ribbon.out { background: #495057; }
.pactions { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 10px; opacity: 0; transform: translateY(16px); transition: opacity .25s, transform .25s; }
.pcard:hover .pactions, .pcard:focus-within .pactions { opacity: 1; transform: none; }
.pbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 0; cursor: pointer; background: var(--glass-strong); color: var(--text); font-size: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.25); transition: background .15s, color .15s, transform .15s; }
.pbtn:hover { background: var(--card-accent); color: #fff; transform: translateY(-3px); }
.pbody { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcat { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--card-accent); }
.pbody h3 { font-size: 17px; line-height: 1.3; } .pbody h3 a:hover { color: var(--brand); }
.pprice { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.pprice strong { font-size: 19px; color: var(--brand); } .pprice del { color: var(--muted); font-size: 14px; } .pprice small { color: var(--muted); }
.pprice.big strong { font-size: 32px; }
.pbody .btn { margin-top: auto; width: 100%; }

/* ---------- Counters ---------- */
.stats-band { margin: 40px 0; padding: 64px 0; color: #fff; background: radial-gradient(500px 300px at 90% 0%, rgba(245,159,0,.4), transparent 60%), linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 45%, #06100b)); border-radius: 90px 90px 90px 90px / 60px 60px 60px 60px; width: min(1360px, 100% - 24px); margin-inline: auto; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; text-align: center; }
.stat-box strong { display: block; font-size: clamp(34px, 5vw, 54px); line-height: 1.1; }
.stat-box span { opacity: .9; }

/* ---------- Testimonials / FAQ ---------- */
.quote { margin: 0; padding: 28px; }
.stars { color: var(--accent); margin-bottom: 12px; }
.quote blockquote { margin: 0 0 18px; color: var(--muted); font-style: italic; }
.quote figcaption { display: flex; align-items: center; gap: 12px; }
.quote figcaption img, .av { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; }
.quote small { display: block; color: var(--muted); }
.faq { display: grid; gap: 14px; }
.faq-item { padding: 0; border-radius: var(--r-md); overflow: hidden; }
.faq-item:hover { transform: none; }
.faq-item summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { color: var(--card-accent); transition: transform .25s; }
.faq-item[open] summary i { transform: rotate(45deg); }
.faq-item p { padding: 0 22px 20px; margin: 0; color: var(--muted); }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.g-item { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 28px; border: 1px solid var(--border); }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.g-item:hover img { transform: scale(1.1); }
.g-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 14px; color: #fff; font-weight: 600; background: linear-gradient(transparent, rgba(0,0,0,.7)); opacity: 0; transition: opacity .25s; }
.g-item:hover .g-cap { opacity: 1; }
.lightbox { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 14px; padding: 20px; background: rgba(0,0,0,.86); }
.lightbox.open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 80vh; border-radius: 22px; }
.lightbox p { color: #fff; margin: 0; }
.lightbox button { position: absolute; top: 18px; right: 18px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 20px; cursor: pointer; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; gap: 26px; }
.contact-layout.with-map { grid-template-columns: 1fr 1.2fr; align-items: stretch; }
.contact-cards { display: grid; gap: 20px; align-content: start; }
.cc { align-items: center; padding: 20px 24px; } .cc a:hover { color: var(--brand); }
.map { overflow: hidden; min-height: 380px; padding: 0; }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; margin-top: -90px; padding: 150px 0 120px; color: #fff; overflow: hidden; background: radial-gradient(600px 300px at 85% 10%, rgba(245,159,0,.35), transparent 60%), linear-gradient(135deg, color-mix(in srgb, var(--brand) 85%, #000), color-mix(in srgb, var(--brand) 40%, #06100b)); }
.page-hero.compact { padding: 120px 0 36px; margin-bottom: 0; background: transparent; color: var(--text); margin-top: 0; }
.page-hero h1 { font-size: clamp(30px, 4.4vw, 52px); }
.crumbs { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; opacity: .92; }
.crumbs i { font-size: 10px; opacity: .7; }
.page-hero.compact .crumbs { opacity: 1; color: var(--muted); }
.page-hero.compact { padding-top: 34px; }

/* ---------- Shop ---------- */
.shop-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 30px; align-items: start; }
.side-card { padding: 22px; position: sticky; top: calc(var(--header-h) + 36px); max-height: calc(100vh - 150px); overflow-y: auto; }
.side-card h3 { margin-bottom: 12px; }
.cat-list a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; font-weight: 500; transition: background .15s, color .15s; }
.cat-list a i { width: 18px; text-align: center; color: var(--muted); }
.cat-list a:hover { background: color-mix(in srgb, var(--brand) 14%, transparent); }
.cat-list a.on { background: var(--brand); color: #fff; } .cat-list a.on i { color: #fff; }
.cat-list ul { margin: 2px 0 6px 20px; border-left: 2px solid var(--border); padding-left: 8px; }
.cat-list ul a { font-size: 14px; padding: 6px 10px; }
.shop-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 22px; padding: 12px 16px; border-radius: 999px; background: var(--glass); border: 1px solid var(--border); }
.shop-bar > span { margin-right: auto; padding-left: 8px; }
.shop-bar input, .shop-bar select { height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--input); color: var(--text); font: inherit; font-size: 14px; outline: none; }
.shop-bar select option { background: var(--bg); color: var(--text); }
.empty { padding: 50px 20px; text-align: center; } .empty i { font-size: 42px; color: var(--muted); margin-bottom: 8px; }
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.pager a, .pager span { min-width: 44px; height: 44px; display: grid; place-items: center; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--glass); font-weight: 600; }
.pager a:hover { background: var(--brand); color: #fff; } .pager .current { background: var(--brand); color: #fff; border-color: var(--brand); } .pager .disabled { opacity: .4; }

/* ---------- Product page ---------- */
.product-view { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 44px; align-items: start; }
.pv-pic { overflow: hidden; border-radius: 48px; } .pv-pic:hover { transform: none; }
.pv-pic img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.pv-info h1 { font-size: clamp(26px, 3.4vw, 40px); margin: 8px 0 14px; }
.pv-info .lead { color: var(--muted); font-size: 17px; }
.meta { display: flex; flex-wrap: wrap; gap: 22px; color: var(--muted); margin-bottom: 22px; }
.meta .ok { color: #37b24d; font-size: 10px; } .meta .bad { color: #e03131; font-size: 10px; }
.badge.sale { background: #e03131; color: #fff; padding: 2px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.buy { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 28px; }
.qty { display: inline-flex; align-items: center; height: 48px; border-radius: 999px; border: 1px solid var(--border); background: var(--input); overflow: hidden; }
.qty button { width: 44px; height: 100%; border: 0; background: transparent; color: var(--text); font-size: 20px; cursor: pointer; } .qty button:hover { background: color-mix(in srgb, var(--brand) 20%, transparent); }
.qty input { width: 54px; height: 100%; border: 0; background: transparent; color: var(--text); text-align: center; font: inherit; font-weight: 600; outline: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.desc { padding: 24px 26px; } .desc:hover { transform: none; } .desc h3 { margin-bottom: 10px; } .desc p { color: var(--muted); margin: 0; }

/* ---------- Cart page ---------- */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.cart-table { padding: 10px 22px; } .cart-table:hover, .cart-summary:hover { transform: none; }
.table-scroll { overflow-x: auto; }
.cart-table table { width: 100%; border-collapse: collapse; min-width: 560px; }
.cart-table th { text-align: left; padding: 14px 10px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--border); }
.cart-table td { padding: 16px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cart-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--text) 3.5%, transparent); }
.cart-table tbody tr:hover { background: color-mix(in srgb, var(--brand) 12%, transparent); }
.ct-prod { display: flex; align-items: center; gap: 14px; font-weight: 600; } .ct-prod small { display: block; color: var(--muted); font-weight: 400; }
.cart-summary { padding: 26px; position: sticky; top: calc(var(--header-h) + 36px); }
.cart-summary h3 { margin-bottom: 14px; }
.sum-row { display: flex; justify-content: space-between; font-size: 18px; margin-bottom: 8px; }

/* ---------- Footer ---------- */
.footer { position: relative; margin-top: 90px; padding-top: 110px; background: linear-gradient(180deg, var(--bg-soft), color-mix(in srgb, var(--brand) 22%, var(--bg-soft))); }
.footer-wave { top: -1px; bottom: auto; transform: rotate(180deg); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.3fr 1.2fr; gap: 36px; padding-bottom: 40px; }
.footer h4 { margin-bottom: 14px; font-size: 17px; }
.flinks { display: grid; gap: 10px; color: var(--muted); } .flinks a:hover { color: var(--brand); } .flinks i { color: var(--brand); margin-right: 8px; width: 16px; }
.socials { display: flex; gap: 10px; margin-top: 16px; }
.socials a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--input); border: 1px solid var(--border); transition: background .15s, color .15s, transform .15s; }
.socials a:hover { background: var(--brand); color: #fff; transform: translateY(-3px); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 20px 0 26px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }

/* ---------- Misc ---------- */
.flash { margin-top: 18px; padding: 14px 20px; border-radius: 999px; border: 1px solid var(--border); background: var(--glass); }
.flash.ok { border-color: #37b24d; } .flash.bad { border-color: #e03131; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 300; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; padding: 14px 24px; border-radius: 999px; color: #fff; background: #1f2a25; border: 1px solid rgba(255,255,255,.15); box-shadow: var(--shadow); transition: opacity .25s, transform .25s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.err { background: #b02525; }
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; font-size: 30px; color: #fff; background: #25d366; box-shadow: 0 10px 28px rgba(37,211,102,.45); transition: transform .2s; }
.wa-float:hover { transform: scale(1.1) rotate(-6deg); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .hsearch input { width: 140px; } .hsearch input:focus { width: 180px; }
    .touch-btn { display: none; }
    .logo-text small { display: none; }
}
@media (max-width: 991px) {
    .grid.cols-4, .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .about, .product-view, .contact-layout.with-map, .cart-layout { grid-template-columns: 1fr; }
    .shop-layout { grid-template-columns: 1fr; }
    .side-card { position: static; max-height: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .cart-summary { position: static; }

    .burger { display: grid; place-items: center; }
    .hsearch { display: none; }
    .header-in { border-radius: 36px; gap: 12px; padding: 0 14px; }
    .header-actions { margin-left: auto; }

    /* Off-canvas navigation; scrolls vertically so nothing is hidden */
    .nav {
        position: fixed; top: 0; bottom: 0; left: 0; width: min(340px, 88vw); z-index: 120; flex: none;
        padding: 20px 16px 30px; overflow-y: auto; overflow-x: hidden;
        background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
        border-right: 1px solid var(--border); border-radius: 0 var(--r-lg) var(--r-lg) 0; box-shadow: var(--shadow);
        transform: translateX(-105%); transition: transform .3s ease;
    }
    body.nav-open .nav { transform: none; }
    body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 110; background: rgba(0,0,0,.5); }
    .nav > ul { flex-direction: column; align-items: stretch; gap: 4px; }
    .nav li { position: relative; }
    .nav-top { display: flex; padding: 14px 16px; padding-right: 56px; border-radius: 16px; }
    .nav-top i { display: none; }
    .sub-toggle { display: grid; place-items: center; position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--input); color: var(--text); cursor: pointer; }
    .sub-toggle i { transition: transform .2s; } li.open > .sub-toggle i { transform: rotate(180deg); }
    .drop, .mega { position: static; opacity: 1; visibility: visible; transform: none; display: none; margin: 4px 0 8px; box-shadow: none; max-height: none; border-radius: 18px; padding: 10px; background: var(--input); }
    .drop::before, .mega::before { display: none; }
    li.open > .drop, li.open > .mega { display: block; }
    .nav li:hover > .nav-top { background: transparent; color: inherit; }
    .mega-grid { grid-template-columns: 1fr; gap: 10px; }
    .mega-head { flex-direction: row; align-items: center; } .mega-head img, .mega-ico { width: 56px; height: 56px; font-size: 22px; border-radius: 16px; flex: none; }
    .nav li.has-mega { position: relative; }
    .mini-cart { right: -60px; }
}
@media (max-width: 640px) {
    .grid.cols-4, .grid.cols-3 { grid-template-columns: 1fr; }
    .topbar-msg { display: none; } .topbar-in { justify-content: flex-end; }
    .topbar-links a:first-child { display: none; }
    .wrap { width: calc(100% - 28px); }
    .section { padding: 40px 0; }
    .hero { min-height: 600px; } .hero-nav { display: none; }
    .footer-grid { grid-template-columns: 1fr; }
    .mini-cart { width: min(340px, calc(100vw - 28px)); right: -52px; }
    .sec-title { gap: 12px; } .sec-title h2 { font-size: 22px; }
    .stats-band { border-radius: 48px; }
    .shop-bar { border-radius: 28px; } .shop-bar > span { width: 100%; }
    .pactions { opacity: 1; transform: none; bottom: 10px; }
    .buy .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
