/* Al Zad Épicerie fine — design system (light, warm, gold) */
:root {
  --cream: #fffdf8;
  --beige: #efe6d6;
  --beige-2: #f7f1e6;
  --line: #e7dcc8;
  --gold: #c9a25e;
  --gold-d: #9c7a3c;
  --gold-l: #e9d6ae;
  --ink: #0f0d0a;
  --taupe: #6b5f52;
  --taupe-2: #8b7f70;
  --danger: #b4483a;
  --wa: #1f9d55;
  --white: #ffffff;

  --font: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Montserrat", ui-sans-serif, system-ui, sans-serif;

  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(60, 44, 20, .05), 0 2px 8px rgba(60, 44, 20, .04);
  --shadow-md: 0 10px 30px -12px rgba(60, 44, 20, .22);
  --shadow-gold: 0 8px 22px -10px rgba(156, 122, 60, .55);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --header-h: 72px;
  color-scheme: light;
}
html[dir="rtl"] {
  --font: "Cairo", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Aref Ruqaa", "Amiri", "Cairo", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--cream); color: var(--taupe);
  font-family: var(--font); font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  opacity: 0; transition: opacity .35s ease;
}
body.page-ready { opacity: 1; }
body.page-leave { opacity: 0; transition-duration: .18s; }
@media (min-width: 900px) { body { font-size: 16px; } }

h1, h2, h3, h4 { color: var(--ink); margin: 0 0 .4em; font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
html[dir="rtl"] h1, html[dir="rtl"] h2 { font-weight: 700; letter-spacing: 0; line-height: 1.35; }
html[dir="rtl"] h3, html[dir="rtl"] h4 { font-family: "Cairo", sans-serif; font-weight: 700; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.35rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
svg { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }
svg[stroke] { fill: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
ul { list-style: none; margin: 0; padding: 0; }
::selection { background: var(--gold-l); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold-d); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 18px; }
@media (min-width: 900px) { .container { padding-inline: 32px; } }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { inset-inline-start: 8px; }
.muted { color: var(--taupe-2); }
.text-center { text-align: center; }
.mt-lg { margin-top: 36px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; color: var(--gold-d);
  font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--gold); }
html[dir="rtl"] .eyebrow { letter-spacing: 0; font-size: .9rem; text-transform: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: var(--r-pill); font-weight: 600; font-size: .9rem;
  letter-spacing: .02em; border: 1px solid transparent; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-navy { background: var(--ink); color: var(--cream); box-shadow: 0 8px 20px -12px rgba(15, 13, 10, .7); }
.btn-navy:hover { background: #26201a; box-shadow: var(--shadow-gold); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--cream); }
.btn-outline:disabled { border-color: var(--line); color: var(--taupe-2); cursor: not-allowed; transform: none; background: transparent; }
.btn-whatsapp { background: var(--wa); color: #fff; }
.btn-whatsapp:hover { background: #188a49; box-shadow: 0 8px 20px -10px rgba(31, 157, 85, .6); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .82rem; }
.btn-block { width: 100%; }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr, .link-arrow:hover .arr { transform: translateX(4px); }
html[dir="rtl"] .arr { transform: scaleX(-1); }
html[dir="rtl"] .btn:hover .arr, html[dir="rtl"] .link-arrow:hover .arr { transform: scaleX(-1) translateX(4px); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; color: var(--gold-d); font-weight: 600; font-size: .9rem; }
.link-arrow:hover { color: var(--ink); }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 253, 248, .92); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(60, 44, 20, .4); }
.topbar { background: var(--ink); color: #e9dfcc; font-size: .74rem; letter-spacing: .02em; }
.topbar-in { display: flex; align-items: center; gap: 22px; min-height: 34px; }
.tb-item { display: inline-flex; align-items: center; gap: 7px; }
.tb-item svg { color: var(--gold); width: 14px; height: 14px; }
.tb-end { margin-inline-start: auto; }
.tb-end:hover { color: #fff; }
.tb-hide { display: none; }
@media (min-width: 760px) { .tb-hide { display: inline-flex; } }
@media (max-width: 420px) { .topbar { font-size: .68rem; } .topbar-in { gap: 12px; } }

.navbar { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 46px; height: 46px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { color: var(--ink); font-size: 1.12rem; font-weight: 700; letter-spacing: .04em; }
.brand-text span { font-size: .64rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-d); margin-top: 3px; }
html[dir="rtl"] .brand-text strong { font-family: "Aref Ruqaa", serif; font-size: 1.45rem; letter-spacing: 0; }
html[dir="rtl"] .brand-text span { letter-spacing: 0; font-size: .78rem; }

.nav-links { display: none; }
.nav-links a { position: relative; padding: 8px 2px; font-weight: 500; font-size: .92rem; color: var(--ink); }
.nav-links a::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1.5px; background: var(--gold); transform: scaleX(0); transition: transform .3s var(--ease); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--gold-d); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }

.lang-toggle { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--white); }
.lang-toggle button { min-width: 36px; height: 30px; border-radius: var(--r-pill); font-size: .78rem; font-weight: 600; color: var(--taupe); transition: background .25s, color .25s; }
.lang-toggle button[data-lang="ar"] { font-family: "Cairo", sans-serif; font-size: .95rem; }
.lang-toggle button.active { background: var(--ink); color: var(--cream); }

.cart-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--beige-2); border: 1px solid var(--line); transition: background .25s, transform .25s var(--ease); }
.cart-btn:hover { background: var(--beige); }
.cart-btn svg { width: 21px; height: 21px; }
.cart-badge { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--gold); color: var(--ink); font-size: .7rem; font-weight: 700; display: none; align-items: center; justify-content: center; border: 2px solid var(--cream); }
.cart-btn.bump { animation: bump .45s var(--ease); }
.cart-badge.bump { animation: badgePop .45s var(--ease); }
@keyframes bump { 30% { transform: scale(1.12) rotate(-6deg); } 60% { transform: scale(.96); } }
@keyframes badgePop { 40% { transform: scale(1.35); background: var(--gold-d); color: #fff; } }

.burger { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); }
.burger svg { width: 24px; height: 24px; }
@media (max-width: 899px) {
  .nav-links { display: flex; flex-direction: column; position: absolute; inset-inline: 0; top: 100%; background: var(--cream); border-bottom: 1px solid var(--line); padding: 8px 18px 18px; box-shadow: var(--shadow-md);
    opacity: 0; transform: translateY(-8px); pointer-events: none; visibility: hidden; transition: opacity .25s, transform .25s var(--ease), visibility .25s; }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
  .nav-links a { padding: 13px 4px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav-links a::after { display: none; }
  .brand-text span { display: none; }
}
@media (min-width: 900px) {
  .nav-links { display: flex; gap: 32px; margin-inline-start: 40px; }
  .burger { display: none; }
  .brand img { width: 52px; height: 52px; }
}
@media (max-width: 380px) { .brand-text { display: none; } }

/* ===== Mini cart ===== */
.mini-cart-panel { position: fixed; z-index: 60; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 24px 60px -20px rgba(60, 44, 20, .35);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .22s, transform .22s var(--ease), visibility .22s; max-height: 70vh; display: flex; flex-direction: column; overflow: hidden; }
.mini-cart-panel.open { opacity: 1; visibility: visible; transform: none; }
.mini-cart-list { overflow-y: auto; padding: 8px 14px; }
.mini-cart-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--beige); }
.mini-cart-item-ico { width: 52px; height: 52px; border-radius: 10px; background: var(--beige-2); display: grid; place-items: center; overflow: hidden; font-size: 1.4rem; }
.mini-cart-item-ico img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.mini-cart-item-name { font-size: .84rem; color: var(--ink); font-weight: 500; line-height: 1.3; }
.mini-cart-item-price { font-size: .76rem; color: var(--taupe-2); margin: 2px 0 6px; }
.mini-cart-item-side { text-align: end; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.mini-cart-item-total { font-weight: 700; color: var(--ink); font-size: .86rem; }
.mini-cart-remove { color: var(--taupe-2); font-size: .8rem; width: 26px; height: 26px; border-radius: 50%; }
.mini-cart-remove:hover { background: var(--beige); color: var(--danger); }
.mini-cart-footer { padding: 14px; border-top: 1px solid var(--line); background: var(--beige-2); display: grid; gap: 10px; }
.mini-cart-subtotal { display: flex; justify-content: space-between; color: var(--ink); }
.mini-cart-empty { padding: 28px 20px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.mini-cart-empty .ico { font-size: 2rem; }
.mini-cart-empty p { margin: 0; color: var(--ink); font-weight: 500; }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; background: radial-gradient(120% 80% at 85% 0%, var(--beige) 0%, rgba(239, 230, 214, 0) 60%), var(--cream); padding: 34px 0 56px; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-l), transparent); }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero h1, .page-hero h1 { font-weight: 600; }
html:not([dir="rtl"]) .hero h1 { letter-spacing: -.025em; }
.lead { font-size: 1.04rem; max-width: 34em; color: var(--taupe); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 28px; }
.hero-badges { display: grid; gap: 10px; }
.hero-badges li { display: inline-flex; align-items: center; gap: 10px; font-size: .86rem; color: var(--ink); }
.hero-badges svg { color: var(--gold-d); width: 18px; height: 18px; }
.hero-media { position: relative; padding-bottom: 34px; padding-inline-end: 14px; }
.arch { border-radius: 999px 999px var(--r-lg) var(--r-lg); overflow: hidden; aspect-ratio: 4 / 4.3; background: var(--beige); box-shadow: var(--shadow-md); border: 6px solid var(--white); }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero-inset { position: absolute; inset-inline-start: -6px; bottom: 0; width: 46%; aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; border: 5px solid var(--white); box-shadow: var(--shadow-md); background: var(--beige); }
.hero-inset img { width: 100%; height: 100%; object-fit: cover; }
.hero-seal { position: absolute; inset-inline-end: 0; top: 14%; width: 78px; height: 78px; padding: 8px; background: var(--cream); border-radius: 50%; box-shadow: var(--shadow-sm); border: 1px solid var(--gold-l); }
@media (min-width: 640px) { .hero-badges { display: flex; flex-wrap: wrap; gap: 10px 24px; } }
@media (min-width: 900px) {
  .hero { padding: 64px 0 88px; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 64px; }
  .arch { aspect-ratio: 4 / 4.6; }
  .hero-seal { width: 104px; height: 104px; }
}
@media (max-width: 899px) { .hero-media { max-width: 520px; margin-inline: auto; width: 100%; } }

.page-hero { background: linear-gradient(180deg, var(--beige) 0%, var(--cream) 100%); padding: 40px 0 26px; text-align: center; border-bottom: 1px solid var(--line); }
.page-hero .eyebrow { justify-content: center; }
.page-hero .eyebrow::after { content: ""; width: 26px; height: 1px; background: var(--gold); }
.page-hero h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); margin-bottom: 8px; }
.page-hero p { margin: 0 auto; max-width: 36em; }
@media (min-width: 900px) { .page-hero { padding: 64px 0 40px; } }

/* ===== Sections ===== */
.section { padding: 60px 0; }
.section-tight { padding: 28px 0 64px; }
.section-beige { background: var(--beige-2); border-block: 1px solid var(--line); }
@media (min-width: 900px) { .section { padding: 96px 0; } }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head p { margin: 6px 0 0; }
.section-head-row { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; }
.section-head-row > div { max-width: 640px; }

.services { display: grid; gap: 16px; }
@media (min-width: 760px) { .services { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.service, .info-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.service:hover, .info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--gold-l); }
.service p, .info-card p { margin: 0; font-size: .92rem; }
.ico-circle { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--beige-2); border: 1px solid var(--gold-l); color: var(--gold-d); margin-bottom: 18px; }
.ico-circle svg { width: 22px; height: 22px; }
.info-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .info-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .info-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.info-card a:not(.link-arrow) { color: var(--ink); border-bottom: 1px solid var(--gold-l); }
.info-card .link-arrow { margin-top: 12px; font-size: .84rem; }

/* category tiles */
.cat-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .cat-tiles { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.cat-tile { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 14px 16px; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--gold-l); }
.cat-tile-img { width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle, #fff 55%, var(--beige-2) 56%); display: grid; place-items: center; overflow: hidden; margin-bottom: 10px; font-size: 2rem; border: 1px solid var(--line); }
.cat-tile-img img { width: 70%; height: 70%; object-fit: contain; }
.cat-tile-name { color: var(--ink); font-weight: 600; font-size: .88rem; line-height: 1.3; }
.cat-tile-count { font-size: .74rem; color: var(--gold-d); }
@media (min-width: 900px) { .cat-tile-img { width: 112px; height: 112px; } }

/* split */
.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1.1fr 1fr; gap: 64px; } }
.split-media { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); border: 6px solid var(--white); background: var(--beige); aspect-ratio: 16 / 10; }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 26px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.stat b { color: var(--ink); font-size: 1.2rem; font-weight: 700; line-height: 1.2; }
.stat span { font-size: .74rem; color: var(--taupe-2); line-height: 1.35; }
@media (min-width: 900px) { .stat b { font-size: 1.45rem; } }

/* ===== Product grid / cards ===== */
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1050px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; } }
.product-card { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 10px 12px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; animation: cardIn .45s var(--ease) both; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--gold-l); }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } }
@media (min-width: 700px) { .product-card { padding: 14px 14px 16px; gap: 8px; } }
.product-thumb { aspect-ratio: 1; border-radius: 12px; background: #fff; display: grid; place-items: center; overflow: hidden; margin-bottom: 6px; position: relative; }
.product-thumb::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, var(--beige-2), var(--beige)); z-index: 0; }
.product-thumb:has(img)::before { background: #fff; }
.product-thumb img { position: relative; z-index: 1; width: 86%; height: 86%; object-fit: contain; opacity: 0; transform: scale(.98); transition: opacity .45s ease, transform .6s var(--ease); }
.product-thumb img.loaded { opacity: 1; transform: none; }
.product-thumb img.is-logo { width: 56%; height: 56%; opacity: 0; }
.product-thumb img.is-logo.loaded { opacity: .55; }
.product-card:hover .product-thumb img.loaded:not(.is-logo) { transform: scale(1.04); }
.thumb-ico { position: relative; z-index: 1; font-size: 2.1rem; opacity: .85; }
.product-cat { font-size: .64rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold-d); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[dir="rtl"] .product-cat { letter-spacing: 0; font-size: .74rem; }
.product-name { font-size: .86rem; font-weight: 500; color: var(--ink); line-height: 1.35; min-height: 2.7em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 700px) { .product-name { font-size: .92rem; } }
.product-meta { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; }
.price { color: var(--ink); font-weight: 700; font-size: 1rem; white-space: nowrap; }
.price .old { display: block; font-weight: 400; font-size: .76rem; color: var(--taupe-2); text-decoration: line-through; }
.product-card .add-btn, .product-card .stepper { width: 100%; margin-top: 6px; }
.product-card .stepper { justify-content: space-between; }
.badge { position: absolute; z-index: 2; top: 16px; inset-inline-start: 16px; background: var(--gold); color: var(--ink); font-size: .7rem; font-weight: 700; padding: 4px 9px; border-radius: var(--r-pill); }
.badge-out { background: rgba(15, 13, 10, .78); color: #fff; font-weight: 600; }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--beige-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; background: var(--white); color: var(--ink); font-size: 1.1rem; font-weight: 600; box-shadow: var(--shadow-sm); transition: background .2s; }
.stepper button:hover { background: var(--ink); color: var(--cream); }
.stepper span { min-width: 26px; text-align: center; font-weight: 700; color: var(--ink); }
.stepper-sm button { width: 26px; height: 26px; font-size: .9rem; }
.stepper-sm span { min-width: 20px; font-size: .82rem; }

/* ===== Catalogue tools ===== */
.catalogue-tools { position: sticky; top: calc(var(--header-h) + 34px); z-index: 20; background: rgba(255, 253, 248, .95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); margin-inline: -18px; padding: 12px 18px 10px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
@media (min-width: 900px) { .catalogue-tools { position: static; margin-inline: 0; padding: 0 0 18px; background: none; backdrop-filter: none; border: 0; } }
.chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; margin-bottom: 4px; scroll-snap-type: x proximity; }
.chip-row::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .chip-row { flex-wrap: wrap; overflow: visible; padding-bottom: 16px; } }
.chip { flex: none; scroll-snap-align: start; padding: 8px 15px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--white); color: var(--ink); font-size: .8rem; font-weight: 500; white-space: nowrap; transition: background .25s, color .25s, border-color .25s; }
.chip:hover { border-color: var(--gold); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.filters-bar { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.search-box { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-pill); transition: border-color .25s, box-shadow .25s; }
.search-box:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201, 162, 94, .15); }
.search-box svg { color: var(--gold-d); }
.search-box input { flex: 1; border: 0; outline: 0; background: none; min-width: 0; font-size: .95rem; color: var(--ink); }
.instock-toggle { display: inline-flex; align-items: center; gap: 10px; font-size: .84rem; color: var(--ink); cursor: pointer; user-select: none; }
.instock-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 38px; height: 22px; border-radius: 11px; background: var(--line); position: relative; transition: background .25s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .25s var(--ease); }
.instock-toggle input:checked + .switch { background: var(--gold); }
.instock-toggle input:checked + .switch::after { transform: translateX(16px); }
html[dir="rtl"] .instock-toggle input:checked + .switch::after { transform: translateX(-16px); }
.instock-toggle input:focus-visible + .switch { outline: 2px solid var(--gold-d); outline-offset: 2px; }
.select-inline { height: 42px; padding: 0 34px 0 14px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239c7a3c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 14px; appearance: none; font-size: .82rem; color: var(--ink); max-width: 100%; }
html[dir="rtl"] .select-inline { padding: 0 14px 0 34px; background-position: left 12px center; }
@media (min-width: 900px) { .filters-bar { grid-template-columns: 1fr auto auto; gap: 18px; } .search-box { grid-column: auto; } }
.result-count { font-size: .8rem; color: var(--taupe-2); margin-bottom: 14px; }
.empty-state { text-align: center; padding: 56px 20px; color: var(--taupe); display: grid; gap: 12px; justify-items: center; }
.empty-state .ico { font-size: 2.6rem; width: 88px; height: 88px; border-radius: 50%; background: var(--beige-2); border: 1px solid var(--gold-l); display: grid; place-items: center; }
.empty-state p { margin: 0; }

/* ===== Cart page ===== */
.cart-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 960px) { .cart-layout { grid-template-columns: 1.5fr 1fr; gap: 36px; } }
.cart-line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; margin-bottom: 10px; animation: cardIn .4s var(--ease) both; }
.cart-line .thumb { width: 72px; height: 72px; border-radius: 12px; background: var(--beige-2); display: grid; place-items: center; overflow: hidden; font-size: 1.7rem; }
.cart-line .thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; opacity: 0; transition: opacity .4s; }
.cart-line .thumb img.loaded { opacity: 1; }
.cart-line .thumb img.is-logo.loaded { opacity: .55; }
.cart-line .name { color: var(--ink); font-weight: 600; font-size: .9rem; line-height: 1.3; }
.cart-line .unit { font-size: .78rem; color: var(--taupe-2); }
.cart-line .stepper { margin-top: 8px; }
.remove-link { color: var(--taupe-2); font-size: .78rem; margin-top: 6px; text-decoration: underline; text-underline-offset: 3px; }
.remove-link:hover { color: var(--danger); }
#clearCartBtn { margin-top: 8px; }
.summary-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); }
@media (min-width: 960px) { .summary-card { position: sticky; top: 130px; padding: 28px; } }
.summary-card h3 { font-size: 1.15rem; margin-bottom: 14px; }
.summary-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: .9rem; border-bottom: 1px dashed var(--line); }
.summary-row.total { border: 0; padding-top: 14px; color: var(--ink); font-weight: 700; font-size: 1.1rem; }
#checkoutForm { margin-top: 18px; }
.option-group { margin-bottom: 16px; }
.field-label { display: block; font-size: .78rem; font-weight: 600; color: var(--ink); margin-bottom: 7px; letter-spacing: .02em; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 8px; cursor: pointer; transition: border-color .25s, background .25s; }
.radio-card.selected { border-color: var(--gold); background: #fbf6ec; }
.radio-card input { accent-color: var(--gold-d); margin-top: 4px; }
.radio-card .t { font-weight: 600; font-size: .88rem; color: var(--ink); }
.radio-card .d { font-size: .78rem; color: var(--taupe-2); }
.form-input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--cream); font-size: .92rem; color: var(--ink); transition: border-color .25s, box-shadow .25s; resize: vertical; }
.form-input:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201, 162, 94, .15); background: #fff; }
.pay-note { padding: 14px 16px; background: var(--beige-2); border: 1px solid var(--gold-l); border-radius: var(--r-sm); margin-bottom: 16px; }
.pay-note strong { color: var(--ink); font-size: .88rem; }
.pay-note p { margin: 4px 0 0; font-size: .82rem; }
.form-error { color: var(--danger); font-size: .85rem; margin-bottom: 12px; }
.form-note { font-size: .76rem; color: var(--taupe-2); text-align: center; margin-top: 10px; }

/* ===== Footer ===== */
.site-footer { background: var(--beige); border-top: 1px solid var(--line); padding-top: 52px; color: var(--taupe); font-size: .9rem; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: 1fr 1fr; }
.footer-about { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1.2fr 1fr; gap: 40px; } .footer-about { grid-column: auto; } }
.footer-logo { width: 84px; height: 84px; object-fit: contain; margin-bottom: 12px; }
.footer-about p { max-width: 30em; }
.site-footer h4 { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-d); margin-bottom: 14px; font-family: var(--font); font-weight: 700; }
html[dir="rtl"] .site-footer h4 { letter-spacing: 0; font-size: .92rem; }
.site-footer li { margin-bottom: 8px; }
.site-footer a:hover { color: var(--ink); }
.site-footer p { margin: 0 0 6px; }
.social-row { display: flex; gap: 10px; margin-top: 14px; }
.social-row a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); border: 1px solid var(--gold-l); color: var(--ink); transition: background .25s, color .25s, transform .25s var(--ease); }
.social-row a:hover { background: var(--ink); color: var(--cream); transform: translateY(-2px); }
.social-row svg { width: 18px; height: 18px; }
.footer-bottom { margin-top: 40px; padding: 18px 0 84px; border-top: 1px solid #e0d3bb; font-size: .78rem; color: var(--taupe-2); }
@media (min-width: 900px) { .footer-bottom { padding-bottom: 22px; } }

.whatsapp-float { position: fixed; bottom: 18px; inset-inline-end: 18px; z-index: 40; width: 54px; height: 54px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px -8px rgba(31, 157, 85, .6); transition: transform .3s var(--ease); }
.whatsapp-float:hover { transform: translateY(-3px) scale(1.04); }
.whatsapp-float svg { width: 28px; height: 28px; }

.toast { position: fixed; bottom: 86px; left: 50%; transform: translate(-50%, 16px); z-index: 70; background: var(--ink); color: var(--cream); padding: 11px 20px; border-radius: var(--r-pill); font-size: .86rem; box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease); }
.toast::before { content: "✓"; color: var(--gold); margin-inline-end: 8px; font-weight: 700; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Reveal ===== */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal-stagger.in-view > * { opacity: 1; transform: none; }
.reveal-stagger.in-view > *:nth-child(2) { transition-delay: .08s; }
.reveal-stagger.in-view > *:nth-child(3) { transition-delay: .16s; }
.reveal-stagger.in-view > *:nth-child(4) { transition-delay: .24s; }
.hero-media img, .split-media img { opacity: 0; transition: opacity .8s ease; }
.hero-media img.loaded, .split-media img.loaded, .hero-media img.hero-seal { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; }
  body { opacity: 1; }
}

/* Bidi: Latin product names and DT prices stay readable inside RTL */
.product-name, .mini-cart-item-name, .cart-line .name { unicode-bidi: plaintext; text-align: start; }
.price, .price .old, .mini-cart-item-total, .mini-cart-item-price, .cart-line .unit, .summary-row span:last-child, .mini-cart-subtotal strong { direction: ltr; unicode-bidi: isolate; }

/* ===== Map / Nous trouver ===== */
.map-wrap { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .map-wrap { grid-template-columns: .85fr 1.15fr; gap: 56px; } }
.map-list { display: grid; gap: 16px; margin: 8px 0 26px; }
.map-list li { display: flex; gap: 14px; align-items: flex-start; }
.map-list .ico-circle { margin: 0; width: 44px; height: 44px; flex: none; }
.map-list div { display: flex; flex-direction: column; gap: 2px; }
.map-list b { color: var(--ink); font-size: .9rem; }
.map-list a { color: var(--ink); }
.map-frame { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 2px solid var(--gold); box-shadow: var(--shadow-md), 0 0 0 6px var(--white); background: var(--beige); aspect-ratio: 4 / 3; }
@media (min-width: 900px) { .map-frame { aspect-ratio: 16 / 11; } }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: saturate(.85) sepia(.12); }
.pickup-dir { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .78rem; font-weight: 600; color: var(--gold-d); border-bottom: 1px solid var(--gold-l); }
.pickup-dir:hover { color: var(--ink); }
.pickup-dir svg { width: 14px; height: 14px; }
.footer-dir { border-bottom: 1px solid #d8c7a4; }

/* ===== v2 polish ===== */
.product-thumb:has(img.is-logo)::before { background: linear-gradient(135deg, var(--beige-2), #fbf7ef); }
.product-thumb img.is-logo.loaded { opacity: .28; }
.cart-line .thumb img.is-logo.loaded, .mini-cart-item-ico img.is-logo { opacity: .35; }
@media (max-width: 899px) {
  .catalogue-tools { padding: 10px 18px 8px; }
  .chip-row { padding-bottom: 8px; }
  .filters-bar { grid-template-columns: auto 1fr; gap: 8px; }
  .search-box { height: 44px; }
  .instock-toggle { font-size: .78rem; white-space: nowrap; }
  .select-inline { height: 38px; justify-self: end; font-size: .78rem; }
  .whatsapp-float { width: 48px; height: 48px; bottom: 14px; inset-inline-end: 14px; }
  .whatsapp-float svg { width: 24px; height: 24px; }
  .hero { padding-top: 24px; }
}

/* weighed items (per kg) quantity */
.qty-input { width: 58px; border: 0; background: transparent; text-align: center; font: inherit; font-weight: 700; color: var(--ink); padding: 0; outline: none; }
.qty-input:focus { background: var(--white); border-radius: 8px; box-shadow: 0 0 0 2px var(--gold-l); }
.qty-unit { font-size: .75rem; font-weight: 600; color: var(--gold-d); margin-inline-start: -2px; }
.stepper-sm .qty-input { width: 46px; font-size: .82rem; }
.qty-add { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.qty-add .add-btn { flex: 1; margin-top: 0 !important; }
.qty-field { display: inline-flex; align-items: center; gap: 2px; background: var(--beige-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px 10px; }

/* ---- features: badges, wishlist, per-kg, health chips, monthly basket, socials ---- */
.card-badges { position: absolute; z-index: 2; top: 16px; inset-inline-start: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; pointer-events: none; }
.card-badges .badge { position: static; }
.badge-low { background: var(--ink); color: var(--gold-l); }
.badge-new { background: var(--cream); color: var(--gold-d); border: 1px solid var(--gold-l); }
.wish-btn { position: absolute; z-index: 3; top: 14px; inset-inline-end: 14px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--taupe-2); transition: transform .25s var(--ease), color .25s, background .25s; }
.wish-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: fill .25s; }
.wish-btn:hover { transform: scale(1.08); color: var(--gold-d); }
.wish-btn.on { color: var(--danger); } .wish-btn.on svg { fill: currentColor; animation: bump .45s var(--ease); }
.wish-nav { text-decoration: none; } .wish-nav svg { width: 20px; height: 20px; }
.unit.ppu { font-size: .74rem; color: var(--taupe-2); }
.product-card.highlight { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-l), var(--shadow-md); }
.health-chips { margin-top: 8px; align-items: center; }
.health-label { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-d); margin-inline-end: 4px; white-space: nowrap; }
.chip-health.active { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.wish-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.wish-list { display: grid; gap: 12px; }
.wish-shared-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--beige-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px; margin-bottom: 16px; font-weight: 600; color: var(--gold-d); }
.monthly-teaser { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; background: linear-gradient(135deg, var(--beige-2), var(--beige)); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px 34px; box-shadow: var(--shadow-sm); }
.monthly-teaser h2 { margin-bottom: .2em; } .monthly-teaser p { margin: 0; color: var(--taupe); max-width: 60ch; }
@media (max-width: 760px) { .monthly-teaser { grid-template-columns: 1fr; text-align: center; justify-items: center; } }
.monthly-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; } .monthly-tools .search-box { flex: 1; min-width: 220px; }
.m-results { display: grid; gap: 6px; margin-bottom: 16px; }
.m-res { display: flex; justify-content: space-between; gap: 12px; text-align: start; padding: 10px 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm); transition: border-color .2s, transform .2s var(--ease); }
.m-res:hover { border-color: var(--gold); transform: translateY(-1px); } .m-res b { color: var(--gold-d); white-space: nowrap; }
.m-h { margin: 18px 0 10px; font-size: 1.05rem; }
#mLines { display: grid; gap: 12px; }
.tb-social { display: inline-flex; gap: 10px; align-items: center; }
.tb-social a { display: inline-flex; color: var(--gold); transition: color .2s, transform .2s; } .tb-social a:hover { color: #fff; transform: translateY(-1px); }
.tb-social svg { width: 15px; height: 15px; }
.tb-social .ig-fill, .tb-social svg path { fill: currentColor; }
.tb-social a[aria-label="Instagram"] svg circle:last-child { fill: currentColor; }
.tb-social a[aria-label="Instagram"] svg path, .social-row a[aria-label="Instagram"] svg path { fill: none; }
.social-row svg path { fill: currentColor; }
.tb-end + .tb-item { margin-inline-start: 14px; }

/* animated promo CTA (hero) */
.promo-cta { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px; margin: 16px 0 18px; padding: 12px 20px 12px 16px; border-radius: var(--r-pill); background: var(--ink); color: var(--gold-l); font-weight: 700; font-size: .92rem; letter-spacing: .02em; border: 1px solid var(--gold); box-shadow: 0 0 0 0 rgba(201,162,94,.55); animation: pcPulse 2.6s ease-in-out infinite; transition: transform .3s var(--ease), box-shadow .3s; text-decoration: none; }
.promo-cta[hidden] { display: none; }
.promo-cta::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(233,214,174,.55), transparent); transform: skewX(-20deg); animation: pcShine 4.2s ease-in-out infinite; pointer-events: none; }
.promo-cta:hover { transform: translateY(-3px); box-shadow: 0 12px 26px -12px rgba(156,122,60,.8); }
.promo-cta .arr { width: 16px; height: 16px; transition: transform .3s var(--ease); } .promo-cta:hover .arr { transform: translateX(3px); }
html[dir="rtl"] .promo-cta .arr { transform: scaleX(-1); }
.pc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,94,.3); }
.pc-count { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--gold); color: var(--ink); display: inline-grid; place-items: center; font-size: .78rem; font-weight: 800; }
@keyframes pcPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(201,162,94,.5); } 50% { box-shadow: 0 0 0 9px rgba(201,162,94,0); } }
@keyframes pcShine { 0%, 60% { left: -60%; } 85%, 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) { .promo-cta, .promo-cta::after { animation: none; } .promo-cta::after { display: none; } .promo-cta:hover { transform: none; } }

/* ===== Barcode scanner ===== */
.scan-btn { flex: none; display: grid; place-items: center; min-width: 44px; min-height: 44px; margin-inline-end: -12px; padding: 0; border: 0; background: none; color: var(--gold-d); cursor: pointer; border-radius: 50%; }
.scan-btn:hover, .scan-btn:focus-visible { color: var(--gold); outline: none; background: var(--beige-2); }
.zscan { grid-column: 1 / -1; position: relative; width: 100%; background: #000; border: 1px solid var(--gold); border-radius: var(--r-md); overflow: hidden; }
.zscan[hidden] { display: none; }
.zscan video { display: block; width: 100%; height: 104px; object-fit: cover; background: #000; }
.zscan-vf { position: absolute; left: 50%; top: 50%; width: 300px; max-width: calc(100% - 24px); height: 62px; transform: translate(-50%, -50%); pointer-events: none;
  background: linear-gradient(var(--gold),var(--gold)) 0 0/24px 3px, linear-gradient(var(--gold),var(--gold)) 0 0/3px 24px,
  linear-gradient(var(--gold),var(--gold)) 100% 0/24px 3px, linear-gradient(var(--gold),var(--gold)) 100% 0/3px 24px,
  linear-gradient(var(--gold),var(--gold)) 0 100%/24px 3px, linear-gradient(var(--gold),var(--gold)) 0 100%/3px 24px,
  linear-gradient(var(--gold),var(--gold)) 100% 100%/24px 3px, linear-gradient(var(--gold),var(--gold)) 100% 100%/3px 24px; background-repeat: no-repeat; }
.zscan-vf::after { content: ""; position: absolute; left: 8px; right: 8px; top: 50%; height: 1px; background: var(--gold); box-shadow: 0 0 6px var(--gold); animation: zscanPulse 1.2s ease-in-out infinite; }
@keyframes zscanPulse { 0%,100% { opacity: .25; } 50% { opacity: 1; } }
.zscan-x, .zscan-torch { position: absolute; top: 4px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; font-size: 18px; line-height: 1; }
.zscan-x { right: 4px; } .zscan-torch { left: 4px; }
.zscan-torch[hidden] { display: none; }
.zscan-torch.on { background: var(--gold); color: #000; }
.zscan-hint { position: absolute; left: 0; right: 0; bottom: 3px; text-align: center; font-size: 11px; color: rgba(255,255,255,.5); pointer-events: none; }
.zscan-err { position: absolute; inset: 0; background: #000; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px 44px; text-align: center; font-size: 12px; z-index: 1; }
.zscan-err[hidden] { display: none; }
.zscan-err button { border: 1px solid var(--gold); background: none; color: var(--gold); border-radius: var(--r-pill); padding: 4px 14px; font-size: 12px; cursor: pointer; }

/* ===== Scan cart page ===== */
.scan-tools { margin-bottom: 10px; }
.scan-results { display: grid; gap: 8px; margin-bottom: 16px; }
.scan-results:empty { display: none; }
.scan-res { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 10px; }
.scan-res .thumb { width: 52px; height: 52px; border-radius: 10px; background: var(--beige-2); overflow: hidden; display: grid; place-items: center; }
.scan-res .thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.scan-res .name { font-size: .86rem; font-weight: 600; color: var(--ink); unicode-bidi: plaintext; text-align: start; }
.scan-res .unit { font-size: .76rem; color: var(--taupe-2); direction: ltr; unicode-bidi: isolate; }
.cart-line .scan-qty { width: 64px; height: 32px; border: 0; background: none; text-align: center; font: inherit; font-size: .9rem; color: var(--ink); -moz-appearance: textfield; }
.cart-line .scan-qty::-webkit-inner-spin-button, .cart-line .scan-qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cart-line .line-end { display: grid; justify-items: end; gap: 6px; }
.cart-line .line-total { font-weight: 700; color: var(--ink); direction: ltr; unicode-bidi: isolate; }
.cart-line .rm-btn { border: 0; background: none; color: var(--taupe-2); font-size: .78rem; cursor: pointer; text-decoration: underline; padding: 4px; }
.cart-line .rm-btn:hover { color: var(--danger); }
.scan-summary { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; margin-top: 14px; display: grid; gap: 8px; }
.scan-summary .summary-row { display: flex; justify-content: space-between; font-size: .9rem; color: var(--taupe); }
.scan-summary .scan-total { font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.scan-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; flex-wrap: wrap; }
.scan-qr { position: fixed; inset: 0; z-index: 90; background: rgba(15,13,10,.72); display: grid; place-items: center; padding: 16px; }
.scan-qr[hidden] { display: none; }
.scan-qr-box { background: var(--cream); border: 1px solid var(--gold); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 12px; justify-items: center; width: min(420px, 100%); }
.scan-qr-code { background: #fff; padding: 10px; border-radius: var(--r-sm); width: 100%; }
.scan-qr-code img, .scan-qr-code svg { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.scan-qr-total { font-size: 1.4rem; font-weight: 700; color: var(--ink); direction: ltr; }
.scan-qr-warn { color: var(--danger); font-size: .86rem; margin: 0; text-align: center; }

/* ===== Delivery slots ===== */
.slot-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .slot-pick { grid-template-columns: 1fr; } }
/* ===== PWA install ===== */
.pwa-install { position: fixed; bottom: 14px; inset-inline-start: 14px; z-index: 60; display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px 8px 14px; border: 1px solid var(--gold-l); border-radius: var(--r-pill); background: var(--cream); color: var(--ink); font-size: .78rem; font-weight: 600; box-shadow: var(--shadow-sm); }
.pwa-install[hidden] { display: none; }
.pwa-install .pi-go { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.pwa-install .pi-x { border: 0; background: none; color: var(--taupe-2); cursor: pointer; font-size: 1rem; line-height: 1; padding: 2px 4px; }
.pwa-tip { position: fixed; left: 14px; right: 14px; bottom: 64px; z-index: 61; background: var(--ink); color: var(--cream); border-radius: var(--r-md); padding: 12px 14px; font-size: .84rem; box-shadow: var(--shadow-md); }
.pwa-tip[hidden] { display: none; }

/* ===================== UX layer (v3) ===================== */
/* 1. Shrinking sticky header */
.navbar { transition: height .3s var(--ease); }
.site-header .brand img { transition: width .3s var(--ease), height .3s var(--ease); }
body.scrolled-down .site-header .navbar { height: 58px; }
body.scrolled-down .site-header .brand img { width: 38px; height: 38px; }
@media (max-width: 699px) { body.scrolled-down .site-header .topbar { display: none; } }
/* 10. Open / closed badge */
.open-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); font-size: .72rem; font-weight: 700; white-space: nowrap; border: 1px solid var(--line); background: var(--white); color: var(--ink); }
.open-badge[hidden] { display: none; }
.open-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.open-badge.is-open { color: #1f7a45; border-color: rgba(31, 157, 85, .35); }
.open-badge.is-closed { color: var(--danger); border-color: rgba(180, 72, 58, .3); }
@media (max-width: 380px) { .open-badge { padding: 3px 8px; font-size: .66rem; } }
/* 2. Bottom tab bar (phones) */
.tabbar { display: none; }
@media (max-width: 699px) {
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 55; height: calc(58px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(255, 253, 248, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .68rem; font-weight: 600; color: var(--taupe-2); }
  .tabbar a.active { color: var(--gold-d); }
  .tabbar .tb-ic { position: relative; display: grid; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .tab-badge { top: -6px; inset-inline-end: -10px; }
  body.has-tabbar { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  body.has-tabbar.has-minibar { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
  /* floating stack: WhatsApp + back-to-top at inline-end, install pill at inline-start */
  body.has-tabbar .whatsapp-float { bottom: calc(70px + env(safe-area-inset-bottom)); }
  body.has-tabbar.has-minibar .whatsapp-float { bottom: calc(124px + env(safe-area-inset-bottom)); }
  body.has-tabbar .pwa-install { bottom: calc(76px + env(safe-area-inset-bottom)); }
  body.has-tabbar.has-minibar .pwa-install { bottom: calc(130px + env(safe-area-inset-bottom)); }
  body.has-tabbar .pwa-tip { bottom: calc(124px + env(safe-area-inset-bottom)); }
  body.has-tabbar .toast { bottom: calc(132px + env(safe-area-inset-bottom)); }
  body.has-tabbar.has-minibar .toast { bottom: calc(186px + env(safe-area-inset-bottom)); }
  body.has-tabbar .to-top { bottom: calc(134px + env(safe-area-inset-bottom)); }
  body.has-tabbar.has-minibar .to-top { bottom: calc(188px + env(safe-area-inset-bottom)); }
}
/* 14. Mini cart bar */
.minibar { display: none; }
@media (max-width: 699px) {
  .minibar:not([hidden]) { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: fixed; inset-inline: 8px; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 54; height: 48px; padding: 0 6px 0 14px; padding-inline: 14px 6px; background: var(--ink); color: var(--cream); border-radius: var(--r-pill); box-shadow: var(--shadow-md); animation: cardIn .3s var(--ease) both; }
  .minibar .mb-info { display: flex; align-items: baseline; gap: 10px; font-size: .8rem; }
  .minibar .mb-total { color: var(--gold); font-size: .98rem; direction: ltr; unicode-bidi: isolate; }
  .minibar .btn { background: var(--gold); color: #0f0d0a; box-shadow: none; }
}
/* 29. Back to top */
.to-top { position: fixed; bottom: 84px; inset-inline-end: 24px; z-index: 39; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--gold-l); background: var(--cream); color: var(--gold-d); display: grid; place-items: center; box-shadow: var(--shadow-sm); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .25s, transform .25s var(--ease); cursor: pointer; }
.to-top svg { width: 20px; height: 20px; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 699px) { .to-top { inset-inline-end: 24px; width: 40px; height: 40px; } }
/* 3. Skeletons */
.sk-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; display: grid; gap: 8px; }
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--beige-2) 25%, var(--beige) 50%, var(--beige-2) 75%); background-size: 200% 100%; animation: skShine 1.2s linear infinite; }
.sk-img { aspect-ratio: 1; border-radius: 12px; }
.sk-l { height: 12px; width: 85%; } .sk-s { height: 10px; width: 50%; } .sk-b { height: 32px; border-radius: var(--r-pill); }
@keyframes skShine { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
/* 4. Category chips with icons */
.chip-ico { margin-inline-end: 6px; font-size: 1rem; line-height: 1; vertical-align: -2px; }
#categoryChips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
#categoryChips::-webkit-scrollbar { display: none; }
.quick-filters .chip.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }
/* 5. Larger cards, bold gold price */
.product-card .product-name { font-size: .92rem; }
.product-card .price { color: var(--gold-d); font-weight: 800; font-size: 1.12rem; }
.product-card .price .old { font-weight: 500; }
@media (max-width: 380px) { .product-grid { gap: 10px; } .product-card .price { font-size: 1.02rem; } }
/* 12. Uniform square photo frames */
.product-thumb { aspect-ratio: 1; background: #fff; }
.product-thumb img { object-fit: contain; }
/* 27. Share button */
.share-btn { position: absolute; z-index: 3; top: 54px; inset-inline-end: 14px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--taupe-2); cursor: pointer; transition: color .25s, transform .25s var(--ease); }
.share-btn svg { width: 16px; height: 16px; }
.share-btn:hover { color: var(--gold-d); transform: scale(1.08); }
/* 17. Search suggestions */
.filters-bar { position: relative; }
.search-sug { grid-column: 1 / -1; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-md); overflow: hidden; z-index: 20; }
.search-sug[hidden] { display: none; }
.sug-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 7px 12px; border: 0; border-bottom: 1px solid var(--beige); background: none; text-align: start; cursor: pointer; color: var(--ink); font: inherit; }
.sug-item:last-child { border-bottom: 0; }
.sug-item:hover, .sug-item:focus-visible { background: var(--beige-2); outline: none; }
.sug-img { width: 40px; height: 40px; border-radius: 8px; background: #fff; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--beige); }
.sug-img img { width: 100%; height: 100%; object-fit: contain; }
.sug-name { font-size: .84rem; unicode-bidi: plaintext; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-price { font-size: .8rem; font-weight: 700; color: var(--gold-d); direction: ltr; unicode-bidi: isolate; }
/* 9. Hero carousel */
.hero-carousel { position: relative; }
.hero-carousel .hc-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0 !important; transition: opacity .8s ease; }
.hero-carousel .hc-slide.on.loaded, .hero-carousel .hc-slide.on { opacity: 1 !important; }
.hc-dots { position: absolute; z-index: 2; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; padding: 5px 8px; border-radius: var(--r-pill); background: rgba(15, 13, 10, .35); }
.hc-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.6); cursor: pointer; transition: width .3s var(--ease), background .3s; }
.hc-dots button.on { width: 20px; border-radius: 4px; background: var(--gold); }
/* 16 / 21. Horizontal rows */
.h-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 44%); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.h-row > * { scroll-snap-align: start; }
@media (min-width: 700px) { .h-row { grid-auto-columns: minmax(200px, 23%); gap: 18px; } }
.also-like { margin-top: 32px; }
.also-like h3 { margin: 0 0 14px; font-size: 1.15rem; }
/* 23. Toast tick */
.toast.no-tick::before { display: none; }
/* 25. Order summary */
.order-sum { position: fixed; inset: 0; z-index: 95; background: rgba(15, 13, 10, .6); display: grid; place-items: center; padding: 16px; }
.order-sum[hidden] { display: none; }
.os-box { width: min(480px, 100%); max-height: 88vh; overflow: auto; background: var(--cream); border: 1px solid var(--gold-l); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 10px; box-shadow: var(--shadow-md); }
.os-box h3 { margin: 0 0 4px; }
.os-lines { display: grid; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.os-line, .os-total, .os-row { display: flex; justify-content: space-between; gap: 12px; font-size: .86rem; }
.os-line span:first-child { unicode-bidi: plaintext; }
.os-total { font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.os-total .os-p { color: var(--gold-d); }
.os-row span { color: var(--taupe); }
.os-row strong { text-align: end; unicode-bidi: plaintext; }
.os-p { direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.os-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
body.os-open { overflow: hidden; }
/* 11. Splash (PWA standalone launch only) */
html.pwa-splash body::before { content: ""; position: fixed; inset: 0; z-index: 9999; background: var(--cream) url("../img/icons/icon-512.png") center / 140px no-repeat; transition: opacity .3s ease; }
html.pwa-splash.pwa-splash-out body::before { opacity: 0; }
/* 7. Automatic dark mode */
@media (prefers-color-scheme: dark) {
  :root { --cream: #14110d; --white: #1d1914; --beige: #2a241c; --beige-2: #221d17; --line: #3a3128; --ink: #f2ebdf; --taupe: #cbbda9; --taupe-2: #a5967f; --gold-l: #5a4a2e; --gold-d: #d9b679; --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 10px 30px -12px rgba(0,0,0,.7); color-scheme: dark; }
  .site-header { background: rgba(20, 17, 13, .92); }
  .tabbar { background: rgba(20, 17, 13, .96); }
  .hero { background: radial-gradient(120% 80% at 85% 0%, #2a241c 0%, rgba(42,36,28,0) 60%), var(--cream); }
  .wish-btn, .share-btn { background: rgba(29, 25, 20, .9); }
  .product-thumb, .sug-img, .cart-line .thumb img, .mini-cart-item-ico img, .scan-res .thumb img { background: #fff; }
  .btn-navy { background: var(--gold); color: #0f0d0a; }
  .minibar { background: #2a241c; border: 1px solid var(--gold-l); }
  .toast { background: #2a241c; color: var(--ink); border: 1px solid var(--gold-l); }
  .open-badge.is-open { color: #5fd08f; } .open-badge.is-closed { color: #ef8a7c; }
  .form-input:focus { background: var(--white); }
  img.hero-seal { filter: none; }
}
.product-card .qty-add { min-width: 0; }
.product-card .qty-add .add-btn { min-width: 0; padding-inline: 10px; }
@media (max-width: 380px) { .product-card .qty-field { flex: 0 1 auto; min-width: 0; } .product-card .qty-field .qty-input { width: 44px; } }
html, body { overflow-x: clip; }
@media (max-width: 400px) { .cart-line { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; } .cart-line .thumb { width: 56px; height: 56px; } .cart-line .info { min-width: 0; } }
/* ===== Header fixes (v3.1) ===== */
.topbar { background: #0f0d0a; color: #f1e7d3; }
.topbar a, .topbar .tb-item { color: #f1e7d3; }
.topbar .tb-item svg { color: #d9b679; }
.topbar-in { flex-wrap: nowrap; }
.topbar .tb-item { white-space: nowrap; }
.topbar .open-badge { margin-inline-start: 8px; padding: 1px 8px; font-size: .68rem; background: transparent; border-color: rgba(241, 231, 211, .25); }
.topbar .open-badge.is-open { color: #5fd08f; border-color: rgba(95, 208, 143, .45); }
.topbar .open-badge.is-closed { color: #ef8a7c; border-color: rgba(239, 138, 124, .45); }
@media (max-width: 1100px) { .topbar .tb-hide:nth-child(4) { display: none; } }
.nav-links a { white-space: nowrap; }
@media (min-width: 900px) and (max-width: 1199px) { .nav-links { gap: 18px; margin-inline-start: 24px; } .nav-links a { font-size: .84rem; } }
@media (prefers-color-scheme: dark) { .site-header .brand img { filter: brightness(0) invert(1); } }
@media (max-width: 480px) { .topbar .tb-social { display: none; } .topbar-in { gap: 10px; } .topbar .tb-item:first-child { min-width: 0; flex: 0 1 auto; } .topbar .tb-item:first-child > span[data-i18n] { overflow: hidden; text-overflow: ellipsis; min-width: 0; } .topbar .open-badge { margin-inline-start: 4px; } }
.brand { flex: none; }
.brand-text strong, .brand-text span { white-space: nowrap; }
@media (min-width: 900px) and (max-width: 1099px) { .brand-text span { font-size: .56rem; letter-spacing: .14em; } .nav-links { gap: 16px; margin-inline-start: 18px; } }
@media (min-width: 900px) and (max-width: 1099px) { .brand-text { display: none; } .navbar { gap: 12px; } }
