@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f7f7f4;
  --bg-2: #ffffff;
  --card: rgba(255, 255, 255, 0.95);
  --text: #18191b;
  --muted: #666a70;
  --primary: #9e2347;
  --secondary: #e3a34a;
  --accent: #e3a34a;
  --line: rgba(25, 26, 29, 0.12);
  --success: #167a4a;
  --danger: #b42335;
  --shadow: 0 6px 20px rgba(25, 26, 29, 0.07);
  --shadow-md: 0 10px 32px rgba(25, 26, 29, 0.1);
  --shadow-lg: 0 20px 48px rgba(25, 26, 29, 0.13);
  --shadow-xl: 0 30px 64px rgba(25, 26, 29, 0.16);
  --radius: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --header-h: 76px;
  --container: 1200px;
  --trans: 260ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Arial, system-ui, sans-serif;
  color: var(--text);
  line-height: 1.65;
  background:
    radial-gradient(ellipse 800px 600px at 100% 0%,
      rgba(244, 168, 57, 0.18),
      transparent 40%),
    radial-gradient(ellipse 900px 700px at 0% 100%,
      rgba(139, 30, 63, 0.12),
      transparent 45%),
    linear-gradient(135deg, #fefdfb 0%, #faf8f6 100%);
  overflow-x: clip;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
}

main,
header,
footer,
section {
  max-width: 100%;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

input {
  outline: none;
}

:focus-visible {
  outline: 3px solid rgba(244, 184, 96, 0.35);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.container {
  width: min(calc(100% - 24px), var(--container));
  max-width: calc(100% - 24px);
  margin-inline: auto;
}

.section {
  padding-block: 32px;
}

.section-head {
  margin-bottom: 24px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(244, 168, 57, 0.12), rgba(139, 30, 63, 0.08));
  border: 1px solid rgba(244, 168, 57, 0.25);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.section-title {
  margin: 12px 0 8px;
  font-size: clamp(1.6rem, 1rem + 1.8vw, 2.4rem);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 65ch;
  line-height: 1.7;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(254, 253, 251, 0.8);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border-bottom: 1px solid rgba(139, 30, 63, 0.06);
  box-shadow: 0 4px 20px rgba(31, 23, 32, 0.06);
}

.topbar-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  flex: 0 0 auto;
  border: 1px solid rgba(244, 168, 57, 0.1);
}

.brand-meta {
  min-width: 0;
}

.brand-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.1;
}

.brand-sub {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn,
.top-btn,
.promo-nav,
.promo-dot,
.quick-close,
.quick-action {
  min-height: 42px;
  min-width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(244, 168, 57, 0.15);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  transition:
    transform var(--trans),
    box-shadow var(--trans),
    background var(--trans),
    color var(--trans),
    border-color var(--trans),
    backdrop-filter var(--trans);
}

.icon-btn:hover,
.top-btn:hover,
.btn:hover,
.filter-chip:hover,
.tab:hover,
.category-card:hover,
.product-card:hover,
.promo-nav:hover,
.promo-dot:hover,
.quick-close:hover,
.quick-action:hover,
.details-reco-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.top-btn {
  padding-inline: 14px;
  font-weight: 800;
  color: var(--primary);
}

.theme-toggle {
  color: var(--text);
}

.theme-toggle svg:last-child {
  display: none;
}

body[data-theme="dark"] .theme-toggle svg:first-child {
  display: none;
}

body[data-theme="dark"] .theme-toggle svg:last-child {
  display: block;
}

.hero {
  padding-top: 24px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 480px;
  border-radius: 32px;
  background: linear-gradient(135deg, #1a1116 0%, #2f1f2b 100%);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-media,
.hero-media img,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media img {
  object-fit: cover;
}

.hero-overlay {
  background:
    radial-gradient(circle at 20% 15%,
      rgba(255, 200, 87, 0.22),
      transparent 28%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.75));
}

.hero-content {
  position: relative;
  z-index: 1;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
  padding: 32px;
  max-width: 700px;
  color: #fff;
}

.hero-badge {
  width: max-content;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.2rem, 1.2rem + 3.6vw, 4.2rem);
  line-height: 1;
  font-weight: 970;
  letter-spacing: -0.035em;
}

.hero-text {
  margin: 0;
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.85;
  font-size: 1.05rem;
}

.hero-tags,
.hero-actions,
.filters,
.tabs,
.meta-row,
.product-badges,
.footer-links-inline,
.promo-controls,
.promo-dots,
.details-actions,
.details-chips,
.details-reco-grid,
.quick-actions,
.quick-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tag {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-tag.open {
  background: rgba(211, 255, 228, 0.95);
  color: #145c3a;
  border-color: rgba(31, 157, 97, 0.18);
}

.hero-tag.closed {
  background: rgba(255, 231, 231, 0.95);
  color: #842121;
  border-color: rgba(220, 77, 77, 0.18);
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 16px;
  font-weight: 900;
  border: 1px solid transparent;
  transition:
    transform var(--trans),
    box-shadow var(--trans),
    background var(--trans),
    border-color var(--trans),
    color var(--trans),
    translate var(--trans);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, #a8264f 100%);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity var(--trans);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-glass {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.32);
}

.panel {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(139, 30, 63, 0.08);
  border-radius: 26px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  padding: 22px;
}

.promo-slider {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #1a1116 0%, #2f1f2b 100%);
  box-shadow: var(--shadow-lg);
  min-height: 280px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.promo-track {
  position: relative;
  min-height: inherit;
}

.promo-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 420ms ease,
    visibility 420ms ease;
}

.promo-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.promo-slide-media,
.promo-slide-media img,
.promo-slide-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.promo-slide-media img {
  object-fit: cover;
}

.promo-slide-overlay {
  background:
    radial-gradient(circle at 18% 20%,
      rgba(255, 215, 161, 0.22),
      transparent 26%),
    linear-gradient(270deg,
      rgba(17, 14, 16, 0.82) 0%,
      rgba(17, 14, 16, 0.48) 46%,
      rgba(17, 14, 16, 0.26) 100%);
}

.promo-slide-content {
  position: relative;
  z-index: 1;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 28px;
  max-width: 600px;
  color: #fff;
}

.promo-badge {
  width: max-content;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.promo-title {
  margin: 0;
  font-size: clamp(1.5rem, 1rem + 1.9vw, 2.5rem);
  line-height: 1.1;
  font-weight: 970;
  letter-spacing: -0.03em;
}

.promo-text {
  margin: 0;
  max-width: 58ch;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  font-size: 1rem;
}

.promo-bottom {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.promo-controls {
  gap: 8px;
}

.promo-nav {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.promo-dots {
  gap: 8px;
}

.promo-dot {
  min-width: 12px;
  min-height: 12px;
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  border: 0;
  box-shadow: none;
}

.promo-dot.active {
  width: 34px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.promo-meta {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.86rem;
  font-weight: 700;
}

.search-grid {
  display: grid;
  gap: 12px;
}

.search-box {
  position: relative;
}

.search-input {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px 14px 50px;
  border-radius: 18px;
  border: 1.5px solid rgba(139, 30, 63, 0.12);
  background: #fff;
  color: var(--text);
  font-size: 1rem;
  transition:
    border-color var(--trans),
    box-shadow var(--trans),
    background var(--trans);
  box-shadow: var(--shadow-sm);
}

.search-input::placeholder {
  color: var(--muted);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.filters,
.tabs {
  overflow: auto;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar,
.tabs::-webkit-scrollbar {
  display: none;
}

.filter-chip,
.tab {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(139, 30, 63, 0.15);
  background: #fff;
  color: var(--text);
  font-weight: 800;
  font-size: 0.9rem;
  transition:
    transform var(--trans),
    box-shadow var(--trans),
    background var(--trans),
    color var(--trans),
    border-color var(--trans);
  box-shadow: var(--shadow-sm);
}

.filter-chip.active,
.tab.active {
  background: linear-gradient(135deg, var(--primary), #a8264f);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.results-text {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.sticky-tabs-wrap {
  position: sticky;
  top: calc(var(--header-h) + 10px);
  z-index: 40;
  padding-top: 6px;
}

.categories-grid {
  display: grid;
  gap: 12px;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 1fr);
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.category-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 3.5;
  min-height: 160px;
  max-height: 280px;
  border-radius: 24px;
  background: linear-gradient(135deg, #1a1116 0%, #2f1f2b 100%);
  box-shadow: var(--shadow-md);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transition:
    transform var(--trans),
    box-shadow var(--trans),
    filter var(--trans);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.82));
  z-index: 1;
}

.category-card-body {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px;
  color: #fff;
}

.category-topline {
  width: max-content;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.category-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 950;
}

.category-desc {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}

.menu-sections {
  display: grid;
  gap: 24px;
}

.menu-section {
  scroll-margin-top: 150px;
}

.menu-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.menu-head h3 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: 950;
}

.menu-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.b-popular {
  background: rgba(139, 30, 63, 0.95);
  color: #fff;
}

.b-new {
  background: rgba(31, 157, 97, 0.95);
  color: #fff;
}

.b-spicy {
  background: rgba(216, 86, 45, 0.95);
  color: #fff;
}

.b-veg {
  background: rgba(220, 255, 232, 0.98);
  color: #145c3a;
}

.b-offer {
  background: rgba(255, 235, 235, 0.98);
  color: #8f2020;
}

.b-unavailable {
  background: rgba(245, 239, 239, 0.98);
  color: #7c2a2a;
}

.b-seasonal {
  background: rgba(255, 244, 220, 0.98);
  color: #8a5a08;
}

.b-shareable {
  background: rgba(242, 240, 255, 0.98);
  color: #4e43a8;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(244, 168, 57, 0.08), rgba(139, 30, 63, 0.06));
  border: 1px solid rgba(139, 30, 63, 0.1);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
}

.count-pill {
  flex: 0 0 auto;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(139, 30, 63, 0.06);
  border: 1px solid rgba(139, 30, 63, 0.08);
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 800;
}

.products-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.product-card {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px;
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(180deg,
      rgba(255, 255, 255, 0.99),
      rgba(255, 252, 248, 0.97));
  border: 1.5px solid rgba(139, 30, 63, 0.08);
  box-shadow: var(--shadow-md);
  transition:
    transform var(--trans),
    box-shadow var(--trans),
    border-color var(--trans),
    background var(--trans),
    color var(--trans);
}

.product-card:hover {
  border-color: rgba(139, 30, 63, 0.15);
}

.product-card.unavailable {
  opacity: 1;
  filter: none;
}

.product-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  background: #f0e8e3;
  box-shadow: var(--shadow-sm);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.product-card:hover .product-image img {
  transform: scale(1.06);
}

.product-body {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-content: start;
}

.product-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 950;
  color: var(--text);
}

.product-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-bottom {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.price-current {
  display: inline-flex;
  white-space: nowrap;
  font-size: 1.15rem;
  font-weight: 970;
  color: var(--text);
}

.price-old {
  display: inline-flex;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: line-through;
}

.product-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.product-btn {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(139, 30, 63, 0.2);
  background: rgba(139, 30, 63, 0.08);
  color: var(--primary);
  font-weight: 850;
  white-space: nowrap;
  transition:
    background var(--trans),
    border-color var(--trans),
    color var(--trans),
    box-shadow var(--trans);
  box-shadow: var(--shadow-sm);
}

.product-btn:hover {
  background: rgba(139, 30, 63, 0.14);
  border-color: rgba(139, 30, 63, 0.3);
  box-shadow: var(--shadow-md);
}

.product-quick-btn {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1.5px solid rgba(139, 30, 63, 0.1);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  font-weight: 850;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.product-card.unavailable .product-btn,
.product-card.unavailable .product-quick-btn {
  background: #f3f1f0;
  border-color: #e8dfd9;
  color: var(--muted);
  pointer-events: none;
}

.empty {
  text-align: center;
  padding: 48px 24px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 252, 248, 0.92));
  box-shadow: var(--shadow-md);
  border: 1.5px solid rgba(139, 30, 63, 0.08);
}

.empty h3 {
  margin: 0 0 12px;
  font-size: 1.4rem;
  font-weight: 950;
  color: var(--text);
}

.empty p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.footer {
  margin-top: 40px;
  padding: 28px 0 36px;
}

.footer-card {
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(ellipse 600px 400px at 15% 5%,
      rgba(244, 168, 57, 0.16),
      transparent 35%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 252, 248, 0.88));
  border: 1.5px solid rgba(139, 30, 63, 0.08);
  box-shadow: var(--shadow-lg);
}

.footer-grid {
  display: grid;
  gap: 24px;
}

.footer-brand {
  display: grid;
  gap: 16px;
}

.footer-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(244, 168, 57, 0.1);
  flex: 0 0 auto;
}

.footer-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 950;
}

.footer-meta {
  color: var(--muted);
  font-size: 0.94rem;
}

.footer-text,
.footer-link,
.footer-meta {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.85;
}

.footer-cols {
  display: grid;
  gap: 24px;
}

.footer-col h4 {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 950;
}

.footer-links {
  display: grid;
  gap: 12px;
}

.footer-link {
  transition: color var(--trans);
}

.footer-link:hover {
  color: var(--primary);
  font-weight: 900;
}

.footer-links-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.footer-bottom {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1.5px solid rgba(139, 30, 63, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-credit {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

/* Premium Quick View Modal */
.quick-view {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(17, 14, 16, 0.54);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--trans),
    visibility var(--trans);
}

.quick-view.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.quick-dialog {
  width: min(100%, 760px);
  max-height: min(90vh, 850px);
  overflow: auto;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  border: 1.5px solid rgba(139, 30, 63, 0.08);
  box-shadow: var(--shadow-xl);
  padding: 20px;
  transform: translateY(16px) scale(0.98);
  transition: transform var(--trans);
}

.quick-view.show .quick-dialog {
  transform: translateY(0) scale(1);
}

.quick-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.quick-close {
  color: var(--text);
  flex: 0 0 auto;
}

.quick-layout {
  display: grid;
  gap: 16px;
}

.quick-media {
  overflow: hidden;
  border-radius: 24px;
  background: #f0e8e3;
  box-shadow: var(--shadow-md);
}

.quick-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.quick-content {
  display: grid;
  gap: 12px;
}

.quick-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 950;
}

.quick-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1rem;
}

.quick-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.quick-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-action {
  padding-inline: 16px;
  font-weight: 850;
  color: var(--primary);
  flex: 0 0 auto;
}

/* Premium Details Section */
.main-sections-hidden .hero,
.main-sections-hidden [aria-labelledby="promoTitle"],
.main-sections-hidden [aria-labelledby="categoriesTitle"],
.main-sections-hidden [aria-labelledby="searchTitle"],
.main-sections-hidden .sticky-tabs-wrap,
.main-sections-hidden #menu,
.main-sections-hidden #footer {
  display: none;
}

.details-shell {
  padding: 22px;
}

.details-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid rgba(139, 30, 63, 0.08);
}

.details-back-btn {
  flex: 0 0 auto;
}

.details-topbar-text {
  min-width: 0;
}

.details-layout {
  display: grid;
  gap: 20px;
}

.details-media,
.details-content {
  min-width: 0;
}

.details-image-wrap {
  overflow: hidden;
  border-radius: 26px;
  background: #f0e8e3;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(244, 168, 57, 0.1);
}

.details-image-wrap img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.details-gallery {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding: 2px 2px 8px;
}

.details-gallery-thumb {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #f0e8e3;
  cursor: pointer;
}

.details-gallery-thumb.active {
  border-color: var(--primary);
}

.details-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.details-head {
  display: grid;
  gap: 6px;
}

.details-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 970;
}

.details-subtitle {
  max-width: none;
  color: var(--muted);
  font-size: 1rem;
}

.details-description {
  margin: 0;
  color: var(--text);
  line-height: 1.9;
  font-size: 1.02rem;
}

.details-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.details-meta-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.details-meta-card {
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(244, 168, 57, 0.08), rgba(139, 30, 63, 0.06));
  border: 1.5px solid rgba(139, 30, 63, 0.1);
  box-shadow: var(--shadow-sm);
}

.details-meta-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.details-meta-value {
  font-size: 1rem;
  font-weight: 950;
  color: var(--text);
}

.details-block {
  display: grid;
  gap: 12px;
}

.details-block-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 950;
}

.details-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.details-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid rgba(139, 30, 63, 0.1);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 850;
  box-shadow: var(--shadow-sm);
  transition: all var(--trans);
}

.details-chip:hover {
  border-color: rgba(139, 30, 63, 0.2);
  background: rgba(244, 168, 57, 0.08);
}

.details-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.details-reco-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.details-reco-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  background: linear-gradient(180deg,
      rgba(255, 255, 255, 0.99),
      rgba(255, 252, 248, 0.97));
  border: 1.5px solid rgba(139, 30, 63, 0.08);
  box-shadow: var(--shadow-md);
  transition:
    transform var(--trans),
    box-shadow var(--trans),
    border-color var(--trans);
}

.details-reco-media {
  overflow: hidden;
  border-radius: 18px;
  background: #f0e8e3;
  box-shadow: var(--shadow-sm);
}

.details-reco-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.details-reco-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 950;
}

.details-reco-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.details-reco-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.details-empty {
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(244, 168, 57, 0.08), rgba(139, 30, 63, 0.06));
  border: 1.5px solid rgba(139, 30, 63, 0.1);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

/* Premium Dark Mode */
body[data-theme="dark"] {
  --bg: #0a0809;
  --bg-2: #13111a;
  --card: rgba(24, 22, 30, 0.95);
  --text: #f0ebe4;
  --muted: #b8adb5;
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 26px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 20px 52px rgba(0, 0, 0, 0.44);
  --shadow-xl: 0 32px 72px rgba(0, 0, 0, 0.52);
  background:
    radial-gradient(ellipse 800px 600px at 100% 0%,
      rgba(244, 168, 57, 0.14),
      transparent 40%),
    radial-gradient(ellipse 900px 700px at 0% 100%,
      rgba(139, 30, 63, 0.1),
      transparent 45%),
    linear-gradient(135deg, #13111a 0%, #0a0809 100%);
}

body[data-theme="dark"] .topbar {
  background: rgba(13, 11, 19, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.26);
}

body[data-theme="dark"] .icon-btn,
body[data-theme="dark"] .top-btn,
body[data-theme="dark"] .quick-close,
body[data-theme="dark"] .quick-action {
  background: rgba(24, 22, 30, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

body[data-theme="dark"] .section-kicker {
  background: rgba(244, 168, 57, 0.12);
  border-color: rgba(244, 168, 57, 0.22);
  color: var(--accent);
}

body[data-theme="dark"] .section-title {
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body[data-theme="dark"] .panel,
body[data-theme="dark"] .empty,
body[data-theme="dark"] .footer-card,
body[data-theme="dark"] .product-card,
body[data-theme="dark"] .filter-chip,
body[data-theme="dark"] .tab,
body[data-theme="dark"] .search-input,
body[data-theme="dark"] .meta-pill,
body[data-theme="dark"] .details-meta-card,
body[data-theme="dark"] .details-chip,
body[data-theme="dark"] .details-reco-card,
body[data-theme="dark"] .details-empty,
body[data-theme="dark"] .quick-dialog {
  background: rgba(24, 22, 30, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

body[data-theme="dark"] .product-card {
  background: linear-gradient(180deg,
      rgba(24, 22, 30, 0.98),
      rgba(18, 16, 24, 0.96));
}

body[data-theme="dark"] .details-reco-card {
  background: linear-gradient(180deg,
      rgba(24, 22, 30, 0.98),
      rgba(18, 16, 24, 0.96));
}

body[data-theme="dark"] .footer-card {
  background:
    radial-gradient(ellipse 600px 400px at 15% 5%,
      rgba(244, 168, 57, 0.12),
      transparent 35%),
    linear-gradient(135deg, rgba(24, 22, 30, 0.94), rgba(18, 16, 24, 0.92));
}

body[data-theme="dark"] .search-input {
  caret-color: var(--accent);
  border-color: rgba(244, 168, 57, 0.2);
}

body[data-theme="dark"] .search-input::placeholder,
body[data-theme="dark"] .results-text,
body[data-theme="dark"] .menu-head p,
body[data-theme="dark"] .footer-text,
body[data-theme="dark"] .footer-link,
body[data-theme="dark"] .footer-meta,
body[data-theme="dark"] .footer-credit,
body[data-theme="dark"] .brand-sub,
body[data-theme="dark"] .product-desc,
body[data-theme="dark"] .price-old,
body[data-theme="dark"] .empty p,
body[data-theme="dark"] .search-icon,
body[data-theme="dark"] .details-subtitle,
body[data-theme="dark"] .details-reco-text,
body[data-theme="dark"] .quick-desc,
body[data-theme="dark"] .meta-pill {
  color: var(--muted);
}

body[data-theme="dark"] .filter-chip.active,
body[data-theme="dark"] .tab.active,
body[data-theme="dark"] .promo-dot.active,
body[data-theme="dark"] .btn-primary {
  color: #fff;
}

body[data-theme="dark"] .product-btn {
  background: rgba(244, 168, 57, 0.12);
  border-color: rgba(244, 168, 57, 0.2);
  color: var(--accent);
}

body[data-theme="dark"] .product-btn:hover {
  background: rgba(244, 168, 57, 0.18);
  border-color: rgba(244, 168, 57, 0.28);
}

body[data-theme="dark"] .quick-action {
  background: rgba(244, 168, 57, 0.12);
  border-color: rgba(244, 168, 57, 0.2);
  color: var(--accent);
}

body[data-theme="dark"] .product-quick-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

body[data-theme="dark"] .count-pill {
  background: rgba(244, 168, 57, 0.12);
  border-color: rgba(244, 168, 57, 0.2);
  color: var(--accent);
}

body[data-theme="dark"] .promo-nav {
  background: rgba(24, 22, 30, 0.7);
  border-color: rgba(255, 255, 255, 0.14);
}

body[data-theme="dark"] .promo-dot {
  background: rgba(255, 255, 255, 0.24);
}

body[data-theme="dark"] .product-image,
body[data-theme="dark"] .details-image-wrap,
body[data-theme="dark"] .details-reco-media,
body[data-theme="dark"] .quick-media {
  background: #20192a;
}

body[data-theme="dark"] .product-card.unavailable .product-btn,
body[data-theme="dark"] .product-card.unavailable .product-quick-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .details-chip {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

body[data-theme="dark"] .details-chip:hover {
  border-color: rgba(244, 168, 57, 0.2);
  background: rgba(244, 168, 57, 0.12);
}

/* Responsive Media Queries */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

@media (min-width: 700px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .quick-layout {
    grid-template-columns: minmax(260px, 0.95fr) minmax(0, 1.15fr);
    align-items: start;
  }

  .details-topbar-text {
    flex: 1;
  }

  .categories-grid {
    grid-auto-columns: minmax(200px, 1fr);
  }

  .category-card {
    aspect-ratio: 3 / 3.8;
  }
}

@media (min-width: 980px) {
  .categories-grid {
    grid-auto-flow: unset;
    grid-auto-columns: unset;
    grid-template-columns: repeat(4, 1fr);
    overflow: visible;
    overflow-y: hidden;
    scroll-snap-type: none;
    padding-bottom: 0;
  }

  .category-card {
    aspect-ratio: 1 / 1;
    min-height: auto;
    max-height: none;
    scroll-snap-align: unset;
    scroll-snap-stop: unset;
  }

  .search-grid {
    grid-template-columns: minmax(0, 1.2fr) auto;
    align-items: center;
  }

  .footer-grid {
    grid-template-columns: minmax(300px, 1.2fr) minmax(0, 1.6fr);
    align-items: start;
  }

  .details-layout {
    grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.1fr);
    align-items: start;
  }

  .details-shell {
    padding: 24px;
  }
}

@media (min-width: 1180px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hero-card,
  .hero-content {
    min-height: 400px;
  }

  .hero-content {
    padding: 20px;
    gap: 14px;
  }

  .hero-title {
    font-size: clamp(1.8rem, 1rem + 3vw, 2.8rem);
  }

  .categories-grid {
    grid-auto-columns: minmax(160px, 0.85fr);
    gap: 10px;
    padding-bottom: 8px;
  }

  .category-card {
    aspect-ratio: 1 / 1.3;
    min-height: 140px;
    max-height: 240px;
    border-radius: 20px;
  }

  .category-topline {
    font-size: 0.68rem;
    padding: 5px 8px;
    min-height: 28px;
  }

  .category-title {
    font-size: 1rem;
    line-height: 1.2;
  }

  .category-desc {
    font-size: 0.8rem;
    line-height: 1.5;
    -webkit-line-clamp: 1;
  }

  .promo-slider,
  .promo-slide-content {
    min-height: 300px;
  }

  .promo-slide-content {
    padding: 20px;
    justify-content: flex-end;
    gap: 12px;
  }

  .promo-slide-overlay {
    background: linear-gradient(180deg,
        rgba(17, 14, 16, 0.2) 0%,
        rgba(17, 14, 16, 0.82) 100%);
  }

  .product-card {
    grid-template-columns: 1fr;
  }

  .product-image {
    aspect-ratio: 16 / 10;
  }

  .product-bottom,
  .menu-head,
  .details-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .product-actions {
    flex-direction: column;
  }

  .product-btn,
  .product-quick-btn,
  .details-actions .btn {
    width: 100%;
  }

  .quick-dialog {
    padding: 16px;
    border-radius: 24px;
  }

  .details-image-wrap img {
    aspect-ratio: 16 / 10;
  }

  .section {
    padding-block: 24px;
  }

  .section-title {
    font-size: clamp(1.4rem, 1rem + 1.5vw, 1.8rem);
  }

  .panel {
    padding: 16px;
  }

  .details-shell {
    padding: 16px;
  }
}

/* Final product details media sizing. */
@media (min-width: 700px) {
  .details-image-wrap img {
    width: 100%;
    height: 560px;
    aspect-ratio: auto;
    object-fit: cover;
  }
}

@media (max-width: 699px) {
  .details-topbar {
    position: sticky;
    top: calc(62px + env(safe-area-inset-top));
    z-index: 8;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin: -12px -12px 12px;
    padding: 10px 12px;
    background: color-mix(in srgb, var(--card) 94%, transparent);
    backdrop-filter: blur(12px);
  }

  .details-image-wrap img {
    width: 100%;
    height: min(54svh, 420px);
    aspect-ratio: auto;
    object-fit: cover;
  }

  .details-gallery {
    margin-top: 8px;
  }
}

/* Category discovery and product filtering */
.categories-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.categories-entry .section-title { margin-top: 8px; }
.categories-entry p { margin: 8px 0 0; color: var(--muted); }

.categories-open-btn,
.filters-reset-btn,
.category-all-btn {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  transition: border-color var(--trans), background var(--trans), color var(--trans), transform var(--trans);
}

.categories-open-btn {
  flex: 0 0 auto;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
}

.categories-open-btn b {
  padding-inline-start: 12px;
  border-inline-start: 1px solid rgba(255,255,255,.3);
  font-size: .76rem;
}

.categories-open-btn:hover { transform: translateY(-1px); }

.product-filter-grid {
  display: grid;
  grid-template-columns: minmax(190px, 1.25fr) repeat(2, minmax(140px, .75fr)) auto;
  align-items: end;
  gap: 12px;
  margin-top: 16px;
}

.product-filter-field { display: grid; gap: 7px; }
.product-filter-field > span { color: var(--muted); font-size: .78rem; font-weight: 800; }

.product-filter-field select,
.product-filter-field input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  outline: none;
}

.product-filter-field select:focus,
.product-filter-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.filters-reset-btn {
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 8px;
}

.filters-reset-btn:hover { border-color: var(--primary); color: var(--primary); }
.empty .filters-reset-btn { margin-top: 14px; }

.category-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 108;
  visibility: hidden;
  background: rgba(14, 12, 13, .52);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.category-panel-overlay.show { visibility: visible; opacity: 1; pointer-events: auto; }

.category-panel {
  position: fixed;
  inset-block: 0;
  inset-inline-end: 0;
  z-index: 109;
  width: min(480px, 94vw);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  overflow-y: auto;
  border-inline-start: 1px solid var(--line);
  background: var(--card);
  box-shadow: -24px 0 70px rgba(0,0,0,.2);
  visibility: hidden;
  pointer-events: none;
  transform: translateX(105%);
  transition: transform 260ms ease, visibility 260ms ease;
}

[dir="rtl"] .category-panel { transform: translateX(-105%); }
.category-panel.show { visibility: visible; pointer-events: auto; transform: translateX(0); }
.category-panel-open { overflow: hidden; }

.category-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.category-panel-head span { color: var(--muted); font-size: .8rem; font-weight: 750; }
.category-panel-head h2 { margin: 3px 0 0; font-size: 1.6rem; }

.category-all-btn {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
}

.category-all-btn b { color: var(--muted); font-size: .78rem; }
.category-all-btn.active { border-color: var(--primary); color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }

.category-panel-grid {
  grid-auto-flow: initial;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: visible;
  padding: 0;
}

.category-panel-grid .category-card {
  width: 100%;
  min-height: 205px;
  max-height: none;
  border-radius: 12px;
}

.category-panel-grid .category-card.active { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }

.category-products-count {
  width: max-content;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px;
  background: rgba(0,0,0,.3);
  font-size: .7rem;
  font-weight: 800;
}

@media (max-width: 900px) {
  .product-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .mobile-bottom-nav { grid-template-columns: repeat(4, 1fr); }

  #categoriesSection { padding-block: 12px; }

  .categories-entry {
    gap: 12px;
    padding: 14px;
    border-radius: 10px;
  }

  .categories-entry > div { min-width: 0; }
  .categories-entry .section-kicker,
  .categories-entry p { display: none; }
  .categories-entry .section-title { margin: 0; font-size: 1rem; }

  .categories-open-btn {
    min-height: 44px;
    padding: 9px 11px;
    font-size: .75rem;
  }

  .categories-open-btn b { display: none; }

  .product-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .product-filter-field:first-child,
  .filters-reset-btn { grid-column: 1 / -1; }

  .product-filter-field select,
  .product-filter-field input,
  .filters-reset-btn { min-height: 44px; }

  .category-panel {
    inset-block-start: auto;
    inset-inline: 0;
    bottom: 0;
    width: 100%;
    max-height: min(84svh, 760px);
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -20px 60px rgba(0,0,0,.22);
    transform: translateY(105%);
  }

  [dir="rtl"] .category-panel { transform: translateY(105%); }
  .category-panel.show { transform: translateY(0); }

  .category-panel-head h2 { font-size: 1.3rem; }
  .category-panel-grid { gap: 10px; }
  .category-panel-grid .category-card { min-height: 168px; }
  .category-panel-grid .category-desc { display: none; }
}

/* Cart and WhatsApp checkout */
.product-cart-btn,
.quick-cart-action {
  min-height: 44px;
  border: 1px solid color-mix(in srgb, var(--primary) 72%, transparent);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  background: var(--primary);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.product-cart-btn:hover,
.quick-cart-action:hover { filter: brightness(.92); }

.order-open { overflow: hidden; }

.cart-fab {
  position: fixed;
  inset-inline-end: 24px;
  bottom: 24px;
  z-index: 60;
  min-width: 220px;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent);
  border-radius: 12px;
  color: #fff;
  background: color-mix(in srgb, var(--primary) 92%, #111);
  box-shadow: 0 18px 48px color-mix(in srgb, var(--primary) 35%, transparent);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.cart-fab-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.13); }
.cart-fab-icon svg { width: 24px; height: 24px; }
.cart-fab > span:nth-child(2) { display: grid; flex: 1; }
.cart-fab small { color: rgba(255,255,255,.7); font-size: .72rem; }
.cart-fab strong { font-size: .9rem; }
.cart-fab > b { min-width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: var(--primary); background: #fff; }

.order-overlay { position: fixed; inset: 0; z-index: 100; visibility: hidden; opacity: 0; background: rgba(8,8,10,.58); backdrop-filter: blur(5px); transition: .25s ease; }
.order-overlay.show { visibility: visible; opacity: 1; }

.cart-drawer {
  position: fixed;
  inset-block: 0;
  inset-inline-end: 0;
  z-index: 110;
  width: min(440px, 100%);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 24px;
  color: var(--text);
  background: var(--card);
  box-shadow: -24px 0 70px rgba(0,0,0,.24);
  transform: translateX(105%);
  transition: transform .3s ease;
}

[dir="rtl"] .cart-drawer { transform: translateX(-105%); }
.cart-drawer.show { transform: translateX(0); }
.cart-drawer-head, .checkout-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.cart-drawer-head small, .checkout-head small { color: var(--muted); font-weight: 700; }
.cart-drawer-head h2, .checkout-head h2 { margin: 2px 0 0; font-size: 1.55rem; }
.order-close { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface); font-size: 1.7rem; cursor: pointer; }
.cart-items { min-height: 0; display: grid; align-content: start; gap: 12px; overflow-y: auto; padding: 18px 2px; }
.cart-item { display: grid; grid-template-columns: 74px 1fr; gap: 13px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.cart-item > img { width: 74px; height: 74px; border-radius: 8px; object-fit: cover; }
.cart-item-content { min-width: 0; display: grid; gap: 4px; }
.cart-item-content > strong { overflow-wrap: anywhere; }
.cart-item-content > small { color: var(--muted); }
.cart-item-bottom { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.quantity-control { display: grid; grid-template-columns: 32px 30px 32px; align-items: center; text-align: center; }
.quantity-control button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: var(--card); font-size: 1.15rem; cursor: pointer; }
.cart-empty { align-self: center; padding: 32px; text-align: center; }
.cart-empty > span { width: 60px; height: 60px; display: grid; place-items: center; margin: auto; border-radius: 50%; color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); font-size: 2rem; }
.cart-empty h3 { margin: 14px 0 5px; }
.cart-empty p { margin: 0; color: var(--muted); line-height: 1.8; }
.cart-summary { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.cart-summary > div, .checkout-totals > div { display: flex; justify-content: space-between; gap: 16px; }
.order-primary { width: 100%; min-height: 52px; border: 0; border-radius: 9px; padding: 12px 18px; color: #fff; background: var(--primary); font: inherit; font-weight: 850; cursor: pointer; }
.order-primary:disabled { opacity: .45; cursor: not-allowed; }

.checkout-modal { position: fixed; inset: 0; z-index: 120; visibility: hidden; display: grid; place-items: center; padding: 20px; opacity: 0; pointer-events: none; transition: .25s ease; }
.checkout-modal.show { visibility: visible; opacity: 1; pointer-events: auto; }
.checkout-dialog { width: min(720px, 100%); max-height: calc(100svh - 40px); overflow-y: auto; padding: 24px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: var(--card); box-shadow: 0 30px 90px rgba(0,0,0,.3); }
.checkout-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 20px; }
.checkout-form label { display: grid; gap: 7px; font-weight: 800; }
.checkout-form label small { color: var(--muted); font-weight: 500; }
.checkout-form input, .checkout-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 13px 14px; color: var(--text); background: var(--surface); font: inherit; outline: none; }
.checkout-form input:focus, .checkout-form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent); }
.checkout-form .phone-input { min-height: 48px; display: flex; align-items: stretch; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); transition: border-color var(--trans), box-shadow var(--trans); }
.checkout-form .phone-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent); }
.checkout-form .phone-input b { display: inline-flex; align-items: center; padding: 0 13px; border-inline-end: 1px solid var(--line); color: var(--text); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); font-size: .9rem; font-weight: 850; }
.checkout-form .phone-input input { min-width: 0; border: 0; border-radius: 0; direction: ltr; box-shadow: none; }
.checkout-form .phone-input input:focus { border: 0; box-shadow: none; }
.checkout-wide { grid-column: 1 / -1; }
.checkout-error { min-height: 24px; margin: 0; color: #c62828; font-weight: 750; }
.delivery-step { display: grid; gap: 16px; padding-top: 18px; }
.checkout-back { justify-self: start; border: 0; padding: 4px; color: var(--primary); background: transparent; font: inherit; font-weight: 800; cursor: pointer; }
.delivery-list { display: grid; gap: 10px; }
.delivery-option { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.delivery-option.selected { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 11%, transparent); }
.delivery-option input { position: absolute; opacity: 0; }
.delivery-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--primary); font-weight: 900; }
.delivery-copy { min-width: 0; display: grid; }
.delivery-copy small { color: var(--muted); line-height: 1.55; }
.delivery-option > b { white-space: nowrap; }
.checkout-totals { display: grid; gap: 9px; padding: 15px; border-radius: 10px; background: var(--surface); }
.checkout-final { padding-top: 10px; border-top: 1px solid var(--line); color: var(--primary); font-size: 1.08rem; }
.checkout-note { margin: 0; color: var(--muted); font-size: .85rem; text-align: center; }
.order-notice { position: fixed; top: 20px; left: 50%; z-index: 150; visibility: hidden; width: min(520px, calc(100% - 32px)); min-height: 76px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--card); box-shadow: 0 22px 60px rgba(0,0,0,.22); opacity: 0; pointer-events: none; transform: translate(-50%, -22px); transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s; }
.order-notice.show { visibility: visible; opacity: 1; pointer-events: auto; transform: translate(-50%, 0); transition-delay: 0s; }
.order-notice-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 1.15rem; font-weight: 900; }
.order-notice.success { border-color: color-mix(in srgb, #15803d 34%, var(--line)); }
.order-notice.success .order-notice-icon { background: #15803d; }
.order-notice.error { border-color: color-mix(in srgb, #b91c1c 34%, var(--line)); }
.order-notice.error .order-notice-icon { background: #b91c1c; }
.order-notice strong { display: block; margin-bottom: 3px; font-size: .95rem; }
.order-notice p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.order-notice button { width: 34px; height: 34px; border: 0; border-radius: 7px; color: var(--muted); background: var(--surface); font: inherit; font-size: 1.25rem; cursor: pointer; }
.mobile-bottom-nav { display: none; }

@media (max-width: 640px) {
  body { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .cart-fab { display: none; }
  .product-actions { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .product-cart-btn { grid-column: 1 / -1; }
  .product-cart-btn, .product-btn, .product-quick-btn { width: 100%; min-height: 40px; padding-inline: 7px; font-size: .72rem; }
  .cart-drawer { inset-block-start: auto; width: 100%; height: min(88svh, 760px); padding: 18px 14px calc(18px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; transform: translateY(105%) !important; }
  .cart-drawer.show { transform: translateY(0) !important; }
  .checkout-modal { align-items: end; padding: 0; }
  .checkout-dialog { max-height: 92svh; padding: 18px 14px calc(18px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; }
  .checkout-form { grid-template-columns: 1fr; gap: 13px; }
  .checkout-wide { grid-column: auto; }
  .delivery-option { grid-template-columns: auto 1fr; }
  .delivery-option > b { grid-column: 2; }
  .mobile-bottom-nav { position: fixed; inset-inline: 0; bottom: 0; z-index: 70; min-height: calc(66px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--card) 94%, transparent); box-shadow: 0 -10px 30px rgba(0,0,0,.1); backdrop-filter: blur(16px); }
  .mobile-bottom-nav a, .mobile-bottom-nav button { position: relative; display: grid; place-items: center; align-content: center; gap: 1px; border: 0; color: var(--muted); background: transparent; font: inherit; text-decoration: none; cursor: pointer; }
  .mobile-bottom-nav span { color: var(--primary); font-size: 1.25rem; font-weight: 900; line-height: 1; }
  .mobile-bottom-nav span svg { width: 22px; height: 22px; display: block; }
  .mobile-bottom-nav small { font-size: .68rem; font-weight: 800; }
  .mobile-bottom-nav b { position: absolute; top: 1px; inset-inline-start: calc(50% + 9px); min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; border-radius: 999px; color: #fff; background: var(--primary); font-size: .65rem; }
  .order-notice { top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); width: calc(100% - 24px); min-height: 70px; padding: 12px; transform: translate(-50%, 18px); }
  .order-notice.show { transform: translate(-50%, 0); }
  .order-notice-icon { width: 38px; height: 38px; }
}

/* Product quick view and details experience. */
.media-counter {
  position: absolute;
  inset-inline-end: 12px;
  top: 12px;
  z-index: 3;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.72);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 850;
  direction: ltr;
  backdrop-filter: blur(8px);
}

.quick-dialog {
  width: min(100%, 920px);
  border-radius: 18px;
}

.quick-media,
.details-image-wrap {
  position: relative;
}

.quick-media {
  border-radius: 14px;
}

.quick-gallery {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px;
  background: var(--card);
  scrollbar-width: none;
}

.quick-gallery::-webkit-scrollbar,
.details-reco-grid::-webkit-scrollbar {
  display: none;
}

.quick-gallery-thumb {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #f0e8e3;
}

.quick-gallery-thumb.active {
  border-color: var(--primary);
}

.quick-gallery-thumb img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.quick-facts .details-meta-card {
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.quick-facts .details-meta-card:nth-child(odd) {
  padding-inline-end: 10px;
}

.quick-facts .details-meta-card:nth-child(even) {
  padding-inline-start: 10px;
  border-inline-start: 1px solid var(--line);
}

.quick-facts .details-meta-label {
  margin-bottom: 2px;
  font-size: 0.68rem;
}

.quick-facts .details-meta-value {
  font-size: 0.82rem;
}

.quick-price-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.quick-actions .quick-action {
  width: 100%;
  min-height: 46px;
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.details-shell {
  border-radius: 18px;
}

.details-image-wrap {
  border-radius: 14px;
}

.details-gallery-thumb {
  border-radius: 8px;
}

.details-price-row {
  padding: 14px 0;
  border-block: 1px solid var(--line);
}

.details-meta-grid {
  gap: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.details-meta-grid .details-meta-card {
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.details-meta-grid .details-meta-card:nth-child(odd) {
  padding-inline-end: 12px;
}

.details-meta-grid .details-meta-card:nth-child(even) {
  padding-inline-start: 12px;
  border-inline-start: 1px solid var(--line);
}

.details-related-block {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.details-related-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.details-related-count {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.details-related-controls {
  display: flex;
  gap: 8px;
}

.slider-nav {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-size: 1.4rem;
  box-shadow: var(--shadow-sm);
}

.details-reco-grid {
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 30%);
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  padding: 2px 2px 10px;
  scrollbar-width: none;
}

.details-reco-card {
  min-width: 0;
  scroll-snap-align: start;
  border-radius: 14px;
}

.details-reco-media {
  border-radius: 10px;
}

.product-card.unavailable .product-btn,
.product-card.unavailable .product-quick-btn {
  pointer-events: auto;
}

@media (min-width: 700px) {
  .quick-layout {
    grid-template-columns: minmax(320px, 1.05fr) minmax(0, 0.95fr);
    gap: 24px;
  }

  .quick-content {
    align-content: center;
    padding: 8px 8px 8px 0;
  }
}

@media (max-width: 699px) {
  .quick-view {
    align-items: end;
  }

  .quick-dialog {
    max-height: 92svh;
    border-radius: 20px 20px 0 0;
  }

  .quick-media img {
    aspect-ratio: 4 / 3;
  }

  .details-related-controls {
    display: none;
  }

  .details-reco-grid {
    grid-auto-columns: minmax(210px, 78vw);
    margin-inline: -12px;
    padding-inline: 12px;
  }
}

/* Product card information hierarchy. */
.product-copy {
  display: grid;
  gap: 5px;
}

.product-badges {
  align-items: center;
}

.meta-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: visible;
}

.product-fact {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.product-fact:nth-child(odd) {
  padding-inline-end: 10px;
}

.product-fact:nth-child(even) {
  padding-inline-start: 10px;
  border-inline-start: 1px solid var(--line);
}

.product-fact-label,
.price-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.product-fact strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.35;
}

.price-stack {
  display: grid;
  gap: 2px;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}

.product-bottom {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.product-card,
.product-body,
.product-copy,
.product-title,
.product-desc {
  min-width: 0;
  max-width: 100%;
}

.product-title,
.product-desc {
  overflow-wrap: anywhere;
}

@media (min-width: 641px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-card {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
    min-height: 300px;
    padding: 16px;
    border-radius: 16px;
  }

  .product-image {
    height: 100%;
    min-height: 268px;
    aspect-ratio: auto;
    border-radius: 12px;
  }

  .product-body {
    gap: 10px;
  }

  .product-bottom {
    margin-top: auto;
  }
}

@media (max-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
  }

  .product-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
  }

  .product-image {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 1;
    border-radius: 0;
    box-shadow: none;
  }

  .product-body {
    gap: 10px;
    padding: 14px;
  }

  .product-badges {
    gap: 5px;
  }

  .badge {
    min-height: 26px;
    padding: 4px 8px;
    font-size: 0.68rem;
  }

  .product-title {
    font-size: 1.08rem;
    line-height: 1.4;
  }

  .product-desc {
    display: block;
    overflow: visible;
    font-size: 0.84rem;
    line-height: 1.65;
  }

  .meta-row {
    max-height: none;
    overflow: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-fact {
    padding-block: 7px;
  }

  .product-bottom {
    align-items: center;
    gap: 12px;
    padding-top: 12px;
  }

  .product-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: 1;
  }

  .product-quick-btn {
    display: inline-flex;
  }

  .product-btn,
  .product-quick-btn {
    width: 100%;
    min-height: 40px;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.76rem;
  }
}

/* Mobile-first public menu refinements for WebView and small screens. */
.product-image {
  position: relative;
}

.product-image-count {
  position: absolute;
  inset-inline-end: 8px;
  bottom: 8px;
  z-index: 2;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(17, 17, 17, 0.78);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 132px;
  }

  body {
    padding-bottom: env(safe-area-inset-bottom);
    overflow-x: hidden;
  }

  .container {
    width: calc(100% - 24px);
    max-width: var(--container);
  }

  .topbar {
    padding-top: env(safe-area-inset-top);
  }

  .topbar-inner {
    min-height: 62px;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .brand-name {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
  }

  .brand-sub {
    font-size: 0.7rem;
  }

  .topbar-actions {
    gap: 6px;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
  }

  .top-btn {
    min-height: 40px;
    padding-inline: 12px;
  }

  .hero.section {
    padding-top: 12px;
  }

  .hero-card,
  .hero-content {
    min-height: min(62svh, 520px);
  }

  .hero-card {
    border-radius: 18px;
  }

  .hero-content {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 18px;
    justify-content: flex-end;
  }

  .hero-badge,
  .hero-title,
  .hero-text,
  .brand-name,
  .brand-sub {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .hero-title {
    font-size: 1.85rem;
    line-height: 1.15;
  }

  .hero-text {
    max-width: 34ch;
    font-size: 0.9rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-tags {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .hero-actions .btn {
    min-height: 44px;
    flex: 1;
  }

  #offersSection .container {
    width: 100%;
    padding-inline-start: 12px;
  }

  .promo-slider {
    min-height: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .promo-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(244px, 78vw);
    gap: 12px;
    min-height: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
    padding-inline-end: 12px;
    padding-bottom: 4px;
  }

  .promo-track::-webkit-scrollbar,
  .hero-tags::-webkit-scrollbar,
  .categories-grid::-webkit-scrollbar,
  .tabs::-webkit-scrollbar {
    display: none;
  }

  .promo-slide,
  .promo-slide.active {
    position: relative;
    inset: auto;
    min-height: 230px;
    overflow: hidden;
    border-radius: 16px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    scroll-snap-align: start;
    box-shadow: var(--shadow-md);
  }

  .promo-slide-content {
    min-height: 230px;
    padding: 16px;
    gap: 8px;
  }

  .promo-title {
    font-size: 1.25rem;
  }

  .promo-text {
    font-size: 0.82rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .promo-bottom {
    display: none;
  }

  .section {
    padding-block: 18px;
  }

  .section-head {
    margin-bottom: 12px;
  }

  .section-kicker {
    min-height: 26px;
    padding: 4px 9px;
    font-size: 0.68rem;
  }

  .section-title {
    font-size: 1.35rem;
  }

  .categories-grid {
    grid-auto-columns: minmax(142px, 44vw);
    gap: 10px;
  }

  .category-card {
    min-height: 168px;
    max-height: 190px;
    border-radius: 14px;
  }

  .category-card-body {
    padding: 12px;
  }

  .panel {
    padding: 12px;
    border-radius: 16px;
  }

  #searchSection .section-head {
    display: none;
  }

  .search-input {
    min-height: 48px;
    border-radius: 12px;
  }

  .sticky-tabs-wrap {
    top: calc(62px + env(safe-area-inset-top));
  }

  .sticky-tabs-wrap .container {
    width: 100%;
  }

  .sticky-tabs-wrap .panel {
    border-radius: 0;
    border-inline: 0;
    padding: 8px 12px !important;
  }

  .tab {
    min-height: 40px;
    padding: 8px 14px;
  }

  .menu-section {
    gap: 12px;
  }

  .menu-head h3 {
    font-size: 1.2rem;
  }

  .menu-head p {
    font-size: 0.82rem;
    line-height: 1.55;
  }

  .products-grid {
    gap: 10px;
  }

  .product-card {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 11px;
    min-height: 150px;
    padding: 10px;
    border-radius: 14px;
  }

  .product-image {
    height: 100%;
    min-height: 130px;
    aspect-ratio: auto;
    border-radius: 10px;
  }

  .product-body {
    gap: 6px;
  }

  .product-title {
    font-size: 0.98rem;
  }

  .product-desc {
    font-size: 0.78rem;
    line-height: 1.45;
    -webkit-line-clamp: 2;
  }

  .product-badges {
    gap: 4px;
  }

  .badge,
  .meta-pill {
    min-height: 24px;
    padding: 3px 7px;
    font-size: 0.66rem;
  }

  .meta-row {
    max-height: 28px;
    overflow: hidden;
    flex-wrap: nowrap;
  }

  .product-bottom {
    flex-direction: row;
    align-items: center;
    margin-top: auto;
  }

  .price-current {
    font-size: 1rem;
  }

  .price-old {
    font-size: 0.72rem;
  }

  .product-actions {
    flex-direction: row;
  }

  .product-quick-btn {
    display: none;
  }

  .product-btn {
    width: auto;
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 9px;
    font-size: 0.75rem;
  }

  .quick-view {
    align-items: flex-end;
    padding: 0;
  }

  .quick-dialog {
    width: 100%;
    max-height: 90svh;
    overflow-y: auto;
    border-radius: 20px 20px 0 0;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }

  .details-shell {
    padding: 12px;
    border-radius: 16px;
  }

  .details-image-wrap,
  .details-image-wrap img {
    border-radius: 12px;
  }

  .details-image-wrap img {
    aspect-ratio: 4 / 3;
  }

  .details-gallery {
    margin-inline: -12px;
    padding-inline: 12px;
    scroll-snap-type: inline mandatory;
  }

  .details-gallery-thumb {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
    scroll-snap-align: start;
  }

  .details-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .details-reco-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 78vw);
    overflow-x: auto;
    scroll-snap-type: inline mandatory;
  }

  .details-reco-card {
    scroll-snap-align: start;
  }

  .footer {
    margin-top: 20px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .footer-card {
    padding: 18px;
    border-radius: 16px;
  }
}

/* Final product-card responsive layout. */
@media (min-width: 641px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-card {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
    min-height: 300px;
    padding: 16px;
    border-radius: 16px;
  }

  .product-image {
    height: 100%;
    min-height: 268px;
    aspect-ratio: auto;
    border-radius: 12px;
  }

  .product-bottom {
    margin-top: auto;
  }
}

@media (max-width: 640px) {
  .product-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
  }

  .product-image {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 10;
    border-radius: 0;
    box-shadow: none;
  }

  .product-body {
    gap: 8px;
    padding: 10px;
  }

  .product-badges {
    gap: 4px;
  }

  .badge {
    min-height: 22px;
    padding: 3px 6px;
    font-size: 0.58rem;
  }

  .product-title {
    font-size: 0.92rem;
    line-height: 1.4;
  }

  .product-desc {
    display: block;
    overflow: visible;
    font-size: 0.72rem;
    line-height: 1.55;
  }

  .meta-row {
    display: grid;
    max-height: none;
    overflow: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-fact {
    padding-block: 6px;
  }

  .product-fact:nth-child(odd) {
    padding-inline-end: 6px;
  }

  .product-fact:nth-child(even) {
    padding-inline-start: 6px;
  }

  .product-fact-label,
  .price-label {
    font-size: 0.58rem;
  }

  .product-fact strong {
    font-size: 0.66rem;
  }

  .product-bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: auto;
    padding-top: 9px;
  }

  .price-current {
    font-size: 0.92rem;
  }

  .price-old {
    font-size: 0.66rem;
  }

  .product-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: 1;
  }

  .product-quick-btn {
    display: inline-flex;
  }

  .product-btn,
  .product-quick-btn {
    width: 100%;
    min-height: 36px;
    justify-content: center;
    padding: 7px 5px;
    border-radius: 8px;
    font-size: 0.66rem;
  }
}

/* Final product details and related-products slider. */
.details-reco-grid {
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 36px) / 4);
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scroll-padding-inline: 2px;
  padding: 2px 2px 10px;
  scrollbar-width: none;
}

.details-reco-card {
  min-width: 0;
  align-content: start;
  scroll-snap-align: start;
}

.details-reco-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.details-reco-title {
  display: block;
  overflow: visible;
  color: var(--text);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.details-reco-bottom {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

@media (min-width: 700px) and (max-width: 1199px) {
  .details-reco-grid {
    grid-auto-columns: calc((100% - 24px) / 3);
  }
}

@media (min-width: 700px) {
  .details-image-wrap img {
    width: 100%;
    height: 560px;
    aspect-ratio: auto;
    object-fit: cover;
  }
}

@media (max-width: 699px) {
  .details-topbar {
    position: sticky;
    top: calc(62px + env(safe-area-inset-top));
    z-index: 8;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin: -12px -12px 12px;
    padding: 10px 12px;
    background: color-mix(in srgb, var(--card) 94%, transparent);
    backdrop-filter: blur(12px);
  }

  .details-image-wrap img {
    width: 100%;
    height: min(54svh, 420px);
    aspect-ratio: auto;
    object-fit: cover;
  }

  .details-reco-grid {
    grid-auto-columns: minmax(220px, 78vw);
    margin-inline: -12px;
    padding-inline: 12px;
  }
}

/* Keep these responsive rules last so legacy menu refinements cannot override them. */
@media (max-width: 640px) {
  body { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .mobile-bottom-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .category-panel {
    inset-block-start: auto;
    inset-inline: 0;
    bottom: 0;
    width: 100%;
    max-height: min(84svh, 760px);
    transform: translateY(105%);
  }

  [dir="rtl"] .category-panel { transform: translateY(105%); }
  .category-panel.show { transform: translateY(0); }

  .category-panel-grid {
    grid-auto-flow: initial;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-columns: auto;
    overflow: visible;
    margin: 0;
    padding: 0;
  }
}
