/*
 * Miras Smart Storefront Design System v3
 * One responsive source of truth for shared storefront UI.
 */

@font-face {
  font-family: "IRANSans";
  src: url("/fonts/IRANSans.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  --ink-950: #172019;
  --ink-900: #202b22;
  --ink-800: #304034;
  --ink-700: #4a5b4d;
  --ink-600: #667369;
  --ink-500: #7e897f;

  --forest-900: #183d2d;
  --forest-800: #20513b;
  --forest-700: #2a684b;
  --forest-600: #347d59;
  --forest-100: #e9f3ed;
  --forest-50: #f4f8f5;

  --gold-700: #98702b;
  --gold-600: #b0893b;
  --gold-500: #c7a457;
  --gold-300: #e7d5a7;
  --gold-100: #f7f0df;

  --sand-50: #fffdf9;
  --sand-100: #fbf8f1;
  --sand-200: #f4eee3;
  --sand-300: #e8decf;
  --white: #ffffff;

  --danger: #b23b35;
  --danger-soft: #fff2f1;
  --success: #287047;
  --success-soft: #edf8f1;
  --warning-soft: #fff8e7;

  --border: rgba(54, 71, 58, 0.12);
  --border-strong: rgba(54, 71, 58, 0.20);
  --shadow-xs: 0 2px 8px rgba(24, 42, 31, 0.05);
  --shadow-sm: 0 8px 24px rgba(24, 42, 31, 0.08);
  --shadow-md: 0 18px 45px rgba(24, 42, 31, 0.11);
  --shadow-lg: 0 28px 70px rgba(24, 42, 31, 0.16);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --container: 1200px;
  --header-height: 92px;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--sand-100); }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  direction: rtl;
  color: var(--ink-900);
  background:
    radial-gradient(circle at 90% 0%, rgba(199,164,87,.11), transparent 28rem),
    linear-gradient(180deg, #fffdfa 0, #faf6ee 54%, #f7f2e9 100%);
  font-family: "IRANSans", Tahoma, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.9;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body::before { display: none !important; content: none !important; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
input, select, textarea { color: var(--ink-900); }
::selection { color: var(--white); background: var(--forest-700); }
:focus-visible { outline: 3px solid rgba(52,125,89,.25); outline-offset: 3px; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Top utility bar */
.top-bar {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 18px;
  color: rgba(255,255,255,.92);
  background: var(--forest-900);
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -.05px;
}
.top-bar-inner {
  width: min(var(--container), 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.top-bar-item { display: inline-flex; align-items: center; gap: 6px; }
.top-bar-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold-500); }
.top-bar a { color: inherit; text-decoration: none; }

/* Header */
.site-header {
  position: relative;
  z-index: 1200;
  width: min(var(--container), calc(100% - 32px));
  min-height: var(--header-height);
  margin: 0 auto;
  padding: 14px 0;
  display: grid;
  grid-template-columns: 190px minmax(260px, 1fr) auto;
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img {
  width: 168px;
  height: auto;
  max-height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 5px 12px rgba(23,32,25,.08));
}
.header-actions { display: flex; align-items: center; gap: 9px; }
.header-actions a {
  position: relative;
  min-height: 44px;
  padding: 8px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-800);
  background: rgba(255,255,255,.84);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  transition: transform .2s var(--ease), border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.header-actions a:hover {
  transform: translateY(-2px);
  background: var(--white);
  border-color: rgba(52,125,89,.24);
  box-shadow: var(--shadow-sm);
}
.header-user-icon,
.header-cart-icon {
  width: auto;
  min-width: 44px;
}
.header-user-icon { display: inline-flex; align-items: center; justify-content: center; }
.header-user-icon svg,
.header-cart-svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.header-cart-icon { padding-inline: 11px !important; }
.cart-count {
  position: absolute;
  top: -6px;
  left: -5px;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: var(--forest-700);
  border: 2px solid var(--sand-50);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

/* Search */
.site-product-search,
.site-live-search {
  position: relative;
  width: 100%;
  max-width: 650px;
  justify-self: center;
}
.site-live-search {
  min-height: 48px;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.96);
  border: 1px solid var(--border-strong);
  border-radius: 17px;
  box-shadow: 0 7px 22px rgba(24,42,31,.06);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s var(--ease);
}
.site-live-search:focus-within {
  border-color: rgba(52,125,89,.55);
  box-shadow: 0 0 0 4px rgba(52,125,89,.08), var(--shadow-sm);
}
.site-search-icon {
  width: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-500);
}
.site-search-icon svg,
.site-search-submit svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.site-live-search input {
  min-width: 0;
  width: 100%;
  height: 46px;
  padding: 0 2px;
  color: var(--ink-900);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
}
.site-live-search input::placeholder { color: #939c94; }
.site-search-submit {
  width: 42px;
  height: 40px;
  margin-left: 4px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: var(--forest-700);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s ease, transform .2s var(--ease);
}
.site-search-submit:hover { background: var(--forest-800); transform: translateX(-1px); }
.site-live-search-panel {
  position: absolute;
  z-index: 1500;
  top: calc(100% + 9px);
  right: 0;
  left: 0;
  overflow: hidden;
  background: rgba(255,255,255,.98);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}
.site-live-search-panel[hidden] { display: none !important; }
.site-live-search-list { max-height: min(470px, 58vh); overflow-y: auto; padding: 6px; }
.site-live-search-item {
  min-height: 68px;
  padding: 8px;
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 11px;
  color: var(--ink-900);
  border-radius: 13px;
  text-decoration: none;
  transition: background .16s ease;
}
.site-live-search-item:hover,
.site-live-search-item.is-active { background: var(--forest-50); }
.site-live-search-image {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 11px;
}
.site-live-search-image img { width: 100%; height: 100%; object-fit: contain; }
.site-live-search-content { min-width: 0; }
.site-live-search-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 850; }
.site-live-search-category { color: var(--ink-500); font-size: 10px; }
.site-live-search-price { margin-top: 2px; color: var(--forest-700); font-size: 11px; font-weight: 850; }
.site-live-search-arrow { color: var(--ink-500); font-size: 18px; }
.site-live-search-all-wrap { padding: 6px 10px 10px; }
.site-live-search-all {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 11px;
  color: var(--forest-800);
  background: var(--forest-50);
  border-radius: 11px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 850;
}

/* Desktop navigation */
.quick-nav {
  position: sticky;
  z-index: 1100;
  top: 10px;
  width: min(1120px, calc(100% - 32px));
  margin: 4px auto 0;
  padding: 6px;
  background: rgba(255,255,255,.9);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(24,42,31,.08);
  backdrop-filter: blur(16px);
}
.quick-nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  overflow: visible;
}
.nav-direct-link,
.nav-category-trigger {
  min-height: 39px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--ink-700);
  background: transparent;
  border: 0;
  border-radius: 11px;
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
  transition: color .17s ease, background .17s ease, transform .17s var(--ease);
}
.nav-direct-link:hover,
.nav-category-trigger:hover { color: var(--forest-800); background: var(--forest-50); }
.nav-direct-link[aria-current="page"],
.nav-category-group.is-active > .nav-category-trigger {
  color: var(--white);
  background: var(--forest-700);
  box-shadow: 0 5px 14px rgba(42,104,75,.19);
}
.nav-category-trigger svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .2s ease; }
.nav-category-group { position: relative; }
.nav-category-group.is-open .nav-category-trigger svg { transform: rotate(180deg); }
.nav-category-dropdown {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  width: min(560px, 88vw);
  padding: 15px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(7px) scale(.985);
  pointer-events: none;
  color: var(--ink-900);
  background: rgba(255,255,255,.985);
  border: 1px solid var(--border);
  border-radius: 19px;
  box-shadow: var(--shadow-lg);
  transition: opacity .18s ease, transform .18s var(--ease), visibility .18s;
}
.nav-category-group.is-open .nav-category-dropdown,
.nav-category-group:hover .nav-category-dropdown {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.nav-dropdown-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 2px 12px; border-bottom: 1px solid var(--border); }
.nav-dropdown-heading small { display: block; color: var(--ink-500); font-size: 9px; }
.nav-dropdown-heading strong { color: var(--forest-900); font-size: 14px; }
.nav-view-all { color: var(--forest-700); text-decoration: none; font-size: 10.5px; font-weight: 850; }
.nav-dropdown-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.nav-subcategory-link {
  min-height: 58px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-800);
  background: var(--sand-50);
  border: 1px solid var(--border);
  border-radius: 13px;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, transform .16s var(--ease);
}
.nav-subcategory-link:hover { background: var(--forest-50); border-color: rgba(52,125,89,.25); transform: translateX(-2px); }
.nav-subcategory-copy strong { display: block; font-size: 11.5px; }
.nav-subcategory-copy small { color: var(--ink-500); font-size: 9px; }
.nav-subcategory-arrow { color: var(--forest-700); }

/* Shared content */
main {
  width: min(var(--container), 100%);
  margin: 0 auto;
  padding: clamp(30px, 4vw, 54px) 20px 84px;
}
.hero {
  position: relative;
  max-width: 980px;
  margin: 0 auto 38px;
  padding: clamp(25px, 4vw, 45px) clamp(20px, 5vw, 60px);
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 12% 22%, rgba(199,164,87,.18), transparent 14rem),
    radial-gradient(circle at 92% 88%, rgba(52,125,89,.08), transparent 15rem),
    rgba(255,255,255,.88);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/rice.webp") left center / min(44%, 390px) auto no-repeat;
  opacity: .13;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.78) 42%, transparent 78%);
  mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.78) 42%, transparent 78%);
}
.hero > * { position: relative; z-index: 1; }
.hero::after {
  content: "";
  position: absolute;
  right: 50%;
  bottom: 0;
  width: 110px;
  height: 3px;
  transform: translateX(50%);
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
}
.hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--forest-900);
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 900;
  line-height: 1.55;
  letter-spacing: -.4px;
}
.hero p {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 11px auto 0;
  color: var(--ink-600);
  font-size: clamp(12px, 1.35vw, 14px);
  line-height: 2;
}
.hero-actions { margin-top: 20px; display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; }
.hero-trust { margin: 24px auto 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.hero-trust span {
  min-height: 32px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-700);
  background: rgba(255,255,255,.75);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 750;
}
.hero-trust i { width: 7px; height: 7px; border-radius: 50%; background: var(--forest-600); }
.section-heading {
  margin: 54px 0 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
.section-heading-copy small { display: block; margin-bottom: 3px; color: var(--gold-700); font-size: 10px; font-weight: 900; }
.section-heading h2,
.section-title {
  margin: 0;
  padding: 0;
  color: var(--forest-900);
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 900;
  line-height: 1.55;
}
.section-title { margin: 50px 0 22px; width: auto; text-align: right; }
.section-title::after { display: none; }
.section-heading-link { color: var(--forest-700); text-decoration: none; font-size: 11px; font-weight: 850; }

/* Buttons */
.primary-btn,
.secondary-btn,
.danger-btn,
.wholesale-primary-btn,
.wholesale-secondary-btn {
  appearance: none;
  min-height: 44px;
  padding: 9px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 13px;
  text-align: center;
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1.4;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.primary-btn,
.wholesale-primary-btn {
  color: var(--white);
  background: linear-gradient(135deg, var(--forest-700), var(--forest-900));
  border: 1px solid var(--forest-800);
  box-shadow: 0 8px 18px rgba(32,81,59,.18);
}
.primary-btn:hover,
.wholesale-primary-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(32,81,59,.22); }
.secondary-btn,
.wholesale-secondary-btn {
  color: var(--forest-800);
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.secondary-btn:hover,
.wholesale-secondary-btn:hover { transform: translateY(-1px); background: var(--white); border-color: rgba(52,125,89,.32); }
.danger-btn { color: var(--danger); background: var(--danger-soft); border: 1px solid rgba(178,59,53,.20); }

/* Forms and panels */
.form-card,
.panel,
.account-card {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 30px);
  color: var(--ink-900);
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--ink-800); font-size: 11px; font-weight: 850; }
.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 45px;
  padding: 10px 12px;
  color: var(--ink-900);
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  outline: none;
  font-size: 12px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.field textarea { min-height: 112px; resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: rgba(52,125,89,.55); box-shadow: 0 0 0 4px rgba(52,125,89,.08); }
.form-actions { margin-top: 20px; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.notice {
  max-width: 780px;
  margin: 0 auto 18px;
  padding: 12px 15px;
  border-radius: 13px;
  font-size: 11.5px;
  font-weight: 750;
  box-shadow: var(--shadow-xs);
}
.notice.error { color: #8b2f2a; background: var(--danger-soft); border: 1px solid rgba(178,59,53,.18); }
.notice.success { color: #23633e; background: var(--success-soft); border: 1px solid rgba(40,112,71,.16); }
.checkout-address-panel { margin-bottom: 24px; padding: 18px; background: var(--sand-50); border: 1px solid var(--border); border-radius: 16px; }
.checkout-address-panel h2 { margin: 0 0 5px; color: var(--forest-900); font-size: 16px; }
.checkout-address-panel > p { margin: 0 0 13px; color: var(--ink-600); font-size: 11px; }
.saved-address-option {
  position: relative;
  margin-bottom: 9px;
  padding: 12px 13px;
  display: block;
  color: var(--ink-800);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 13px;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.saved-address-option:last-child { margin-bottom: 0; }
.saved-address-option:has(input:checked) { background: var(--forest-50); border-color: rgba(52,125,89,.38); box-shadow: 0 0 0 3px rgba(52,125,89,.06); }
.saved-address-option input { margin-left: 7px; accent-color: var(--forest-700); }
.saved-address-option strong { font-size: 11.5px; }
.saved-address-option small { color: var(--ink-600); font-size: 10.5px; line-height: 1.8; }

/* Homepage banner */
.home-banner-section { margin: 0 auto 46px; }
.home-banner-carousel { position: relative; }
.home-banner-viewport {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow-md);
}
.home-banner-track { direction: ltr; display: flex; transition: transform .55s var(--ease); }
.home-banner-slide { position: relative; min-width: 100%; aspect-ratio: 3.3 / 1; overflow: hidden; background: var(--sand-200); }
.home-banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.home-banner-slide::after { content: ""; position: absolute; inset: auto 0 0; height: 30%; background: linear-gradient(transparent, rgba(21,32,24,.08)); pointer-events: none; }
.home-banner-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 42px;
  height: 42px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  color: var(--forest-900);
  background: rgba(255,255,255,.9);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.home-banner-arrow.prev { right: 14px; }
.home-banner-arrow.next { left: 14px; }
.home-banner-dots { position: absolute; z-index: 3; right: 50%; bottom: 13px; transform: translateX(50%); display: flex; gap: 6px; }
.home-banner-dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.65); box-shadow: 0 1px 5px rgba(0,0,0,.16); cursor: pointer; transition: width .18s ease, border-radius .18s ease, background .18s ease; }
.home-banner-dot.is-active { width: 24px; border-radius: 999px; background: var(--white); }

/* Deals */
.today-deals {
  width: min(1120px, 100%);
  margin: 50px auto 54px;
  padding: 24px;
  display: grid;
  grid-template-columns: 220px minmax(0,1fr);
  gap: 22px;
  align-items: stretch;
  background: linear-gradient(135deg, var(--forest-900), #102d21);
  border-radius: 27px;
  box-shadow: var(--shadow-md);
}
.today-deals-intro {
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: rgba(255,255,255,.88);
}
.today-deals-kicker { color: var(--gold-300); font-size: 10px; font-weight: 900; }
.today-deals-intro h2 { margin: 4px 0 7px; color: var(--white); font-size: 24px; font-weight: 900; }
.today-deals-intro p { margin: 0 0 16px; color: rgba(255,255,255,.68); font-size: 10.5px; line-height: 1.9; }
.today-deals-all-link { margin-top: auto; color: var(--gold-300); text-decoration: none; font-size: 10.5px; font-weight: 850; }
.today-deals-all-link:hover { color: var(--white); }
.today-deals-rail {
  direction: rtl;
  min-width: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(195px, 220px);
  justify-content: start;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.20) transparent;
}
.today-deals-rail--count-1 { grid-template-columns: minmax(210px, 260px); grid-auto-flow: row; justify-content: center; overflow: visible; }
.today-deals-rail--count-2 { grid-template-columns: repeat(2, minmax(210px, 250px)); grid-auto-flow: row; justify-content: center; overflow: visible; }
.today-deals-rail--count-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row; overflow: visible; }
.today-deals-rail--count-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: row; overflow: visible; }
.deal-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  scroll-snap-align: start;
  background: var(--white);
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}
.deal-card-image {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  overflow: hidden;
  background: linear-gradient(180deg,#fff,#faf8f3);
  border-bottom: 1px solid var(--border);
}
.deal-card-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}
.deal-card-body { flex: 1; display: flex; flex-direction: column; padding: 12px 13px 14px; }
.deal-card-title {
  min-height: 42px;
  margin: 0 0 7px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--ink-900);
  font-size: 12px;
  line-height: 1.75;
  font-weight: 900;
}
.deal-card-title a { color: inherit; text-decoration: none; }
.deal-old-price { display: block; min-height: 17px; margin-top: auto; color: #9ca39d; font-size: 9.5px; text-decoration: line-through; }
.deal-price { margin-top: 2px; color: var(--forest-700); font-size: 12.5px; font-weight: 900; }
.deal-percent {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  min-width: 38px;
  padding: 4px 8px;
  color: var(--white);
  background: #c3463d;
  border-radius: 999px;
  font-size: 9.5px;
  line-height: 1.4;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 4px 12px rgba(195,70,61,.22);
}

/* Categories — compact storefront navigation tiles */
.category-grid {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 12px;
  margin: 0 0 46px;
}
.category-card {
  position: relative;
  min-height: 88px;
  padding: 15px 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  color: var(--ink-900);
  background: linear-gradient(145deg, #fff 0%, #fdfbf6 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-xs);
  text-align: right;
  text-decoration: none;
  transition: transform .2s var(--ease), border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.category-card:hover {
  transform: translateY(-2px);
  background: #fff;
  border-color: rgba(52,125,89,.28);
  box-shadow: var(--shadow-sm);
}
.category-card strong {
  position: relative;
  display: block;
  color: var(--forest-900);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 900;
  letter-spacing: -.15px;
}
.category-card span {
  position: relative;
  margin-top: 2px;
  color: var(--ink-500);
  font-size: 11px;
  line-height: 1.7;
}
.dynamic-category-page { width: min(var(--container), 100%); margin: 0 auto; }
.dynamic-category-breadcrumb,
.mp-breadcrumb,
.wholesale-breadcrumb { margin-bottom: 18px !important; color: var(--ink-500) !important; font-size: 10.5px !important; }
.dynamic-category-breadcrumb a,
.mp-breadcrumb a,
.wholesale-breadcrumb a { color: var(--forest-700) !important; text-decoration: none; }
.dynamic-category-children {
  margin: -12px 0 30px !important;
  gap: 9px !important;
}
.dynamic-category-children a {
  min-height: 42px !important;
  padding: 8px 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--forest-800) !important;
  background: var(--white) !important;
  border: 1px solid var(--border) !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  font-weight: 750 !important;
  text-decoration: none !important;
  box-shadow: var(--shadow-xs);
  transition: transform .18s var(--ease), border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.dynamic-category-children a:hover {
  text-decoration: none !important;
  background: var(--forest-50) !important;
  border-color: rgba(52,125,89,.28) !important;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
@media (max-width: 640px) {
  .dynamic-category-children { gap: 7px !important; margin-bottom: 24px !important; }
  .dynamic-category-children a {
    min-height: 40px !important;
    padding: 7px 13px !important;
    font-size: 12px !important;
  }
}

/* Product grid/cards */
.products-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.product-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-xs);
  transition: transform .24s var(--ease), border-color .24s ease, box-shadow .24s ease;
}
.product-card:hover { transform: translateY(-5px); border-color: rgba(52,125,89,.23); box-shadow: var(--shadow-md); }
.product-card .product-image-box {
  position: relative;
  height: 270px !important;
  min-height: 0 !important;
  padding: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, #fbfaf6 100%) !important;
  border-bottom: 1px solid var(--border);
  border-radius: 0 !important;
  isolation: auto !important;
}
.product-card .product-image-box > a {
  width: 100% !important;
  height: 100% !important;
  min-width: 0;
  min-height: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 15px;
}
/* Never crop storefront product photography. Tall rice bags and bottles must remain fully visible. */
.product-card .product-image-box img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
  transition: opacity .2s ease !important;
}
.product-card:hover .product-image-box img { transform: none !important; opacity: .97; }
.product-badge { position: absolute; z-index: 2; top: 12px; right: 12px; padding: 4px 9px; color: var(--forest-900); background: rgba(242,224,174,.92); border: 1px solid rgba(152,112,43,.18); border-radius: 999px; font-size: 9px; font-weight: 900; backdrop-filter: blur(8px); }
.product-info { flex: 1; display: flex; flex-direction: column; padding: 17px; }
.product-title { margin: 0; color: var(--ink-900); font-size: 14px; font-weight: 900; line-height: 1.75; }
.product-title a { text-decoration: none !important; }
.product-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 46px;
  margin: 7px 0 10px;
  color: var(--ink-600);
  border: 0;
  font-size: 10.5px;
  line-height: 2.05;
}
.product-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stock { padding: 3px 7px; border-radius: 999px; font-size: 9px; font-weight: 850; }
.stock.available { color: var(--success); background: var(--success-soft); border: 1px solid rgba(40,112,71,.12); }
.stock.unavailable { color: var(--danger); background: var(--danger-soft); border: 1px solid rgba(178,59,53,.12); }
.price { min-width: 0; color: var(--forest-800); font-size: 12.5px; font-weight: 900; white-space: normal; text-align: left; }
.product-card-old-price { display: block; margin-bottom: 1px; color: #9ca49e; font-size: 9px; font-weight: 600; text-decoration: line-through; }
.add-to-cart { width: 100%; margin-top: 14px; display: grid; grid-template-columns: 104px 1fr; gap: 8px; align-items: end; }
.quantity-field { width: 104px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.quantity-label { color: var(--ink-500); font-size: 9px; font-weight: 800; }
.quantity-stepper {
  direction: ltr;
  width: 104px;
  height: 42px;
  display: grid;
  grid-template-columns: 34px 36px 34px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
}
.quantity-btn { width: 34px; height: 40px; padding: 0; display: grid; place-items: center; color: var(--forest-900); background: transparent; border: 0; font-size: 18px; font-weight: 850; cursor: pointer; }
.quantity-btn:hover:not(:disabled) { background: var(--forest-50); }
.quantity-display { height: 40px; display: grid; place-items: center; color: var(--ink-900); border-inline: 1px solid var(--border); font-size: 12px; font-weight: 900; pointer-events: none; }
.quantity-input { display: none !important; }
.add-to-cart > .primary-btn { min-width: 0; width: 100%; min-height: 42px; height: 42px; padding-inline: 8px; font-size: 10px; }

/* Search/offers */
.search-page,
.offers-page { width: min(980px,100%); margin: 0 auto; }
.search-head,
.offers-head { margin-bottom: 20px; }
.search-result-list { display: grid; gap: 10px; }
.search-result-card {
  min-height: 94px;
  padding: 10px;
  display: grid;
  grid-template-columns: 84px minmax(0,1fr) auto;
  align-items: center;
  gap: 14px;
  color: var(--ink-900);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 17px;
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  transition: transform .18s var(--ease), box-shadow .18s ease, border-color .18s ease;
}
.search-result-card:hover { transform: translateY(-2px); border-color: rgba(52,125,89,.24); box-shadow: var(--shadow-sm); }
.search-result-image { width: 84px; height: 76px; display: grid; place-items: center; overflow: hidden; background: var(--sand-50); border-radius: 12px; }
.search-result-image img { width: 100%; height: 100%; object-fit: contain; }
.search-result-title { font-size: 13px; font-weight: 900; }
.search-result-category { color: var(--ink-500); font-size: 10px; }
.search-result-price { color: var(--forest-700); font-size: 11px; font-weight: 900; }
.search-empty,
.offers-empty { padding: 30px; color: var(--ink-600); background: var(--white); border: 1px dashed var(--border-strong); border-radius: 18px; text-align: center; }
.offers-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 18px;
  align-items: stretch;
}
.offers-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-xs);
  transition: transform .2s var(--ease), box-shadow .2s ease, border-color .2s ease;
}
.offers-card:hover { transform: translateY(-3px); border-color: rgba(52,125,89,.20); box-shadow: var(--shadow-sm); }
.offers-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  min-width: 42px;
  padding: 5px 9px;
  color: var(--white);
  background: #c3463d;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.35;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 5px 14px rgba(195,70,61,.22);
}
.offers-image {
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow: hidden;
  background: linear-gradient(180deg,#fff,#faf8f3);
  border-bottom: 1px solid var(--border);
}
.offers-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}
.offers-body {
  flex: 1;
  min-width: 0;
  padding: 16px 17px 18px;
  display: flex;
  flex-direction: column;
}
.offers-category {
  width: fit-content;
  margin-bottom: 5px;
  color: var(--ink-500);
  font-size: 10px;
  line-height: 1.6;
}
.offers-body h2 {
  min-height: 52px;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--ink-900);
  font-size: 15px;
  line-height: 1.75;
  font-weight: 900;
}
.offers-body h2 a { color: inherit; text-decoration: none; }
.offers-prices {
  min-height: 28px;
  margin: auto 0 0;
  padding-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.offers-old-price { color: #9ba39c; font-size: 9.5px; line-height: 1.5; text-decoration: line-through; white-space: nowrap; }
.offers-sale-price { color: var(--forest-700); font-size: 13px; line-height: 1.5; font-weight: 900; white-space: nowrap; }
.offers-view {
  width: fit-content;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--forest-700);
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 850;
}
.offers-view:hover { color: var(--forest-900); }

/* Tables/cart */
.table-wrap {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; color: var(--ink-900); background: transparent; }
th, td { padding: 14px 13px; text-align: right; border-bottom: 1px solid var(--border); font-size: 11px; }
th { color: var(--ink-700); background: var(--sand-100); font-weight: 900; }
tbody tr:last-child td { border-bottom: 0; }
.cart-product { display: flex; align-items: center; gap: 11px; }
.cart-product img { width: 68px; height: 68px; padding: 5px; object-fit: contain; background: var(--sand-50); border: 1px solid var(--border); border-radius: 13px; }
.cart-product strong { color: var(--ink-900); font-size: 11.5px; }
.cart-remove-btn { width: 32px; height: 32px; display: grid; place-items: center; color: var(--danger); background: var(--danger-soft); border: 1px solid rgba(178,59,53,.15); border-radius: 10px; cursor: pointer; }
.cart-table-wrap .quantity-stepper { transform: scale(.94); transform-origin: right center; }
.summary {
  max-width: 430px;
  margin: 18px 0 0 auto;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 17px;
  box-shadow: var(--shadow-xs);
}
.summary-row { padding: 6px 0; display: flex; justify-content: space-between; gap: 18px; color: var(--ink-700); font-size: 11px; }
.summary-row.total { margin-top: 6px; padding-top: 12px; color: var(--forest-900); border-top: 1px solid var(--border); font-size: 12px; font-weight: 900; }
.cart-help { margin-top: 10px; color: var(--ink-500); font-size: 10px; }

/* Account */
.account-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.account-card { max-width: none; margin: 0; }
.account-card h2 { margin: 0 0 8px; color: var(--forest-900); font-size: 15px; }
.orders-list { display: grid; gap: 10px; margin-top: 18px; }
.order-row { padding: 14px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; background: var(--white); border: 1px solid var(--border); border-radius: 14px; }
.status { display: inline-flex; padding: 3px 8px; color: var(--forest-800); background: var(--forest-50); border: 1px solid rgba(52,125,89,.10); border-radius: 999px; font-size: 9px; font-weight: 850; }

/* Product page harmonization */
.miras-product-v2 { --mp-green: var(--forest-700) !important; --mp-green-deep: var(--forest-900) !important; --mp-gold: var(--gold-600) !important; --mp-text: var(--ink-900) !important; --mp-muted: var(--ink-600) !important; }
.miras-product-v2 .mp-gallery-card,
.miras-product-v2 .mp-content,
.miras-product-v2 .mp-buy-card,
.miras-product-v2 .mp-related-card,
.miras-product-v2 .mp-review-card,
.miras-product-v2 .mp-review-form-box,
.miras-product-v2 .mp-review-summary {
  border-color: var(--border) !important;
  box-shadow: var(--shadow-sm) !important;
}
.miras-product-v2 .mp-title { color: var(--forest-900) !important; }
.miras-product-v2 .mp-add-cart { background: linear-gradient(135deg,var(--forest-700),var(--forest-900)) !important; box-shadow: 0 10px 24px rgba(32,81,59,.20) !important; }
.miras-product-v2 .quantity-stepper { z-index: 0 !important; }
#product-lightbox { z-index: 2147483647 !important; }
#product-lightbox .mp-lightbox-backdrop { background: rgba(11,18,14,.93) !important; backdrop-filter: blur(10px); }
#product-lightbox .mp-lightbox-dialog { max-width: min(96vw, 1280px) !important; }

/* About/wholesale harmonization */
.about-page,
.wholesale-page { color: var(--ink-900); }
.about-container,
.wholesale-page { width: min(var(--container),100%) !important; }
.about-value-card,
.about-contact-card,
.about-map-card,
.wholesale-category-card,
.wholesale-hero-card,
.wholesale-process-grid > *,
.wholesale-faq-list > * { border-color: var(--border) !important; box-shadow: var(--shadow-xs) !important; }

/* Footer */
.site-footer {
  position: relative;
  overflow: hidden;
  padding: 52px 20px 22px;
  color: rgba(255,255,255,.78);
  background:
    radial-gradient(circle at 10% 0%, rgba(199,164,87,.13), transparent 20rem),
    linear-gradient(135deg, #163628, #0f281d);
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer-inner {
  position: relative;
  z-index: 1;
  width: min(var(--container),100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(4,minmax(0,1fr));
  gap: 30px;
}
.footer-brand { padding-left: 18px; }
.footer-brand-name { margin-bottom: 8px; color: var(--white); font-size: 16px; font-weight: 900; }
.footer-brand-copy { max-width: 300px; color: rgba(255,255,255,.62); font-size: 10.5px; line-height: 2; }
.site-footer h3 { margin: 0 0 12px; color: var(--gold-300); font-size: 11.5px; font-weight: 900; }
.site-footer p { margin: 5px 0; }
.site-footer p,
.site-footer a { color: rgba(255,255,255,.70); font-size: 10.5px; text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-social-links { display: grid; gap: 7px; }
.footer-social-link { display: inline-flex; align-items: center; gap: 8px; }
.footer-social-icon { width: 28px; height: 28px; display: grid; place-items: center; color: var(--gold-300); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09); border-radius: 9px; }
.footer-social-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.footer-social-icon-fill { fill: currentColor; stroke: none; }
.footer-social-hint { color: rgba(255,255,255,.45) !important; font-size: 9px !important; }
.footer-bottom { position: relative; z-index: 1; width: min(var(--container),100%); margin: 28px auto 0; padding-top: 15px; color: rgba(255,255,255,.45); border-top: 1px solid rgba(255,255,255,.08); text-align: center; font-size: 9.5px; }

/* Toast */
.site-toast { position: fixed; z-index: 20000; left: 18px; bottom: 18px; max-width: min(420px,calc(100% - 36px)); padding: 11px 14px; display: flex; align-items: center; gap: 8px; color: var(--white); border-radius: 13px; box-shadow: var(--shadow-lg); font-size: 11px; font-weight: 800; transition: opacity .3s ease, transform .3s ease; }
.site-toast.success { background: var(--success); }
.site-toast.error { background: var(--danger); }
.site-toast.toast-hide { opacity: 0; transform: translateY(10px); }

/* Mobile bottom navigation and category sheet */
.mobile-bottom-nav,
.category-sheet,
.category-sheet-backdrop { display: none; }

/* Admin shared essentials */
.admin-nav { margin-bottom: 18px; padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; background: var(--white); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-xs); }
.admin-nav a { padding: 6px 9px; color: var(--ink-800); background: var(--sand-50); border: 1px solid var(--border); border-radius: 9px; text-decoration: none; font-size: 10px; font-weight: 800; }
.admin-product-thumb { width: 62px; height: 62px; padding: 4px; object-fit: contain; background: var(--white); border: 1px solid var(--border); border-radius: 10px; }
.admin-current-image { margin-top: 15px; padding: 12px; display: flex; align-items: center; gap: 12px; background: var(--sand-100); border: 1px solid var(--border); border-radius: 13px; }
.admin-current-image img { width: 100px; height: 100px; object-fit: contain; background: var(--white); border-radius: 10px; }
.admin-checkbox-row { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.admin-checkbox-row input { width: auto; }
.admin-filter-form { max-width: none; }

/* Tablet */
@media (max-width: 1020px) {
  .site-header { grid-template-columns: 145px minmax(220px,1fr) auto; gap: 13px; }
  .brand img { width: 138px; }
  .header-user-text { display: none; }
  .header-actions .account-link { width: 44px; padding: 0; }
  .quick-nav-inner { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .quick-nav-inner::-webkit-scrollbar { display: none; }
  .category-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
  .category-card { min-height: 84px; }
  .products-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .offers-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer-inner { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .footer-brand { grid-column: 1 / -1; padding-left: 0; }
}

/* Mobile */
@media (max-width: 860px) {
  :root { --mobile-nav-space: 92px; }
  body { padding-bottom: var(--mobile-nav-space); }
  .top-bar { min-height: 32px; padding: 4px 10px; font-size: 11px; }
  .top-bar-inner { gap: 9px; justify-content: center; white-space: nowrap; }
  .top-bar-item.is-secondary { display: none; }
  .site-header {
    width: min(100% - 20px, var(--container));
    min-height: 0;
    padding: 10px 0 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand actions" "search search";
    gap: 9px 10px;
  }
  .brand { grid-area: brand; }
  .brand img { width: 116px; max-height: 57px; }
  .header-actions { grid-area: actions; gap: 6px; }
  .header-actions a { min-height: 39px; min-width: 39px; padding: 0 9px; border-radius: 12px; }
  .header-actions .account-link { width: 39px; }
  .header-user-icon svg, .header-cart-svg { width: 19px; height: 19px; }
  .cart-count { top: -6px; left: -6px; min-width: 19px; height: 19px; font-size: 8px; }
  .site-product-search, .site-live-search { grid-area: search; max-width: none; }
  .site-live-search { min-height: 44px; border-radius: 14px; }
  .site-live-search input { height: 42px; font-size: 12px; }
  .site-search-submit { width: 38px; height: 36px; flex-basis: 38px; border-radius: 10px; }
  .site-live-search-panel { position: fixed; top: 128px; right: 10px; left: 10px; max-height: calc(100dvh - 225px); }
  .quick-nav { display: none !important; }

  main { width: 100%; padding: 24px 12px 54px; }
  .hero { margin-bottom: 26px; padding: 25px 17px; border-radius: 22px; }
  .hero h1 { font-size: clamp(21px, 6vw, 29px); line-height: 1.6; }
  .hero p { font-size: 12.5px; line-height: 2; }
  .hero-actions .primary-btn, .hero-actions .secondary-btn { min-width: min(100%,170px); }
  .hero-trust { margin-top: 18px; gap: 6px; }
  .hero-trust span { min-height: 31px; font-size: 10.5px; }
  .section-heading { margin-top: 38px; align-items: center; }
  .section-title { margin-top: 38px; }

  .home-banner-section { margin-bottom: 30px; }
  .home-banner-viewport { border-radius: 18px; }
  .home-banner-slide { aspect-ratio: 3.3 / 1; }
  .home-banner-arrow { display: none; }
  .home-banner-dots { bottom: 8px; }

  .today-deals { margin: 34px 0 38px; padding: 17px; display: block; border-radius: 21px; }
  .today-deals-intro { padding: 0 1px 14px; }
  .today-deals-intro h2 { font-size: 20px; }
  .today-deals-intro p { margin-bottom: 7px; }
  .today-deals-all-link { margin-top: 0; }
  .today-deals-rail { grid-auto-columns: minmax(155px, 47vw); }
  .today-deals-rail--count-1,
  .today-deals-rail--count-2,
  .today-deals-rail--count-3,
  .today-deals-rail--count-4 {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(155px, 47vw);
    justify-content: start;
    overflow-x: auto;
  }
  .deal-card-image { height: 140px; }

  .category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 36px; }
  .category-card { min-height: 78px; padding: 11px 13px; border-radius: 15px; }
  .category-card strong { font-size: 14px; line-height: 1.5; }
  .category-card span { margin-top: 1px; font-size: 10px; }

  .products-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .product-card { border-radius: 16px; }
  .product-card .product-image-box { height: 170px !important; padding: 12px; }
  .product-badge { top: 8px; right: 8px; padding: 3px 7px; font-size: 9px; }
  .product-info { padding: 11px; }
  .product-title { font-size: 12.5px; line-height: 1.75; }
  .product-desc { min-height: 42px; margin: 5px 0 8px; font-size: 10.5px; line-height: 2; }
  .product-meta { align-items: flex-end; }
  .stock { padding: 2px 6px; font-size: 9px; }
  .price { font-size: 11.5px; line-height: 1.6; }
  .product-card-old-price { font-size: 9px; }
  .add-to-cart { grid-template-columns: 1fr; gap: 6px; margin-top: 10px; }
  .quantity-field { width: 100%; }
  .quantity-label { display: none; }
  .quantity-stepper { width: 100%; height: 36px; grid-template-columns: 32px 1fr 32px; border-radius: 10px; }
  .quantity-btn { width: 32px; height: 34px; font-size: 16px; }
  .quantity-display { height: 34px; font-size: 11.5px; }
  .add-to-cart > .primary-btn { height: 40px; min-height: 40px; font-size: 10.5px; border-radius: 10px; }

  .form-card, .panel, .account-card { padding: 18px; border-radius: 18px; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .field.full { grid-column: auto; }
  .form-actions { align-items: stretch; }
  .form-actions > .primary-btn, .form-actions > .secondary-btn, .form-actions > button { flex: 1 1 145px; }
  .account-grid { grid-template-columns: 1fr; }

  .table-wrap { overflow: visible; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
  .cart-responsive-table, .cart-responsive-table tbody { display: block; width: 100%; }
  .cart-responsive-table thead { display: none; }
  .cart-responsive-table tr { margin-bottom: 10px; padding: 12px; display: grid; gap: 9px; background: var(--white); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-xs); }
  .cart-responsive-table td { padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: transparent; border: 0; font-size: 11.5px; }
  .cart-responsive-table td:not(.cart-cell-product)::before { content: attr(data-label); color: var(--ink-500); font-size: 10.5px; }
  .cart-cell-product { display: block !important; }
  .cart-product img { width: 60px; height: 60px; }
  .cart-table-wrap .quantity-stepper { width: 96px; transform: none; grid-template-columns: 30px 36px 30px; }
  .summary { max-width: none; margin-right: 0; }
  .cart-actions { justify-content: stretch !important; }
  .cart-actions > * { flex: 1 1 140px; }

  .search-result-card { grid-template-columns: 65px minmax(0,1fr) auto; gap: 9px; min-height: 78px; padding: 8px; border-radius: 14px; }
  .search-result-image { width: 65px; height: 62px; }
  .search-result-title { font-size: 12px; }
  .search-result-price { font-size: 11px; }
  .offers-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .offers-image { height: 145px; }
  .offers-body { padding: 11px; }

  .site-footer { padding: 38px 16px 18px; }
  .footer-inner { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 25px 18px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand-copy { max-width: 100%; }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 19000;
    right: 9px;
    left: 9px;
    bottom: max(8px, env(safe-area-inset-bottom));
    min-height: 67px;
    padding: 6px;
    display: grid;
    grid-template-columns: repeat(5,1fr);
    align-items: center;
    background: rgba(255,255,255,.94);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 16px 45px rgba(16,40,29,.18);
    backdrop-filter: blur(18px);
  }
  .mobile-bottom-item {
    position: relative;
    min-width: 0;
    height: 54px;
    padding: 3px 1px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--ink-500) !important;
    background: transparent;
    border: 0;
    border-radius: 13px;
    text-decoration: none !important;
    font-size: 10px;
    font-weight: 850;
    cursor: pointer;
  }
  .mobile-bottom-item svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease); }
  .mobile-bottom-item.is-active { color: var(--forest-700) !important; background: var(--forest-50); }
  .mobile-bottom-item.is-active svg { transform: translateY(-1px); }
  .mobile-bottom-cart-count { position: absolute; top: 1px; right: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; color: var(--white); background: var(--danger); border: 2px solid var(--white); border-radius: 999px; font-size: 9px; }

  .category-sheet-backdrop { position: fixed; z-index: 19990; inset: 0; display: block; visibility: hidden; opacity: 0; background: rgba(12,24,17,.45); backdrop-filter: blur(4px); transition: opacity .24s ease, visibility .24s; }
  .category-sheet-backdrop.is-open { visibility: visible; opacity: 1; }
  .category-sheet {
    position: fixed;
    z-index: 20000;
    right: 0;
    left: 0;
    bottom: 0;
    max-height: min(78dvh, 680px);
    display: block;
    overflow: hidden;
    color: var(--ink-900);
    background: var(--sand-50);
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: 26px 26px 0 0;
    box-shadow: 0 -22px 60px rgba(16,40,29,.20);
    transform: translateY(105%);
    transition: transform .28s var(--ease);
  }
  .category-sheet.is-open { transform: translateY(0); }
  .category-sheet-handle { width: 42px; height: 4px; margin: 9px auto 2px; background: var(--sand-300); border-radius: 999px; }
  .category-sheet-head { padding: 12px 17px 13px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
  .category-sheet-title small { display: block; color: var(--ink-500); font-size: 10px; }
  .category-sheet-title strong { display: block; color: var(--forest-900); font-size: 14px; }
  .category-sheet-close { width: 36px; height: 36px; display: grid; place-items: center; color: var(--ink-700); background: var(--white); border: 1px solid var(--border); border-radius: 11px; }
  .category-sheet-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .category-sheet-body { max-height: calc(min(78dvh,680px) - 76px); overflow-y: auto; padding: 13px 14px calc(24px + env(safe-area-inset-bottom)); }
  .bottom-category-grid { display: grid; gap: 8px; }
  .mobile-category-direct,
  .mobile-category-parent { min-height: 56px; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink-900); background: var(--white); border: 1px solid var(--border); border-radius: 14px; text-decoration: none; list-style: none; cursor: pointer; }
  .mobile-category-parent::-webkit-details-marker { display: none; }
  .mobile-category-copy strong { display: block; color: var(--forest-900); font-size: 12.5px; }
  .mobile-category-copy small { display: block; margin-top: 1px; color: var(--ink-500); font-size: 10px; }
  .mobile-category-arrow { color: var(--forest-700); }
  .mobile-category-chevron svg { width: 17px; height: 17px; fill: none; stroke: var(--ink-500); stroke-width: 1.8; transition: transform .2s ease; }
  .mobile-category-group[open] .mobile-category-chevron svg { transform: rotate(180deg); }
  .mobile-category-children { padding: 7px 5px 2px; }
  .mobile-category-children-inner { display: grid; gap: 6px; }
  .mobile-category-all,
  .mobile-category-child { min-height: 42px; padding: 7px 10px; display: flex; align-items: center; justify-content: space-between; color: var(--ink-700); background: rgba(255,255,255,.64); border: 1px solid var(--border); border-radius: 11px; text-decoration: none; font-size: 11px; }
  .mobile-category-child.is-current { color: var(--forest-800); background: var(--forest-50); border-color: rgba(52,125,89,.24); }
  .category-sheet-links { margin-top: 12px; padding-top: 12px; display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; border-top: 1px solid var(--border); }
  .category-sheet-links a { min-height: 42px; padding: 6px; display: grid; place-items: center; color: var(--ink-700); background: var(--white); border: 1px solid var(--border); border-radius: 11px; text-align: center; text-decoration: none; font-size: 10.5px; font-weight: 800; }
  body.category-sheet-open { overflow: hidden; }

  /* Product lightbox: keep mobile image clean; no +/- controls over the image. */
  body.mp-lightbox-open .mobile-bottom-nav { visibility: hidden !important; }
  #product-lightbox .mp-lightbox-actions #lightbox-zoom-in,
  #product-lightbox .mp-lightbox-actions #lightbox-zoom-out,
  #product-lightbox .mp-lightbox-actions #lightbox-zoom-reset { display: none !important; }
  #product-lightbox .mp-lightbox-topbar { padding-inline: 12px !important; }
  #product-lightbox .mp-lightbox-image-wrap { max-width: 100vw !important; max-height: calc(100dvh - 90px) !important; }
}

@media (max-width: 520px) {
  .top-bar-inner .top-bar-dot { display: none; }
  .site-header { width: calc(100% - 16px); }
  .brand img { width: 105px; }
  .category-grid { gap: 8px; }
  .products-grid { gap: 8px; }
  .product-card .product-image-box { height: 155px !important; padding: 10px; }
  .product-info { padding: 10px; }
  .product-desc { display: none; }
  .product-title { min-height: 39px; }
  .offers-grid { grid-template-columns: 1fr; }
  .offers-image { height: 210px; }
  .search-result-card { grid-template-columns: 58px minmax(0,1fr); }
  .search-result-image { width: 58px; height: 58px; }
  .search-result-arrow { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
.cart-actions { justify-content: flex-end; }
.cart-actions-center { justify-content: center; }
.field-error { display: block; margin-top: 6px; color: var(--danger); font-size: 9.5px; font-weight: 800; }
.checkout-section { max-width: none; margin-top: 24px; box-shadow: none; }
.checkout-section-title { margin: 0 0 15px; color: var(--forest-900); font-size: 16px; }
.payment-option { margin-bottom: 9px; padding: 13px; display: flex; align-items: flex-start; gap: 10px; background: var(--white); border: 1px solid var(--border); border-radius: 13px; cursor: pointer; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.payment-option:last-child { margin-bottom: 0; }
.payment-option:has(input:checked) { background: var(--forest-50); border-color: rgba(52,125,89,.38); box-shadow: 0 0 0 3px rgba(52,125,89,.06); }
.payment-option input { margin-top: 4px; accent-color: var(--forest-700); }
.payment-option strong { color: var(--ink-900); font-size: 11.5px; }
.payment-option small { color: var(--ink-600); font-size: 10px; line-height: 1.9; }
.payment-option.is-disabled { opacity: .52; cursor: not-allowed; }
.checkout-shipping-note { margin: 8px 0 15px; color: var(--ink-500); font-size: 10px; line-height: 1.9; }
.category-not-found-notice { max-width: 760px; margin: 24px auto; }
.policy-panel { max-width: 900px; margin: 24px auto; line-height: 2; }
.about-actions-start { justify-content: flex-start !important; }
.c2c-order-number { direction: ltr; display: inline-block; user-select: all; }
.c2c-bank-label { font-size: 11px; color: rgba(255,255,255,.65); }
.c2c-bank-hint { font-size: 10px; color: rgba(255,255,255,.58); }
.order-success-panel { text-align: center; }
.order-success-icon { width: 64px; height: 64px; margin: 0 auto 16px; display: grid; place-items: center; color: var(--success); background: var(--success-soft); border-radius: 50%; font-size: 28px; }
.order-success-title { margin: 0 0 10px; color: var(--forest-900); font-size: 24px; }
.order-success-copy { margin-top: 10px; color: var(--ink-600); }
.order-success-copy.compact { margin-top: 8px; }
.order-success-actions { justify-content: center; margin-top: 22px; }
.tracking-result { margin-top: 30px; }
.tracking-result h2 { margin: 0 0 10px; color: var(--forest-900); font-size: 17px; }
.tracking-steps { margin-top: 22px; }
.tracking-step { padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 11px; }
.tracking-step:last-child { border-bottom: 0; }
.tracking-step strong { color: var(--success); }
.tracking-step-pending { color: var(--ink-500); opacity: .65; }
.tracking-summary { margin-top: 24px; }
.order-success-number { margin-bottom: 15px; direction: ltr; display: inline-block; user-select: all; color: var(--forest-900); }
.order-success-copy-actions { justify-content: center; margin-top: 5px; margin-bottom: 22px; }
.account-email-resend { margin-bottom: 16px; }
.account-address-item { margin-bottom: 12px; padding: 14px; background: var(--sand-50); border: 1px solid var(--border); border-radius: 14px; }
.account-address-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.account-default-badge { margin-right: 7px; color: var(--gold-700); font-weight: 800; }
.account-address-copy { margin-bottom: 10px; color: var(--ink-700); font-size: 10.5px; line-height: 2; }
.account-address-edit-toggle { margin-bottom: 12px; color: var(--forest-700); cursor: pointer; font-weight: 850; }
.account-address-delete { margin-top: 10px; }
.account-logout { margin-top: 12px; }
.account-new-address-panel { margin-top: 20px; }
.account-orders-section { margin-top: 30px; }
.account-order-card { display: block; padding: 0; overflow: hidden; }
.account-order-summary { padding: 15px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; list-style: none; cursor: pointer; }
.account-order-summary::-webkit-details-marker { display: none; }
.account-order-price { text-align: left; }
.account-order-details-label { width: 100%; color: var(--forest-700); font-size: 10px; font-weight: 800; }
.account-order-details { padding: 16px; border-top: 1px solid var(--border); }
.account-order-meta { margin-bottom: 17px; display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 10px; }
.account-order-meta > div { padding: 10px; background: var(--sand-50); border: 1px solid var(--border); border-radius: 11px; }
.account-order-meta small { color: var(--ink-500); font-size: 9px; }
.account-order-meta strong { color: var(--ink-900); font-size: 10.5px; }
.account-order-items-title { margin: 0 0 10px; color: var(--forest-900); font-size: 13px; }
.account-order-table-wrap { overflow-x: auto; }
.account-order-table { width: 100%; min-width: 560px; border-collapse: collapse; }
.account-order-th-product, .account-order-th-qty, .account-order-th-price,
.account-order-td-product, .account-order-td-qty, .account-order-td-price { padding: 9px; border-bottom: 1px solid var(--border); }
.account-order-th-product { text-align: right; }
.account-order-th-qty, .account-order-td-qty { text-align: center; }
.account-order-th-price, .account-order-td-price { text-align: left; }
.account-order-total { margin-top: 17px; padding-top: 13px; display: flex; justify-content: space-between; gap: 12px; color: var(--forest-900); border-top: 1px solid var(--border); font-weight: 900; }
@media (max-width: 620px) {
  .account-address-head .secondary-btn { width: 100%; }
  .account-order-summary { align-items: flex-start; }
  .account-order-price { width: 100%; text-align: right; }
  .account-order-meta { grid-template-columns: 1fr; }
}
.latin-digits { direction: ltr; unicode-bidi: isolate; }

/* Branded social icons */
.footer-social-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 7px;
}

/* Admin shell: responsive without storefront mobile chrome */
.admin-shell main { width: min(var(--container), calc(100% - 28px)); }
.admin-shell .admin-nav { position: relative; }
.admin-shell .admin-order-toolbar { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.admin-shell .admin-order-search { flex: 1 1 440px; display: flex; align-items: center; gap: 8px; }
.admin-shell .admin-order-search input { min-width: 0; flex: 1; }
.admin-shell .admin-order-search-clear { color: var(--forest-700); font-weight: 800; text-decoration: none; }
.admin-shell .admin-order-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.admin-shell .table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-shell .table-wrap > table { min-width: 760px; }

@media (max-width: 860px) {
  body.admin-shell { padding-bottom: 0; }
  .admin-shell .mobile-bottom-nav,
  .admin-shell .category-sheet,
  .admin-shell .category-sheet-backdrop { display: none !important; }
  .admin-shell main { width: 100%; padding-bottom: 40px; }
  .admin-shell .admin-nav { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .admin-shell .admin-nav::-webkit-scrollbar { display: none; }
  .admin-shell .admin-nav a { flex: 0 0 auto; font-size: 11px; }
  .admin-shell .table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--white); }
  .admin-shell .admin-order-search { flex-basis: 100%; }
}
