/* ==========================================================================
   Tenderness — storefront styles (RTL, mobile-first)
   Theme colors (--brand, --brand-deep, --brand-rgb, --tint, --tint-2, --bg)
   are injected per request from the admin theme setting.
   ========================================================================== */

:root {
  --brand: #e02e68;
  --brand-deep: #b81d50;
  --brand-rgb: 224, 46, 104;
  --tint: #fff5f8;
  --tint-2: #fde6ee;
  --bg: #fffbfc;

  --ink: #2a2226;
  --ink-2: #4a3f44;
  --muted: #85767c;
  --line: #f0e3e8;
  --surface: #ffffff;
  --danger: #d93a3a;
  --success: #1f9d5c;
  --wa: #25d366;

  --font: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-latin: 'Playfair Display', Georgia, serif;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --shadow-xs: 0 1px 2px rgba(42, 34, 38, .05);
  --shadow-sm: 0 4px 14px rgba(42, 34, 38, .06);
  --shadow: 0 12px 32px rgba(42, 34, 38, .08);
  --shadow-brand: 0 12px 30px rgba(var(--brand-rgb), .25);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --header-h: 68px;
  --bottom-nav-h: 0px;
  --container: 1240px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: var(--bottom-nav-h);
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 800; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(var(--brand-rgb), .18); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.latin { font-family: var(--font-latin); }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .container { padding-inline: 24px; } }

.section { padding-block: 36px; }
@media (min-width: 992px) { .section { padding-block: 56px; } }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 22px;
  border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 700; font-size: .95rem; white-space: nowrap;
  border: 1.5px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, color .25s, border-color .25s;
  position: relative; overflow: hidden; isolation: isolate;
}
.btn::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(120%); transition: transform .7s var(--ease);
}
.btn:hover::after { transform: translateX(-120%); }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-brand); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }
.btn-dark { --btn-bg: var(--ink); }
.btn-dark:hover { box-shadow: 0 12px 30px rgba(42,34,38,.25); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--brand); border-color: rgba(var(--brand-rgb), .35); }
.btn-ghost:hover { --btn-bg: var(--brand); --btn-fg: #fff; border-color: var(--brand); }
.btn-light { --btn-bg: #fff; --btn-fg: var(--ink); box-shadow: var(--shadow-sm); }
.btn-soft { --btn-bg: var(--tint-2); --btn-fg: var(--brand-deep); }
.btn-soft:hover { box-shadow: none; --btn-bg: var(--brand); --btn-fg: #fff; }
.btn-wa { --btn-bg: var(--wa); }
.btn-wa:hover { box-shadow: 0 12px 30px rgba(37, 211, 102, .3); }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; padding-inline: 30px; font-size: 1.05rem; }
.btn-sm { min-height: 38px; padding: 6px 16px; font-size: .85rem; }
.btn-icon { width: 44px; min-height: 44px; padding: 0; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::before {
  content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn-ghost.is-loading::before, .btn-light.is-loading::before { border-color: rgba(var(--brand-rgb),.25); border-top-color: var(--brand); }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-grid; place-items: center; position: relative;
  color: var(--ink); font-size: 1.1rem;
  transition: background-color .2s, color .2s, transform .2s;
}
.icon-btn:hover { background: var(--tint-2); color: var(--brand); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-size: .88rem; font-weight: 700; color: var(--ink-2);
  transition: all .2s var(--ease); white-space: nowrap;
}
.chip:hover { border-color: rgba(var(--brand-rgb), .4); color: var(--brand); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.chip .count { font-size: .75rem; opacity: .7; font-weight: 800; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800;
}
.badge-amber { background: #fff4d6; color: #8a5a00; }
.badge-blue { background: #e3efff; color: #1f4f99; }
.badge-violet { background: #efe7ff; color: #5b37a8; }
.badge-green { background: #dcf5e7; color: #17663e; }
.badge-red { background: #fde3e3; color: #a32121; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 7px; }
.field label { font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 12px 16px;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r);
  outline: none; transition: border-color .2s, box-shadow .2s;
  font-size: 1rem;
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .12); }
.input.is-invalid, .select.is-invalid { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .82rem; font-weight: 700; }
.select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2385767c' stroke-width='2' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 16px center; padding-left: 40px;
}
.alert { padding: 14px 18px; border-radius: var(--r); font-weight: 700; display: flex; gap: 10px; align-items: flex-start; }
.alert-error { background: #fdeaea; color: #8f1f1f; }
.alert-success { background: #e2f6eb; color: #17663e; }

/* ==========================================================================
   Splash — the tree draws itself, then flies into the header logo.
   Shown once per browser session (see the inline head script).
   ========================================================================== */
.splash { display: none; }
html.show-splash .splash {
  display: grid; place-items: center;
  position: fixed; inset: 0; z-index: 9999;
  transition: opacity .55s var(--ease), visibility .55s;
}
.splash::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 40%, #fff 0%, var(--tint) 60%, var(--tint-2) 100%);
  transition: opacity .6s var(--ease);
}
.splash.is-flying::before { opacity: 0; }
html.show-splash body { overflow: hidden; }
html.show-splash .site-header .brand { opacity: 0; }
.splash.is-done { opacity: 0; visibility: hidden; }
.splash-stage { position: relative; display: grid; justify-items: center; gap: 18px; }
.splash-mark {
  width: 132px; height: 132px; border-radius: 50%;
  background: var(--brand);
  display: grid; place-items: center;
  transform: scale(0); animation: splashPop .7s .1s var(--ease-out) forwards;
  box-shadow: 0 20px 50px rgba(var(--brand-rgb), .35);
  will-change: transform;
}
.splash-mark::before {
  content: ''; position: absolute; inset: -14px; border-radius: 50%;
  border: 2px solid rgba(var(--brand-rgb), .25);
  animation: splashRing 1.6s .5s var(--ease-out) infinite;
}
.splash-mark { position: relative; }
.splash-tree { width: 78px; height: 75px; overflow: visible; }
.splash-fly { transition: transform .8s var(--ease-out); will-change: transform; }
.splash-tree use {
  fill: #fff; fill-opacity: 0;
  stroke: #fff; stroke-width: 20; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: splashDraw 1.5s .45s var(--ease) forwards, splashFill .6s 1.55s var(--ease) forwards;
}
.splash-word { width: 176px; height: 47px; color: var(--brand); fill: currentColor; opacity: 0; transform: translateY(14px); animation: splashWord .7s 1.45s var(--ease-out) forwards; will-change: transform; }
.splash-skip { position: absolute; bottom: 28px; inset-inline: 0; margin: auto; width: max-content; font-size: .8rem; color: var(--muted); opacity: 0; animation: fadeIn .4s 1s forwards; }
.splash.is-flying .splash-mark::before, .splash.is-flying .splash-skip { display: none; }
.splash.is-flying .splash-mark { box-shadow: none; transition: box-shadow .4s; }
.splash.is-flying .splash-tree use { animation: none; fill-opacity: 1; stroke-opacity: 0; stroke-dashoffset: 0; }
.splash.is-flying .splash-word { animation: none; opacity: 1; transform: none; }
@keyframes splashPop { 0% { transform: scale(0) rotate(-20deg); } 70% { transform: scale(1.06) rotate(2deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes splashRing { 0% { transform: scale(.85); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes splashDraw { to { stroke-dashoffset: 0; } }
@keyframes splashFill { to { fill-opacity: 1; stroke-opacity: 0; } }
@keyframes splashWord { to { opacity: 1; transform: none; } }

/* ---------- Page transition loader ---------- */
.page-progress {
  position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 9998;
  background: linear-gradient(90deg, var(--brand), #ff8fb3, var(--brand));
  background-size: 200% 100%;
  transform-origin: right; transform: scaleX(0); opacity: 0;
  transition: transform .4s var(--ease), opacity .3s;
  pointer-events: none;
}
.page-progress.is-active { opacity: 1; transform: scaleX(.75); transition: transform 2.5s cubic-bezier(.1,.7,.2,1), opacity .2s; animation: shimmer 1.2s linear infinite; }
.page-veil {
  position: fixed; inset: 0; z-index: 9997; pointer-events: none;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .55); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .25s var(--ease);
}
.page-veil.is-active { opacity: 1; pointer-events: auto; transition-delay: .18s; }
.page-veil .veil-mark {
  width: 58px; height: 58px; border-radius: 50%; background: var(--brand);
  display: grid; place-items: center; box-shadow: var(--shadow-brand);
  animation: veilPulse 1s var(--ease) infinite;
}
.page-veil .veil-mark svg { width: 34px; height: 33px; fill: #fff; }
@keyframes veilPulse { 50% { transform: scale(.88); box-shadow: 0 0 0 14px rgba(var(--brand-rgb), .08); } }
@keyframes shimmer { to { background-position: -200% 0; } }

main.page { animation: pageIn .6s var(--ease-out) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Header
   ========================================================================== */
.announce {
  background: var(--ink); color: #fff; font-size: .82rem; font-weight: 500;
  overflow: hidden; white-space: nowrap; height: 34px; display: flex; align-items: center;
}
.announce-track { display: inline-flex; gap: 48px; padding-inline-start: 48px; animation: marquee 32s linear infinite; }
.announce-track span { display: inline-flex; align-items: center; gap: 8px; }
.announce-track i { color: #ff9fbf; }
@keyframes marquee { to { transform: translateX(50%); } }

.site-header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s, border-color .3s, background-color .3s;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(42,34,38,.06); border-color: var(--line); background: rgba(255,255,255,.92); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; transition: opacity .3s; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 50%; background: var(--brand);
  display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(var(--brand-rgb), .3);
  transition: transform .5s var(--ease-out);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.brand-mark svg { width: 62%; height: 60%; fill: #fff; }
.brand-word { width: 112px; height: 30px; color: var(--brand); fill: currentColor; }
.header-nav { display: none; }
.header-actions { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.cart-count {
  position: absolute; top: 2px; inset-inline-start: 0;
  min-width: 19px; height: 19px; padding-inline: 5px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: .7rem; font-weight: 800;
  display: grid; place-items: center; border: 2px solid #fff;
  transform: scale(0); transition: transform .35s var(--ease-out);
}
.cart-count.has-items { transform: scale(1); }
.cart-count.bump { animation: bump .5s var(--ease-out); }
@keyframes bump { 40% { transform: scale(1.45); } }
.header-search { display: none; }
.menu-toggle { display: inline-grid; }

@media (min-width: 992px) {
  :root { --header-h: 80px; }
  .menu-toggle { display: none; }
  .brand-mark { width: 52px; height: 52px; }
  .brand-word { width: 128px; height: 34px; }
  .header-nav { display: flex; gap: 2px; margin-inline-start: 20px; }
  .header-nav a {
    position: relative; padding: 8px 12px; font-weight: 700; color: var(--ink-2); border-radius: 999px; white-space: nowrap;
    transition: color .2s, background-color .2s;
  }
  .header-nav a::after {
    content: ''; position: absolute; bottom: 2px; inset-inline: 14px; height: 2px; border-radius: 2px;
    background: var(--brand); transform: scaleX(0); transition: transform .3s var(--ease);
  }
  .header-nav a:hover, .header-nav a.is-active { color: var(--brand); }
  .header-nav a.is-active::after, .header-nav a:hover::after { transform: scaleX(1); }
  .header-search { display: block; position: relative; width: clamp(200px, 24vw, 320px); margin-inline-start: auto; }
  .header-actions { margin-inline-start: 8px; }
  .header-actions .search-trigger { display: none; }
}

/* ---------- Search ---------- */
.search-box { position: relative; }
.search-box .input { min-height: 44px; padding-inline-end: 44px; border-radius: 999px; background: var(--tint); border-color: transparent; font-size: .92rem; }
.search-box .input:focus { background: #fff; }
.search-box button[type=submit] { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.search-results {
  position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 50;
  background: #fff; border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid var(--line);
  padding: 6px; display: none; max-height: 420px; overflow-y: auto;
}
.search-results.is-open { display: block; animation: dropIn .25s var(--ease-out); }
.search-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--r-sm); transition: background-color .15s; }
.search-item:hover, .search-item.is-focus { background: var(--tint); }
.search-item img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: var(--tint); }
.search-item strong { display: block; font-size: .9rem; font-weight: 700; line-height: 1.4; }
.search-item small { color: var(--muted); font-size: .78rem; }
.search-empty { padding: 18px; text-align: center; color: var(--muted); font-size: .9rem; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.search-sheet {
  position: fixed; inset: 0; z-index: 1200; background: rgba(255,255,255,.98);
  padding: 16px; display: none; flex-direction: column; gap: 14px;
}
.search-sheet.is-open { display: flex; animation: fadeIn .2s; }
.search-sheet-head { display: flex; gap: 8px; align-items: center; }
.search-sheet-head .search-box { flex: 1; }
.search-sheet .search-results { position: static; display: block; box-shadow: none; border: 0; max-height: none; padding: 0; }
.search-sheet .search-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 1100; visibility: hidden;
}
.mobile-menu.is-open { visibility: visible; }
.mobile-menu-backdrop { position: absolute; inset: 0; background: rgba(42,34,38,.45); opacity: 0; transition: opacity .35s; }
.mobile-menu.is-open .mobile-menu-backdrop { opacity: 1; }
.mobile-menu-panel {
  position: absolute; inset-block: 0; inset-inline-start: 0; width: min(330px, 86vw);
  background: #fff; padding: 22px 18px; display: flex; flex-direction: column; gap: 18px;
  transform: translateX(100%); transition: transform .45s var(--ease-out); overflow-y: auto;
}
.mobile-menu.is-open .mobile-menu-panel { transform: none; }
.mobile-menu-links a { display: flex; align-items: center; gap: 12px; padding: 13px 12px; border-radius: var(--r); font-weight: 700; }
.mobile-menu-links a i { width: 22px; color: var(--brand); text-align: center; }
.mobile-menu-links a:hover, .mobile-menu-links a.is-active { background: var(--tint); color: var(--brand); }
.mobile-menu h4 { font-size: .8rem; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.mobile-menu .cats { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Bottom nav (mobile app feel) ---------- */
.bottom-nav { display: none; }
@media (max-width: 767px) {
  :root { --bottom-nav-h: calc(64px + env(safe-area-inset-bottom)); }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; bottom: 0; inset-inline: 0; z-index: 950;
    height: var(--bottom-nav-h); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255,255,255,.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
  }
  .bottom-nav a, .bottom-nav button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: .7rem; font-weight: 700; color: var(--muted); position: relative;
    transition: color .2s;
  }
  .bottom-nav i { font-size: 1.2rem; transition: transform .3s var(--ease-out); }
  .bottom-nav .is-active { color: var(--brand); }
  .bottom-nav .is-active i { transform: translateY(-2px); }
  .bottom-nav .is-active::before {
    content: ''; position: absolute; top: 0; width: 26px; height: 3px; border-radius: 0 0 4px 4px; background: var(--brand);
  }
  .bottom-nav .cart-count { top: 6px; inset-inline-start: calc(50% - 22px); }
  .bottom-nav .nav-shop i {
    width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
    background: var(--brand); color: #fff; margin-top: -22px; box-shadow: var(--shadow-brand); font-size: 1.1rem;
    border: 4px solid #fff;
  }
  .bottom-nav .nav-shop.is-active i { transform: none; }
  .bottom-nav .nav-shop.is-active::before { display: none; }
  .header-actions .account-link, .header-actions .cart-trigger { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding-top: 12px; }
.hero-swiper { border-radius: var(--r-xl); overflow: hidden; position: relative; box-shadow: var(--shadow); isolation: isolate; }
.hero-slide { position: relative; height: clamp(420px, 68vh, 620px); overflow: hidden; }
.hero-slide picture, .hero-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide img { transform: scale(1.12); transition: transform 7s linear; }
.swiper-slide-active .hero-slide img, .hero-slide.is-static img { transform: scale(1); }
.hero-slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(270deg, rgba(42,34,38,.62) 0%, rgba(42,34,38,.25) 45%, rgba(42,34,38,0) 75%);
}
.hero-content {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: 32px 28px; color: #fff; max-width: 620px;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(255,255,255,.18); backdrop-filter: blur(8px); font-size: .82rem; font-weight: 700; margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,.25);
}
.hero-title { font-size: clamp(1.9rem, 5.4vw, 3.4rem); font-weight: 900; line-height: 1.2; text-shadow: 0 4px 24px rgba(0,0,0,.25); }
.hero-title .latin { display: block; font-size: .62em; font-weight: 600; font-style: italic; margin-top: 6px; color: #ffd3e2; }
.hero-sub { margin-top: 12px; font-size: 1.02rem; opacity: .9; max-width: 440px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.hero-cta .btn-light { --btn-bg: rgba(255,255,255,.16); --btn-fg: #fff; border-color: rgba(255,255,255,.45); backdrop-filter: blur(6px); box-shadow: none; }
.hero-cta .btn-light:hover { --btn-bg: #fff; --btn-fg: var(--ink); }
.hero-content > * { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.swiper-slide-active .hero-content > *, .hero-slide.is-static .hero-content > * { opacity: 1; transform: none; }
.swiper-slide-active .hero-content > :nth-child(2) { transition-delay: .12s; }
.swiper-slide-active .hero-content > :nth-child(3) { transition-delay: .24s; }
.swiper-slide-active .hero-content > :nth-child(4) { transition-delay: .36s; }
.hero-pagination {
  position: absolute; z-index: 5; bottom: 22px !important; inset-inline-start: 28px !important; width: auto !important;
  display: flex; gap: 8px; left: auto !important;
}
.hero-pagination .swiper-pagination-bullet {
  width: 28px; height: 4px; border-radius: 4px; margin: 0 !important; background: rgba(255,255,255,.4); opacity: 1;
  position: relative; overflow: hidden;
}
.hero-pagination .swiper-pagination-bullet-active::after {
  content: ''; position: absolute; inset: 0; background: #fff; transform-origin: right; animation: heroBar 5.2s linear forwards;
}
@keyframes heroBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-arrows { position: absolute; z-index: 5; bottom: 16px; inset-inline-end: 20px; display: none; gap: 8px; }
.hero-arrows button { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.3); transition: background-color .2s, color .2s; }
.hero-arrows button:hover { background: #fff; color: var(--ink); }
@media (min-width: 768px) {
  .hero { padding-top: 20px; }
  .hero-content { padding: 48px 56px; }
  .hero-arrows { display: flex; }
}
@media (max-width: 767px) {
  .hero .container { padding-inline: 12px; }
  .hero-swiper { border-radius: var(--r-lg); }
  .hero-slide { height: 72vh; max-height: 560px; min-height: 440px; }
  .hero-slide::after { background: linear-gradient(0deg, rgba(42,34,38,.75) 0%, rgba(42,34,38,.25) 55%, rgba(42,34,38,.05) 100%); }
  .hero-content { justify-content: flex-end; padding: 26px 20px 54px; }
  .hero-pagination { inset-inline-start: 20px !important; bottom: 22px !important; }
}

/* ---------- Perks strip ---------- */
.perks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
.perk {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r);
  background: #fff; border: 1px solid var(--line);
}
.perk-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--tint-2); color: var(--brand); font-size: 1.05rem; flex-shrink: 0; }
.perk strong { display: block; font-size: .9rem; font-weight: 800; line-height: 1.35; }
.perk small { color: var(--muted); font-size: .78rem; line-height: 1.4; display: block; }
@media (min-width: 992px) { .perks { grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 22px; } .perk { padding: 18px; } }

/* ---------- Section headings ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-eyebrow { color: var(--brand); font-weight: 800; font-size: .82rem; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.section-eyebrow::before { content: ''; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.section-title { font-size: clamp(1.35rem, 3.2vw, 2rem); font-weight: 900; }
.section-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--brand); font-size: .92rem; white-space: nowrap; }
.section-link i { transition: transform .25s var(--ease); }
.section-link:hover i { transform: translateX(-4px); }
.rail-nav { display: none; gap: 8px; }
.rail-nav button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); transition: all .2s; }
.rail-nav button:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.rail-nav button.swiper-button-disabled { opacity: .35; pointer-events: none; }
@media (min-width: 768px) { .rail-nav { display: flex; } }

/* ---------- Categories ---------- */
.cat-rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 12px; scrollbar-width: none; }
.cat-rail::-webkit-scrollbar { display: none; }
.cat-item { scroll-snap-align: start; flex: 0 0 auto; width: 92px; text-align: center; }
.cat-ring {
  width: 92px; height: 92px; border-radius: 50%; padding: 3px; margin-bottom: 10px;
  background: conic-gradient(from 210deg, var(--brand), #ffb3cc, var(--brand-deep), var(--brand));
  transition: transform .4s var(--ease-out);
}
.cat-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid #fff; background: var(--tint); }
.cat-item:hover .cat-ring { transform: translateY(-4px) rotate(-4deg); }
.cat-item span { font-size: .85rem; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 768px) { .cat-rail { gap: 22px; } .cat-item { width: 116px; } .cat-ring { width: 116px; height: 116px; } }

/* ==========================================================================
   Product card
   ========================================================================== */
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1200px) { .product-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: #fff; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(var(--brand-rgb), .12); border-color: rgba(var(--brand-rgb), .2); }
.card-media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--tint); display: block; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out), opacity .4s; }
.card:hover .card-media img { transform: scale(1.07); }
.card-media img.is-loading { opacity: 0; }
.card-badges { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.card-badge { padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 800; background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(var(--brand-rgb), .3); }
.card-badge.new { background: var(--ink); box-shadow: none; }
.card-soldout {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center;
  background: rgba(255,255,255,.55); backdrop-filter: grayscale(1);
}
.card-soldout span { background: rgba(42,34,38,.85); color: #fff; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: .82rem; }
.card-quick {
  position: absolute; bottom: 10px; inset-inline: 10px; z-index: 2;
  display: flex; gap: 8px; justify-content: center;
  opacity: 0; transform: translateY(12px); transition: opacity .35s var(--ease), transform .35s var(--ease-out);
}
.card:hover .card-quick { opacity: 1; transform: none; }
.card-quick .btn { min-height: 40px; font-size: .85rem; padding-inline: 16px; box-shadow: var(--shadow-sm); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { font-size: .74rem; color: var(--muted); font-weight: 700; }
.card-title { font-size: .95rem; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.card-title a:hover { color: var(--brand); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.price { display: flex; flex-direction: column; line-height: 1.2; }
.price-now { font-weight: 900; color: var(--brand); font-size: 1.02rem; }
.price-now small, .price-old small { font-size: .7em; font-weight: 700; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .8rem; font-weight: 500; }
.card-add {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; background: var(--tint-2); color: var(--brand);
  transition: background-color .25s, color .25s, transform .25s var(--ease-out);
}
.card-add:hover { background: var(--brand); color: #fff; transform: rotate(-10deg) scale(1.06); }
.card-add.is-added { background: var(--success); color: #fff; }
.card-add[disabled] { opacity: .35; pointer-events: none; }
@media (hover: none) { .card-quick { display: none; } }
@media (max-width: 767px) {
  .card { border-radius: var(--r); }
  .card-body { padding: 10px 10px 12px; }
  .card-title { font-size: .86rem; }
  .price-now { font-size: .95rem; }
  .card-add { width: 36px; height: 36px; font-size: .9rem; }
}

.product-rail { overflow: visible; }
.product-rail .swiper-slide { height: auto; width: 46%; }
@media (min-width: 768px) { .product-rail .swiper-slide { width: 31%; } }
@media (min-width: 1200px) { .product-rail .swiper-slide { width: 23.6%; } }
.rail-wrap { overflow: hidden; margin-inline: -16px; padding-inline: 16px; padding-block: 6px 14px; }
@media (min-width: 768px) { .rail-wrap { margin-inline: 0; padding-inline: 0; overflow: hidden; } }

/* ---------- Banners ---------- */
.promo {
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--brand-deep), var(--brand) 60%, #ff7aa6);
  color: #fff; padding: 34px 24px; display: grid; gap: 18px; align-items: center;
  isolation: isolate;
}
.promo::before, .promo::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.1); z-index: -1; }
.promo::before { width: 300px; height: 300px; top: -120px; inset-inline-end: -80px; animation: floaty 9s ease-in-out infinite; }
.promo::after { width: 180px; height: 180px; bottom: -70px; inset-inline-start: 10%; animation: floaty 11s ease-in-out infinite reverse; }
.promo h3 { font-size: clamp(1.3rem, 3.4vw, 2rem); font-weight: 900; }
.promo p { opacity: .9; margin-top: 8px; max-width: 520px; }
.promo-tree { position: absolute; inset-inline-end: 4%; bottom: -18px; width: 180px; height: 172px; fill: rgba(255,255,255,.13); z-index: -1; }
.promo .btn-light { --btn-fg: var(--brand-deep); }
@media (min-width: 768px) { .promo { grid-template-columns: 1fr auto; padding: 48px 56px; } .promo-tree { width: 260px; height: 248px; inset-inline-end: 30%; } }
@keyframes floaty { 50% { transform: translate(14px, -16px); } }

.app-banner {
  border-radius: var(--r-xl); background: var(--ink); color: #fff; padding: 28px 24px;
  display: none; gap: 20px; align-items: center; position: relative; overflow: hidden;
}
.app-banner.is-visible { display: grid; animation: pageIn .6s var(--ease-out); }
.app-banner img { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.app-banner h3 { font-size: 1.3rem; }
.app-banner p { opacity: .75; font-size: .92rem; margin-top: 4px; }
.app-banner .feats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.app-banner .feats span { font-size: .78rem; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.1); }
@media (min-width: 768px) { .app-banner { grid-template-columns: auto 1fr auto; padding: 32px 40px; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { margin-top: 48px; background: #fff; border-top: 1px solid var(--line); position: relative; }
.site-footer::before {
  content: ''; position: absolute; top: -1px; inset-inline: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
}
.footer-grid { display: grid; gap: 30px; padding-block: 44px 28px; }
.footer-about p { color: var(--muted); font-size: .92rem; margin-top: 14px; max-width: 340px; }
.footer-col h4 { font-size: 1rem; margin-bottom: 14px; }
.footer-col li + li { margin-top: 8px; }
.footer-col a, .footer-col li { color: var(--muted); font-size: .92rem; transition: color .2s; }
.footer-col a:hover { color: var(--brand); }
.footer-col i { color: var(--brand); width: 18px; margin-inline-end: 6px; }
.socials { display: flex; gap: 8px; margin-top: 18px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--brand); transition: all .25s var(--ease-out); }
.socials a:hover { background: var(--brand); color: #fff; transform: translateY(-3px); }
.footer-pay { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.footer-pay span { font-size: .78rem; font-weight: 800; padding: 5px 10px; border-radius: 8px; background: var(--tint); color: var(--ink-2); }
.footer-bottom { border-top: 1px solid var(--line); padding-block: 18px; text-align: center; color: var(--muted); font-size: .85rem; }
.footer-bottom .heart { color: var(--brand); display: inline-block; animation: beat 1.6s infinite; }
@keyframes beat { 15%, 45% { transform: scale(1.25); } 30% { transform: scale(1); } }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }

/* ==========================================================================
   Drawers, modal, toasts
   ========================================================================== */
.overlay {
  position: fixed; inset: 0; z-index: 1300; background: rgba(42,34,38,.5);
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
  backdrop-filter: blur(2px);
}
.overlay.is-open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 1310;
  width: min(440px, 100vw); background: var(--bg);
  display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .5s var(--ease-out);
  box-shadow: -20px 0 50px rgba(0,0,0,.1);
}
.drawer.is-open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.drawer-head h3 { font-size: 1.15rem; display: flex; align-items: center; gap: 10px; }
.drawer-head h3 i { color: var(--brand); }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px 16px; }
.drawer-foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }

.cart-line { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 12px; background: #fff; border-radius: var(--r); border: 1px solid var(--line); animation: pageIn .4s var(--ease-out) both; }
.cart-line + .cart-line { margin-top: 10px; }
.cart-line img { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; background: var(--tint); }
.cart-line h4 { font-size: .9rem; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-line-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }
.cart-line .price-now { font-size: .95rem; }
.cart-line .remove { color: var(--muted); font-size: .8rem; display: inline-flex; gap: 4px; align-items: center; }
.cart-line .remove:hover { color: var(--danger); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; overflow: hidden; }
.qty button { width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink-2); transition: background-color .2s, color .2s; }
.qty button:hover { background: var(--tint-2); color: var(--brand); }
.qty input { width: 34px; text-align: center; border: 0; outline: none; font-weight: 800; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-lg button { width: 46px; height: 48px; font-size: 1.1rem; }
.qty-lg input { width: 46px; font-size: 1.1rem; }
.cart-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.cart-empty .empty-mark { width: 92px; height: 92px; margin: 0 auto 18px; border-radius: 50%; background: var(--tint-2); display: grid; place-items: center; color: var(--brand); font-size: 2rem; animation: floaty 4s ease-in-out infinite; }
.cart-empty h4 { color: var(--ink); font-size: 1.1rem; margin-bottom: 6px; }
.coupon-form { display: flex; gap: 8px; margin-bottom: 14px; }
.coupon-form .input { min-height: 44px; border-radius: 999px; font-size: .9rem; }
.coupon-form .btn { min-height: 44px; }
.totals { display: grid; gap: 8px; margin-bottom: 14px; font-size: .92rem; }
.totals > div { display: flex; justify-content: space-between; color: var(--muted); }
.totals .discount { color: var(--success); font-weight: 700; }
.totals .grand { color: var(--ink); font-weight: 900; font-size: 1.12rem; padding-top: 10px; border-top: 1px dashed var(--line); }
.totals .grand span:last-child { color: var(--brand); }

/* Modal (product quick view) */
.modal {
  position: fixed; inset: 0; z-index: 1400; display: grid; place-items: center; padding: 20px;
  visibility: hidden; pointer-events: none;
}
.modal.is-open { visibility: visible; pointer-events: auto; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(42,34,38,.55); backdrop-filter: blur(4px); opacity: 0; transition: opacity .35s; }
.modal.is-open .modal-backdrop { opacity: 1; }
.modal-dialog {
  position: relative; width: min(980px, 100%); max-height: calc(100vh - 40px); overflow: hidden;
  background: #fff; border-radius: var(--r-xl); box-shadow: 0 40px 80px rgba(0,0,0,.25);
  opacity: 0; transform: translateY(30px) scale(.97); transition: opacity .35s var(--ease), transform .5s var(--ease-out);
  display: flex; flex-direction: column;
}
.modal.is-open .modal-dialog { opacity: 1; transform: none; }
.modal-close {
  position: absolute; top: 14px; inset-inline-end: 14px; z-index: 10;
  width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: var(--shadow-sm);
  display: grid; place-items: center; font-size: 1.1rem; transition: transform .3s var(--ease-out), background-color .2s;
}
.modal-close:hover { transform: rotate(90deg); background: var(--brand); color: #fff; }
.modal-content { overflow-y: auto; overscroll-behavior: contain; }
.modal-loading { min-height: 420px; display: grid; place-items: center; }
.modal-loading .veil-mark { width: 58px; height: 58px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; animation: veilPulse 1s infinite; }
.modal-loading .veil-mark svg { width: 34px; height: 33px; fill: #fff; }
@media (max-width: 767px) {
  .modal { padding: 0; align-items: end; }
  .modal-dialog { border-radius: 26px 26px 0 0; max-height: 94vh; transform: translateY(100%); transition: transform .5s var(--ease-out), opacity .2s; }
  .modal-dialog::before { content: ''; position: absolute; top: 8px; inset-inline: 0; margin: auto; width: 44px; height: 5px; border-radius: 4px; background: rgba(255,255,255,.85); z-index: 11; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
  .modal-close { top: 18px; }
}

/* Product detail (shared by modal and full page) */
.pd { display: grid; grid-template-columns: minmax(0, 1fr); }
.pd > * { min-width: 0; }
.pd-gallery { position: relative; background: var(--tint); }
.pd-swiper { width: 100%; }
.pd-gallery .swiper-slide { aspect-ratio: 1 / 1; display: grid; place-items: center; }
.pd-gallery .swiper-slide img { width: 100%; height: 100%; object-fit: cover; }
.pd-gallery .swiper-pagination { bottom: 12px !important; }
.pd-gallery .swiper-pagination-bullet { background: #fff; opacity: .6; width: 8px; height: 8px; transition: width .3s; }
.pd-gallery .swiper-pagination-bullet-active { opacity: 1; width: 22px; border-radius: 6px; background: var(--brand); }
.pd-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; scrollbar-width: none; background: #fff; }
.pd-thumbs::-webkit-scrollbar { display: none; }
.pd-thumbs button { flex: 0 0 64px; height: 64px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; opacity: .6; transition: all .2s; }
.pd-thumbs button.is-active { border-color: var(--brand); opacity: 1; }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info { padding: 22px 20px 26px; display: flex; flex-direction: column; gap: 14px; }
.pd-cat { color: var(--brand); font-weight: 800; font-size: .85rem; display: inline-flex; gap: 6px; align-items: center; }
.pd-title { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 900; line-height: 1.35; }
.pd-price { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pd-price .price-now { font-size: 1.7rem; }
.pd-price .price-old { font-size: 1rem; }
.save-tag { background: #e2f6eb; color: var(--success); padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: .82rem; }
.stock { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; }
.stock::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(31,157,92,.15); animation: pulseDot 2s infinite; }
.stock.out::before { background: var(--danger); box-shadow: 0 0 0 4px rgba(217,58,58,.15); }
@keyframes pulseDot { 50% { box-shadow: 0 0 0 7px rgba(31,157,92,0); } }
.pd-actions { display: grid; gap: 10px; }
.pd-buy { display: flex; gap: 10px; }
.pd-buy .btn { flex: 1; }
.pd-gallery { align-self: start; }
.pd-desc { background: var(--tint); border-radius: var(--r); padding: 16px 18px; color: var(--ink-2); font-size: .95rem; }
.pd-desc h4 { font-size: .95rem; margin-bottom: 8px; color: var(--ink); display: flex; gap: 8px; align-items: center; }
.pd-desc h4 i { color: var(--brand); }
.pd-perks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pd-perks div { display: flex; align-items: center; gap: 10px; font-size: .82rem; font-weight: 700; color: var(--ink-2); padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.pd-perks i { color: var(--brand); font-size: 1rem; }
.pd-links { display: flex; gap: 14px; font-size: .88rem; color: var(--muted); font-weight: 700; flex-wrap: wrap; }
.pd-links a, .pd-links button { display: inline-flex; gap: 6px; align-items: center; transition: color .2s; }
.pd-links a:hover, .pd-links button:hover { color: var(--brand); }
@media (min-width: 768px) {
  .pd { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .modal .pd { max-height: calc(100vh - 40px); }
  .modal .pd-info { overflow-y: auto; max-height: calc(100vh - 40px); padding: 34px 32px; }
  .modal .pd-gallery { max-height: calc(100vh - 40px); }
}
.page-product .pd { background: #fff; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); }
.page-product .pd-gallery { border-radius: 0; }
@media (min-width: 768px) { .page-product .pd-info { padding: 36px; } }

.toast-stack { position: fixed; z-index: 1500; inset-inline: 0; bottom: calc(var(--bottom-nav-h) + 16px); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding-inline: 16px; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff; padding: 10px 12px 10px 18px; border-radius: 999px;
  box-shadow: 0 14px 40px rgba(0,0,0,.25); font-weight: 700; font-size: .9rem; max-width: 520px;
  animation: toastIn .5s var(--ease-out) both;
}
.toast img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.toast .t-icon { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; flex-shrink: 0; font-size: .85rem; }
.toast.error .t-icon { background: var(--danger); }
.toast a { color: #ffb3cc; text-decoration: underline; white-space: nowrap; }
.toast.is-leaving { animation: toastOut .35s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.95); } }

.push-bar {
  position: fixed; z-index: 1450; inset-inline: 12px; bottom: calc(var(--bottom-nav-h) + 12px);
  max-width: 520px; margin-inline: auto; background: #fff; border-radius: var(--r-lg);
  box-shadow: 0 20px 50px rgba(0,0,0,.18); padding: 16px; display: none; gap: 14px; align-items: center;
  border: 1px solid var(--line);
}
.push-bar.is-visible { display: flex; animation: toastIn .5s var(--ease-out); }
.push-bar .p-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--tint-2); color: var(--brand); display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; animation: ring 2s ease-in-out infinite; }
.push-bar strong { display: block; font-size: .95rem; }
.push-bar small { color: var(--muted); font-size: .82rem; }
.push-bar .p-actions { display: flex; gap: 6px; margin-inline-start: auto; flex-shrink: 0; }
@keyframes ring { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-12deg); } 20%, 40% { transform: rotate(12deg); } }
@media (max-width: 480px) { .push-bar { flex-wrap: wrap; } .push-bar .p-actions { width: 100%; } .push-bar .p-actions .btn { flex: 1; } }

/* ==========================================================================
   Shop
   ========================================================================== */
.page-hero {
  margin-top: 16px; border-radius: var(--r-xl); padding: 30px 22px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--tint-2), var(--tint) 60%, #fff);
  border: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(1.5rem, 4vw, 2.3rem); font-weight: 900; }
.page-hero p { color: var(--muted); margin-top: 6px; }
.page-hero .ph-tree { position: absolute; inset-inline-end: -10px; bottom: -28px; width: 150px; height: 143px; fill: rgba(var(--brand-rgb), .1); }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--brand); }
.crumbs i { font-size: .6rem; }
@media (min-width: 768px) { .page-hero { padding: 44px 40px; } .page-hero .ph-tree { width: 230px; height: 220px; inset-inline-end: 4%; } }

.shop-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 22px; }
.shop-layout > *, .checkout-layout > *, .two-col > * { min-width: 0; }
.shop-side { display: none; }
@media (min-width: 992px) {
  .shop-layout { grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
  .shop-side { display: block; position: sticky; top: calc(var(--header-h) + 16px); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
  .shop-side h3 { font-size: 1rem; margin-bottom: 12px; display: flex; gap: 8px; align-items: center; }
  .shop-side h3 i { color: var(--brand); }
  .side-cats a { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 12px; font-weight: 700; font-size: .92rem; color: var(--ink-2); transition: all .2s; }
  .side-cats a:hover { background: var(--tint); color: var(--brand); }
  .side-cats a.is-active { background: var(--brand); color: #fff; }
  .side-cats .count { font-size: .75rem; background: var(--tint-2); color: var(--brand-deep); padding: 1px 8px; border-radius: 999px; }
  .side-cats a.is-active .count { background: rgba(255,255,255,.25); color: #fff; }
  .shop-chips { display: none !important; }
}
.shop-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 8px; margin-inline: -16px; scrollbar-width: none; scroll-snap-type: x proximity; }
.shop-chips::-webkit-scrollbar { display: none; }
.shop-chips .chip { scroll-snap-align: start; }
.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.shop-count { color: var(--muted); font-size: .9rem; }
.shop-count strong { color: var(--ink); }
.shop-sort { display: flex; align-items: center; gap: 8px; }
.shop-sort .select { min-height: 42px; border-radius: 999px; font-size: .88rem; padding-block: 8px; width: auto; }
.active-filter { display: inline-flex; align-items: center; gap: 8px; background: var(--tint-2); color: var(--brand-deep); padding: 5px 8px 5px 14px; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.active-filter a { width: 22px; height: 22px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: .7rem; }
.empty-state { text-align: center; padding: 60px 20px; background: #fff; border: 1px dashed var(--line); border-radius: var(--r-xl); }
.empty-state .empty-mark { width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 50%; background: var(--tint-2); display: grid; place-items: center; }
.empty-state .empty-mark svg { width: 56px; height: 54px; fill: var(--brand); }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 6px; }
.empty-state p { color: var(--muted); margin-bottom: 18px; }
.load-more { display: flex; justify-content: center; margin-top: 28px; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 42px; height: 42px; padding-inline: 10px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; border: 1px solid var(--line); background: #fff; transition: all .2s; }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .is-current { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.pagination .is-disabled { opacity: .4; }

/* ==========================================================================
   Checkout / account / auth / static pages
   ========================================================================== */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 22px; }
@media (min-width: 768px) { .panel { padding: 30px; } }
.panel-title { font-size: 1.2rem; font-weight: 900; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.panel-title .step { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: .9rem; }
.checkout-layout { display: grid; gap: 20px; margin-top: 22px; }
.checkout-layout .stack { display: grid; gap: 20px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) { .form-grid.cols-2 { grid-template-columns: 1fr; } }
@media (min-width: 992px) {
  .checkout-layout { grid-template-columns: 1.25fr 1fr; align-items: start; }
  .checkout-summary { position: sticky; top: calc(var(--header-h) + 16px); }
}
.summary-lines { display: grid; gap: 12px; max-height: 320px; overflow-y: auto; margin-bottom: 16px; padding-inline-end: 4px; }
.summary-line { display: flex; gap: 12px; align-items: center; }
.summary-line .thumb { position: relative; flex-shrink: 0; }
.summary-line img { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; background: var(--tint); }
.summary-line .q { position: absolute; top: -6px; inset-inline-start: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
.summary-line h4 { flex: 1; font-size: .88rem; font-weight: 700; line-height: 1.4; }
.summary-line .amt { font-weight: 800; font-size: .9rem; white-space: nowrap; }

.pay-methods { display: grid; gap: 10px; }
.pay-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--tint); border: 1.5px solid transparent; transition: border-color .2s, transform .2s; }
.pay-card:hover { border-color: rgba(var(--brand-rgb), .35); }
.pay-logo { width: 70px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-latin); font-weight: 700; font-size: .8rem; flex-shrink: 0; }
.pay-logo.instapay { background: linear-gradient(135deg, #3b1a6b, #6a2fb0); color: #fff; }
.pay-logo.orange { background: #ff7900; color: #000; }
.pay-info { flex: 1; min-width: 0; }
.pay-info small { display: block; color: var(--muted); font-weight: 700; font-size: .8rem; }
.pay-info strong { font-size: 1.15rem; letter-spacing: 1px; direction: ltr; display: inline-block; }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--brand); color: var(--brand); font-weight: 700; font-size: .82rem; transition: all .2s; flex-shrink: 0; }
.copy-btn:hover, .copy-btn.is-done { background: var(--brand); color: #fff; }
@media (max-width: 420px) { .copy-btn span { display: none; } .pay-logo { width: 58px; } }

.upload {
  position: relative; display: grid; place-items: center; text-align: center; gap: 6px;
  padding: 28px 18px; border: 2px dashed rgba(var(--brand-rgb), .35); border-radius: var(--r-lg);
  background: var(--tint); cursor: pointer; transition: border-color .2s, background-color .2s;
}
.upload:hover, .upload.is-drag { border-color: var(--brand); background: var(--tint-2); }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload i { font-size: 2rem; color: var(--brand); }
.upload strong { font-size: 1rem; }
.upload small { color: var(--muted); }
.upload-preview { display: none; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); margin-top: 10px; }
.upload-preview.is-visible { display: flex; animation: pageIn .4s var(--ease-out); }
.upload-preview img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.upload-preview span { flex: 1; font-weight: 700; font-size: .88rem; word-break: break-all; }

.thanks { text-align: center; max-width: 620px; margin: 30px auto 0; }
.thanks-mark { width: 110px; height: 110px; margin: 0 auto 20px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; box-shadow: var(--shadow-brand); animation: splashPop .8s var(--ease-out) both; }
.thanks-mark i { color: #fff; font-size: 2.6rem; }
.thanks h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 900; }
.thanks p { color: var(--muted); margin-top: 8px; }
.order-no { display: inline-block; margin: 20px 0; padding: 12px 26px; border-radius: 999px; background: var(--tint-2); color: var(--brand-deep); font-weight: 900; font-size: 1.2rem; }

.auth-wrap { min-height: 70vh; display: grid; place-items: center; padding-block: 30px; }
.auth-card { width: min(460px, 100%); background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 32px 24px; box-shadow: var(--shadow); text-align: center; }
.auth-card .brand-mark { width: 64px; height: 64px; margin: 0 auto 16px; }
.auth-card h1 { font-size: 1.5rem; font-weight: 900; }
.auth-card > p { color: var(--muted); margin: 6px 0 24px; }
.auth-card form { display: grid; gap: 14px; text-align: start; }
.auth-card .switch { margin-top: 20px; color: var(--muted); font-size: .92rem; }
.auth-card .switch a { color: var(--brand); font-weight: 800; }
.pw-wrap { position: relative; }
.pw-wrap button { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; color: var(--muted); }

.account-head { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px; border-radius: var(--r-xl); background: linear-gradient(135deg, var(--brand-deep), var(--brand)); color: #fff; }
.account-head h1 { font-size: 1.5rem; }
.account-head p { opacity: .85; }
.account-head .avatar { width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 1.5rem; font-weight: 900; }
.account-head .who { display: flex; align-items: center; gap: 14px; }
.order-list { display: grid; gap: 14px; margin-top: 24px; }
.order-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.order-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-card-head strong { font-size: 1.05rem; }
.order-card-head small { color: var(--muted); display: block; }
.order-thumbs { display: flex; gap: 6px; margin-top: 14px; }
.order-thumbs img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: var(--tint); }
.order-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: .9rem; color: var(--muted); }
.order-card-foot strong { color: var(--brand); font-size: 1.05rem; }
.timeline { display: flex; gap: 4px; margin-top: 14px; }
.timeline span { flex: 1; height: 5px; border-radius: 4px; background: var(--line); }
.timeline span.on { background: var(--brand); }

.info-cards { display: grid; gap: 14px; }
.info-card { display: flex; gap: 14px; align-items: center; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); transition: transform .3s var(--ease-out), box-shadow .3s; }
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.info-card .ic { width: 52px; height: 52px; border-radius: 16px; background: var(--tint-2); color: var(--brand); display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.info-card h4 { font-size: 1rem; }
.info-card p { color: var(--muted); font-size: .92rem; }
.two-col { display: grid; gap: 20px; margin-top: 22px; }
@media (min-width: 992px) { .two-col { grid-template-columns: 1.3fr 1fr; align-items: start; } }

.faq { display: grid; gap: 10px; max-width: 820px; margin: 24px auto 0; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.faq details[open] { border-color: rgba(var(--brand-rgb), .35); box-shadow: var(--shadow-sm); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 800; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { width: 30px; height: 30px; border-radius: 50%; background: var(--tint-2); color: var(--brand); display: grid; place-items: center; font-size: .8rem; transition: transform .3s var(--ease-out); flex-shrink: 0; }
.faq details[open] summary i { transform: rotate(45deg); background: var(--brand); color: #fff; }
.faq .answer { padding: 0 20px 18px; color: var(--ink-2); }
.policy-grid { display: grid; gap: 14px; margin-top: 24px; }
@media (min-width: 768px) { .policy-grid { grid-template-columns: 1fr 1fr; } }
.zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-top: 14px; }
.zones div { display: flex; justify-content: space-between; padding: 10px 14px; background: var(--tint); border-radius: 12px; font-size: .88rem; font-weight: 700; }
.zones span { color: var(--brand); }

/* ---------- Scroll reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: var(--d, 0s); }
[data-reveal].is-in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

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

/* ==========================================================================
   Floating "install app" button + install guide
   ========================================================================== */
.install-fab {
  position: fixed; z-index: 1400; inset-inline-start: 16px; bottom: calc(var(--bottom-nav-h, 0px) + 16px);
  display: flex; align-items: center; animation: fabIn .6s var(--ease-out) both;
}
.install-fab[hidden] { display: none; }
.install-fab-btn {
  display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border: 0; cursor: pointer;
  background: #fff; color: var(--ink, #222); border-radius: 999px; font: inherit; text-align: start;
  box-shadow: 0 14px 34px rgba(0,0,0,.14), 0 0 0 1px rgba(var(--brand-rgb), .12);
  transition: transform .25s var(--ease-out), box-shadow .25s;
}
[dir=rtl] .install-fab-btn { padding: 6px 6px 6px 16px; }
.install-fab-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(var(--brand-rgb), .25); }
.install-fab-icon {
  width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex-shrink: 0; position: relative;
  box-shadow: var(--shadow-brand);
}
.install-fab-icon img { width: 100%; height: 100%; display: block; }
.install-fab-icon::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--brand);
  animation: fabPulse 2.2s ease-out infinite;
}
.install-fab-text strong { display: block; font-size: .88rem; line-height: 1.2; }
.install-fab-text small { display: block; font-size: .72rem; color: var(--muted); }
.install-fab-close {
  width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer; margin-inline-start: -10px;
  align-self: flex-start; background: #fff; color: var(--muted); font-size: .7rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
@keyframes fabIn { from { opacity: 0; transform: translateY(20px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes fabPulse { 0% { opacity: .8; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.35); } }
@media (max-width: 480px) {
  .install-fab { inset-inline-start: 12px; bottom: calc(var(--bottom-nav-h, 0px) + 12px); }
  .install-fab-text small { display: none; }
}

.install-guide { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: end center; }
.install-guide[hidden] { display: none; }
.install-guide-backdrop { position: absolute; inset: 0; background: rgba(20,10,15,.45); backdrop-filter: blur(3px); animation: fadeIn .3s; }
.install-guide-card {
  position: relative; width: min(440px, 100%); background: #fff; border-radius: 24px 24px 0 0;
  padding: 26px 22px calc(22px + env(safe-area-inset-bottom)); text-align: center;
  animation: sheetUp .45s var(--ease-out);
}
@media (min-width: 768px) { .install-guide { place-items: center; } .install-guide-card { border-radius: 24px; } }
.install-guide-logo { width: 64px; height: 64px; border-radius: 18px; box-shadow: var(--shadow-brand); margin: 0 auto 12px; display: block; }
.install-guide-card h3 { margin: 0 0 14px; font-size: 1.15rem; }
.install-guide-card ol { text-align: start; margin: 0 0 18px; padding-inline-start: 22px; line-height: 2; font-size: .92rem; }
.install-guide-card ol i { color: var(--brand); }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
