/* =====================================================
   QR MENU — Set Al-Sham Restaurant
   Covers: Categories page + Products page
===================================================== */

/* ── Variables ──────────────────────────────────────── */
:root {
  --bg:         #0c0b09;
  --surface:    #111009;
  --card:       #1b1915;
  --card-hi:    #232018;
  --accent:     #cda45e;
  --accent-lt:  #d8b87a;
  --accent-dim: rgba(205,164,94,0.12);
  --text:       #f0ede8;
  --muted:      rgba(240,237,232,0.55);
  --faint:      rgba(240,237,232,0.18);
  --border:     rgba(205,164,94,0.15);
  --border-hi:  rgba(205,164,94,0.5);
  --shadow:     0 8px 32px rgba(0,0,0,0.55);
  --r:          14px;
  --r-sm:       8px;
  --r-pill:     50px;
  --nav-h:      66px;
  --ease:       0.22s ease;
  --font:       'ElMessiri', system-ui, sans-serif;
}

/* ── Fonts ──────────────────────────────────────────── */
@font-face { font-family:'ElMessiri'; src:url('../font/ElMessiri-Regular.ttf')  format('truetype'); font-weight:400; font-display:swap; }
@font-face { font-family:'ElMessiri'; src:url('../font/ElMessiri-Medium.ttf')   format('truetype'); font-weight:500; font-display:swap; }
@font-face { font-family:'ElMessiri'; src:url('../font/ElMessiri-SemiBold.ttf') format('truetype'); font-weight:600; font-display:swap; }
@font-face { font-family:'ElMessiri'; src:url('../font/ElMessiri-Bold.ttf')     format('truetype'); font-weight:700; font-display:swap; }

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display:block; max-width:100%; }
a   { text-decoration:none; color:inherit; }
button { font-family:inherit; cursor:pointer; border:none; background:none; -webkit-tap-highlight-color:transparent; }

/* =====================================================
   NAVBAR — Centered logo, hours right, back left
===================================================== */
#qr-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(12,11,9,0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--ease);
}

#qr-nav.scrolled { box-shadow: 0 2px 24px rgba(0,0,0,0.75); }

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

/* Left slot */
.nav-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.nav-back {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  transition: all var(--ease);
}

.nav-back:hover { background: var(--accent-dim); border-color: var(--border-hi); }
.nav-back i { font-size: 1rem; }
.nav-back span { display: none; }

/* Center logo */
.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo img {
  height: 58px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.4));
  transition: transform var(--ease);
}

.nav-logo:hover img { transform: scale(1.04); }

/* Right slot */
.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.nav-hours {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}

.nav-hours i { font-size: 0.92rem; }

/* =====================================================
   HERO SLIDER  — card style, centered with side padding
===================================================== */
#qr-hero {
  width: 100%;
  background: transparent;
  padding: 16px 14px 4px;
}

/* Outer wrapper constrains width + gives the card shape */
.hero-card {
  max-width: 860px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 4px 16px rgba(0,0,0,0.55),
    0 0 0 1px var(--border);
  background: var(--surface);
}

#hero-swiper {
  width: 100%;
  height: 52vw;
  min-height: 160px;
  max-height: 380px;
}

#hero-swiper .swiper-slide { position:relative; overflow:hidden; }

#hero-swiper .swiper-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(12,11,9,0.05) 30%, rgba(12,11,9,0.68) 100%);
  z-index: 1;
}

.hero-text {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  padding: 12px 18px 18px;
  text-align: center;
}

.hero-text h2 {
  font-size: clamp(0.95rem, 4vw, 1.8rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  margin-bottom: 3px;
}

.hero-text p {
  font-size: clamp(0.68rem, 2.2vw, 0.88rem);
  color: rgba(255,255,255,0.8);
}

#hero-swiper .swiper-pagination-bullet { background:rgba(255,255,255,0.4); opacity:1; transition:transform 0.2s, background 0.2s; }
#hero-swiper .swiper-pagination-bullet-active { background:var(--accent); transform:scale(1.3); }

#hero-swiper .swiper-button-prev,
#hero-swiper .swiper-button-next {
  color: var(--accent);
  background: rgba(12,11,9,0.55);
  width: 32px; height: 32px;
  border-radius: 50%;
}

#hero-swiper .swiper-button-prev::after,
#hero-swiper .swiper-button-next::after { font-size:11px; font-weight:800; }

/* =====================================================
   MAIN WRAPPER
===================================================== */
#qr-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px 72px;
}

/* ── Section heading ── */
.section-head {
  text-align: center;
  padding: 28px 0 20px;
}

.section-head h2 {
  font-size: clamp(1.3rem, 4.5vw, 2rem);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 5px;
}

.section-head p { font-size: 0.82rem; color: var(--muted); }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--muted);
}

.empty-state i { font-size: 2.8rem; color: var(--faint); display:block; margin-bottom:12px; }
.empty-state p  { font-size: 0.9rem; }

/* =====================================================
   CATEGORIES GRID
===================================================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding-bottom: 16px;
}

/* ── Category card ── */
.cat-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.cat-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.cat-card:active { transform: translateY(0); }

/* Thumb */
.cat-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface);
  position: relative;
}

.cat-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cat-card:hover .cat-card-img img { transform: scale(1.07); }

.cat-no-img {
  width: 100%;
  height: 100%;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-no-img::after {
  content: '🍽️';
  font-size: 2.2rem;
  opacity: 0.45;
}

/* Info */
.cat-card-info {
  padding: 10px 12px 13px;
}

.cat-card-name {
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-card-name-ar {
  font-size: 0.74rem;
  color: var(--muted);
  direction: rtl;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Description — desktop only */
.cat-card-desc {
  display: none;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Footer row (count + arrow) */
.cat-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
}

.cat-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 2px 8px;
  line-height: 1.6;
}

.cat-count i { font-size: 0.65rem; }

.cat-arrow {
  color: var(--faint);
  font-size: 0.8rem;
  transition: color var(--ease), transform var(--ease);
}

.cat-card:hover .cat-arrow { color: var(--accent); transform: translateX(2px); }

/* =====================================================
   CATEGORY PAGE — HERO BANNER
===================================================== */
#cat-hero {
  position: relative;
  width: 100%;
  height: 38vw;
  min-height: 160px;
  max-height: 320px;
  overflow: hidden;
  background: var(--surface);
}

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

.cat-hero-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1814 0%, #0c0b09 100%);
}

.cat-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(12,11,9,0.25) 0%, rgba(12,11,9,0.72) 100%);
  z-index: 1;
}

.cat-hero-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  padding: 14px 20px 20px;
  text-align: center;
}

.cat-hero-content h1 {
  font-size: clamp(1.3rem, 5vw, 2.2rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  margin-bottom: 3px;
}

.cat-hero-ar {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.75);
  direction: rtl;
}

/* =====================================================
   FILTER BAR (sticky below nav on products page)
===================================================== */
#qr-filter {
  position: sticky;
  top: var(--nav-h);
  z-index: 50;
  background: var(--bg);
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.filter-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-wrap { position: relative; }

.search-wrap i {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}

#qr-search {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 10px 16px 10px 42px;
  transition: border-color var(--ease), background var(--ease);
}

#qr-search::placeholder { color: var(--faint); }
#qr-search:focus { outline:none; border-color:var(--accent); background:var(--card-hi); }

.price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.price-label { font-size: 0.8rem; color: var(--muted); font-weight: 600; }

/* ── Dual range slider ── */
.price-slider-wrap {
  flex: 1;
  min-width: 120px;
}

.pv-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.pv-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pv-range-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-lt);
}

.dual-range-wrap {
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
}

.dual-range-track {
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  background: var(--faint);
  border-radius: 2px;
  pointer-events: none;
}

.dual-range-fill {
  position: absolute;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

.dual-range-wrap input[type="range"] {
  position: absolute;
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  margin: 0;
  padding: 0;
}

.dual-range-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dual-range-wrap input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 5px rgba(205,164,94,0.22);
}

.dual-range-wrap input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
  cursor: pointer;
  pointer-events: auto;
}

#price-min { z-index: 4; }
#price-max { z-index: 5; }

.price-inputs { display:flex; gap:6px; flex:1; min-width:0; }

.price-inputs input[type="number"] {
  flex: 1; min-width: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.82rem;
  padding: 8px 10px;
  transition: border-color var(--ease);
}

.price-inputs input[type="number"]::-webkit-inner-spin-button { opacity:0.3; }
.price-inputs input[type="number"]:focus { outline:none; border-color:var(--accent); }

.btn-clear {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--muted);
  display: flex; align-items:center; justify-content:center;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: all var(--ease);
}

.btn-clear:hover { color:var(--accent); border-color:var(--border-hi); }

/* Results */
.results-bar {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 12px 0 8px 2px;
}

.results-bar span { color: var(--accent); font-weight: 600; }

/* =====================================================
   PRODUCTS GRID
===================================================== */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.product-card {
  display: flex;
  align-items: stretch;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
  -webkit-tap-highlight-color: transparent;
  text-align: left;
  width: 100%;
}

.product-card:hover { border-color:var(--border-hi); transform:translateY(-2px); box-shadow:var(--shadow); }
.product-card:active { transform:translateY(0); }

.product-card.hidden { display: none; }

.pc-thumb {
  width: 96px; min-width: 96px; height: 96px;
  overflow: hidden; flex-shrink: 0;
  background: var(--surface);
  position: relative;
}

.pc-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .pc-thumb img { transform: scale(1.08); }

.pc-thumb.no-img {
  background: var(--accent-dim);
  display: flex; align-items:center; justify-content:center;
}

.pc-thumb.no-img img {
  position: static;
  width: 36px; height: 36px;
  object-fit: contain;
  opacity: 0.3;
  transform: none !important;
}

.pc-body {
  flex: 1;
  padding: 11px 12px;
  display: flex; flex-direction:column; justify-content:center;
  gap: 3px; min-width: 0;
}

.pc-name    { font-size:0.92rem; font-weight:600; color:var(--text); line-height:1.3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pc-name-ar { font-size:0.74rem; color:var(--muted); direction:rtl; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pc-desc    { font-size:0.74rem; color:var(--muted); line-height:1.45; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin-top:2px; }

.pc-foot { display:flex; align-items:center; gap:6px; margin-top:6px; }
.pc-price { font-size:0.88rem; font-weight:700; color:var(--accent); }

.pc-chevron {
  display:flex; align-items:center; justify-content:center;
  width:26px; min-width:26px; align-self:center;
  margin-right:8px; color:var(--faint); font-size:0.9rem;
  transition:color var(--ease);
}

.product-card:hover .pc-chevron { color:var(--accent); }

/* =====================================================
   PRODUCT MODAL
===================================================== */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow-y: auto;
  padding: 20px 12px;
  align-items: flex-start;
  justify-content: center;
}

.modal-backdrop.open { display:flex; animation:mb-in 0.2s ease; }

@keyframes mb-in { from{opacity:0} to{opacity:1} }

.modal-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  width: 100%; max-width: 500px;
  margin: auto; overflow: hidden;
  position: relative;
  animation: mb-up 0.25s ease;
}

@keyframes mb-up { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }

.modal-close {
  position: absolute; top:10px; right:10px; z-index:10;
  width:30px; height:30px; border-radius:50%;
  background:rgba(12,11,9,0.75);
  border:1px solid rgba(255,255,255,0.1);
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:0.82rem;
  transition:background var(--ease);
}

.modal-close:hover { background:rgba(205,164,94,0.3); }

.modal-gallery {
  width:100%; height:240px;
  overflow:hidden; background:var(--surface);
  position:relative;
}

.modal-gallery.no-img { display:flex; align-items:center; justify-content:center; }

.modal-gallery.no-img img { width:72px; height:72px; object-fit:contain; opacity:0.25; }

.modal-gallery .swiper,
.modal-gallery .swiper-wrapper,
.modal-gallery .swiper-slide { width:100%; height:100%; }

.modal-gallery .swiper-slide img { width:100%; height:100%; object-fit:cover; }
.modal-gallery .swiper-pagination-bullet-active { background:var(--accent); }
.modal-gallery .swiper-button-prev,
.modal-gallery .swiper-button-next { color:var(--accent); }
.modal-gallery .swiper-button-prev::after,
.modal-gallery .swiper-button-next::after { font-size:13px; font-weight:800; }

.modal-body { padding:16px 18px 24px; }

.modal-name    { font-size:1.2rem; font-weight:700; color:var(--text); line-height:1.3; margin-bottom:3px; }
.modal-name-ar { font-size:0.85rem; color:var(--muted); direction:rtl; margin-bottom:12px; }
.modal-divider { height:1px; background:var(--border); margin-bottom:12px; }
.modal-desc    { font-size:0.85rem; color:var(--muted); line-height:1.65; margin-bottom:14px; }
.modal-price   { font-size:1.35rem; font-weight:700; color:var(--accent); }

/* =====================================================
   FOOTER
===================================================== */
#qr-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 36px 20px 24px;
  text-align: center;
}

.footer-logo img { height:62px; margin:0 auto 16px; opacity:0.9; }

.footer-name {
  font-size: 1rem; font-weight:700;
  color: var(--accent); margin-bottom:8px;
  letter-spacing: 0.5px;
}

.footer-address { font-size:0.8rem; color:var(--muted); line-height:1.75; max-width:360px; margin:0 auto 16px; }

.footer-contacts { display:flex; flex-direction:column; align-items:center; gap:7px; margin-bottom:18px; }

.footer-contacts a { display:flex; align-items:center; gap:7px; font-size:0.82rem; color:var(--muted); transition:color var(--ease); }
.footer-contacts a i { color:var(--accent); font-size:1rem; }
.footer-contacts a:hover { color:var(--accent); }

.footer-socials { display:flex; justify-content:center; gap:10px; margin-bottom:20px; }

.footer-socials a {
  width:36px; height:36px; border-radius:50%;
  border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  color:var(--muted); font-size:1.05rem;
  transition:all var(--ease);
}

.footer-socials a:hover { border-color:var(--accent); color:var(--accent); background:var(--accent-dim); }

.footer-copy { font-size:0.72rem; color:var(--faint); }

/* =====================================================
   BACK TO TOP
===================================================== */
.back-to-top {
  position:fixed; bottom:20px; right:16px;
  width:38px; height:38px; border-radius:50%;
  background:var(--accent); color:#0c0b09;
  display:flex; align-items:center; justify-content:center;
  font-size:1.1rem; z-index:90;
  opacity:0; pointer-events:none;
  transform:translateY(10px);
  transition:opacity var(--ease), transform var(--ease);
  cursor:pointer; border:none;
}

.back-to-top.visible { opacity:1; pointer-events:auto; transform:translateY(0); }

/* =====================================================
   TABLET  ≥ 580px
===================================================== */
@media (min-width: 580px) {
  .nav-back span { display: inline; }

  .categories-grid { grid-template-columns: repeat(3, 1fr); }

  .cat-card-img { aspect-ratio: 4 / 3; }

  .cat-card-desc { display: -webkit-box; }

  .products-grid { grid-template-columns: repeat(2, 1fr); }

  .filter-inner { flex-direction:row; align-items:center; flex-wrap:wrap; }
  .search-wrap  { flex:1; min-width:180px; }
  .price-row    { min-width:210px; }

  .modal-gallery { height:280px; }

  #cat-hero { height:30vw; }

  /* Slider card: taller on tablet */
  #qr-hero { padding: 20px 20px 6px; }
  #hero-swiper { height: 42vw; max-height: 340px; }
}

/* =====================================================
   DESKTOP  ≥ 900px
===================================================== */
@media (min-width: 900px) {
  :root { --nav-h: 72px; }

  .nav-logo img { height: 64px; }

  #qr-main { padding: 0 24px 80px; }

  .filter-inner { padding: 0 24px; }

  .categories-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }

  .products-grid { grid-template-columns: repeat(3, 1fr); }

  .pc-thumb { width:108px; min-width:108px; height:108px; }

  /* Slider card: fixed comfortable height on desktop, generous padding */
  #qr-hero { padding: 24px 32px 8px; }
  #hero-swiper { height: 36vw; max-height: 400px; }
  .hero-card { border-radius: 22px; }

  #cat-hero { height:28vw; min-height:200px; max-height:340px; }

  .modal-gallery { height:320px; }
}

@media (min-width: 1200px) {
  .products-grid { grid-template-columns: repeat(4, 1fr); }
}

/* =====================================================
   CATEGORY SEARCH BAR
===================================================== */
#cat-search-section {
  padding: 4px 0 20px;
}

.cat-search-box {
  position: relative;
  max-width: 520px;
  margin: 0 auto 10px;
}

.cat-search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}

#cat-search {
  width: 100%;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 12px 44px 12px 44px;
  transition: border-color var(--ease), background var(--ease), box-shadow var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

#cat-search::placeholder { color: var(--faint); }

#cat-search:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--card-hi);
  box-shadow: 0 0 0 3px rgba(205,164,94,0.12);
}

/* Clear (×) button inside search */
.cat-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-size: 0.72rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease), color var(--ease), background var(--ease);
}

.cat-search-clear.visible {
  opacity: 1;
  pointer-events: auto;
}

.cat-search-clear:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

/* Results bar */
.cats-result-bar {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  height: 1.4em; /* reserve space to prevent layout shift */
}

.cats-result-bar #cats-count {
  color: var(--accent);
  font-weight: 700;
}

/* "Clear search" button inside empty state */
.btn-reset-search {
  margin-top: 14px;
  padding: 8px 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--accent-dim);
  cursor: pointer;
  transition: all var(--ease);
}

.btn-reset-search:hover { border-color: var(--border-hi); background: rgba(205,164,94,0.2); }

/* ── Cat card: hidden state + appear animation ── */
.cat-card.hidden { display: none; }

@keyframes cat-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

.cat-card {
  animation: cat-in 0.22s ease both;
}

/* ── Responsive tweaks ── */
@media (min-width: 580px) {
  .cat-search-box { max-width: 480px; }
  #cat-search { font-size: 1rem; padding: 13px 48px 13px 48px; }
}

@media (min-width: 900px) {
  #cat-search-section { padding: 6px 0 24px; }
}

/* ── Language switch button ── */
.lang-switch {
  margin-left: 8px;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-hi);
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
  white-space: nowrap;
  cursor: pointer;
}

.lang-btn:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* RTL adjustments */
[dir="rtl"] .nav-back i { transform: scaleX(-1); }
[dir="rtl"] .lang-switch { margin-left: 0; margin-right: 8px; }
[dir="rtl"] .pc-chevron i { transform: scaleX(-1); }

/* =====================================================
   CATEGORY QUICK NAV — name pills above search
===================================================== */
#cat-quicknav {
  display: flex;
  gap: 8px;
  padding: 0 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
}

#cat-quicknav::-webkit-scrollbar { display: none; }

.cat-pill {
  flex-shrink: 0;
  padding: 7px 18px;
  border-radius: var(--r-pill);
  background: var(--card);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.cat-pill:hover,
.cat-pill:active {
  border-color: var(--border-hi);
  background: var(--accent-dim);
  color: var(--accent);
}

