/* Matgary storefront layout (logical properties only) */
/* Global: navigation links & buttons are never underlined (any state) */
a, button, .btn, .nav-btn, .back-btn, .hero-cta { text-decoration: none !important; }
a:hover, a:focus, a:active, a:focus-visible,
button:hover, button:focus, button:active, button:focus-visible,
.btn:hover, .btn:focus, .btn:active, .btn:focus-visible,
.nav-btn:hover, .nav-btn:focus, .nav-btn:active, .nav-btn:focus-visible,
.back-btn:hover, .back-btn:focus, .back-btn:active, .back-btn:focus-visible,
.hero-cta:hover, .hero-cta:focus, .hero-cta:active, .hero-cta:focus-visible { text-decoration: none !important; }
/* ── Premium Petrol Blue topbar (storefront header) ─────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: #0f4c5c !important;
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(15, 76, 92, 0.18);
  border-block-end: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: 10px;
  overflow: visible;
}
.topbar-inner { max-width: 1200px; margin-inline: auto; padding-inline: 20px; padding-block: 10px; display: flex; align-items: center; gap: 12px; }
/* Brand: white wordmark + Ember Orange icon accent */
.logo { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.01em; color: #ffffff !important; display: flex; align-items: center; gap: 8px; }
.topbar .logo-icon { color: #e36414; }
.logo-icon { width: 22px; height: 22px; color: #e36414; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
/* Search: frosted-glass pill over petrol */
.header-search { flex: 1; max-width: 460px; margin-inline: auto; position: relative; }
.header-search input,
.topbar input { width: 100%; background: rgba(255, 255, 255, 0.12); color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 999px; padding-inline: 40px 14px; padding-block: 9px; }
.header-search input::placeholder,
.topbar input::placeholder { color: rgba(255, 255, 255, 0.65); }
.header-search input:focus,
.topbar input:focus { outline: none; border-color: #e36414; background: rgba(255, 255, 255, 0.2); box-shadow: none; }
.header-search .search-icon { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: rgba(255, 255, 255, 0.7); stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
/* Language switcher: single circular toggle (label shows the language you switch TO) */
#langToggleBtn {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 700; font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  margin-inline-start: auto; flex: none; padding: 0;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
#langToggleBtn:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.34); }
#langToggleBtn:active { transform: scale(0.95); }
#langToggleBtn:focus-visible { outline: 2px solid #e36414; outline-offset: 2px; }
/* Mobile-only search icon button (desktop keeps the inline search field) */
.mobile-search-btn {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.12); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2); cursor: pointer;
  flex: none; padding: 0;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.mobile-search-btn:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.34); }
.mobile-search-btn .icon { width: 18px; height: 18px; color: inherit; }
/* Search autocomplete dropdown (floating under the header search field) */
.sug-list {
  position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 60;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  padding: 6px; display: none; max-height: 360px; overflow: auto;
}
.sug-list.open { display: block; }
.sug-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px; border: 0; border-radius: 10px; background: transparent;
  cursor: pointer; text-align: start;
}
.sug-item:hover, .sug-item:focus-visible { background: #f1f5f9; outline: none; }
.sug-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; }
.sug-info { display: grid; gap: 2px; min-width: 0; }
.sug-title { font-weight: 600; font-size: 0.9rem; color: #1a202c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug-price { font-weight: 800; font-size: 0.84rem; color: var(--color-primary, #0f4c5c); }
/* Sub-page back pill — keep the topbar chrome consistent */
.topbar .back-btn { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.2); color: #ffffff; }
.topbar .back-btn:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.32); color: #ffffff; }
/* Account button in topbar (matches .cart-btn translucent aesthetic) */
.account-btn, .topbar .account-btn, #userAccountBtn, #authBtn {
  position: relative;
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 12px;
  box-shadow: none;
  padding: 0 !important;
  width: 38px;
  height: 38px;
  min-height: 38px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-weight: 700;
  font-size: 0.84rem;
  line-height: 1;
  cursor: pointer;
  text-decoration: none !important;
  white-space: nowrap;
  flex: none;
  box-sizing: border-box;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.account-btn:hover, .topbar .account-btn:hover, #userAccountBtn:hover, #authBtn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
  color: #ffffff !important;
  box-shadow: none;
}
.account-btn:active, .topbar .account-btn:active, #userAccountBtn:active, #authBtn:active {
  transform: scale(0.95);
}
.account-btn:focus-visible, .topbar .account-btn:focus-visible, #userAccountBtn:focus-visible, #authBtn:focus-visible {
  outline: 2px solid #e36414;
  outline-offset: 2px;
}
.account-btn .icon, .topbar .account-btn .icon, #userAccountBtn .icon, #authBtn .icon {
  width: 19px;
  height: 19px;
  color: inherit;
  flex: none;
}
.account-btn .account-label, .topbar .account-btn .account-label, #userAccountBtn .account-label, #authBtn .account-label {
  display: none !important;
}
.account-btn .account-dot {
  position: absolute;
  top: 5px;
  inset-inline-end: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  border: 1.5px solid #0f4c5c;
  display: none;
}
.account-btn.is-logged-in .account-dot {
  display: block;
}

/* Cart button (translucent) + un-cropped Ember badge */
.cart-btn, .topbar .cart-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: none;
  padding: 0;
  width: 38px;
  height: 38px;
  min-height: 38px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  flex: none;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.cart-btn:hover, .topbar .cart-btn:hover { background: rgba(255, 255, 255, 0.2); color: #ffffff; border-color: rgba(255, 255, 255, 0.32); box-shadow: none; }
.cart-btn:active, .topbar .cart-btn:active { transform: scale(0.95); }
.cart-btn:focus-visible, .topbar .cart-btn:focus-visible { outline: 2px solid #e36414; outline-offset: 2px; }
.cart-btn .icon, .topbar .cart-btn .icon { width: 19px; height: 19px; color: inherit; flex: none; }
.count-badge { position: absolute; top: -5px; inset-inline-end: -6px; transform: none; min-width: 20px; height: 20px; padding: 0 5px; background: #e36414 !important; color: #ffffff !important; border: 2px solid #0f4c5c; border-radius: 999px; font-size: 0.72rem; font-weight: 700; line-height: 1; display: flex; align-items: center; justify-content: center; z-index: 2; }

/* Topbar utility buttons unified flex ordering (Language -> Account -> Cart) */
.topbar #langToggleBtn { order: 3; }
.topbar .account-btn, .topbar #userAccountBtn, .topbar #authBtn { order: 4; }
.topbar .cart-btn, .topbar #cartBtn { order: 5; }

/* ── Topbar responsive: ≤768px stays a SINGLE row — Logo | [search icon] | [lang circle] | [account] | [cart] ── */
@media screen and (max-width: 768px) {
  .topbar-inner { flex-wrap: nowrap; gap: 8px; padding-inline: 16px; padding-block: 8px; }
  .topbar .logo { order: 1; font-size: 1.15rem; margin-inline-end: auto; min-width: 0; }
  .topbar .mobile-search-btn { order: 2; display: inline-flex; }
  .topbar #langToggleBtn { order: 3; margin-inline-start: 0; }
  .topbar .account-btn, .topbar #userAccountBtn, .topbar #authBtn {
    order: 4;
    width: 38px;
    height: 38px;
    min-height: 38px;
    min-width: 38px;
    padding: 0 !important;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .topbar .account-btn .account-label, .topbar #userAccountBtn .account-label, .topbar #authBtn .account-label {
    display: none !important;
  }
  .topbar .cart-btn {
    order: 5;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  /* Hide the full desktop search field on mobile until the icon opens the overlay */
  .header-search { display: none; }
  .topbar.search-open .header-search {
    display: flex; position: absolute; top: 100%; inset-inline: 0;
    width: 100%; max-width: 100%; margin: 0; padding: 10px 16px;
    background: #0f4c5c; border-block-start: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 28px rgba(15, 76, 92, 0.28); z-index: 5;
  }
  .topbar.search-open .header-search input { background: rgba(255, 255, 255, 0.16); }
}
.hero:not(.hero-split) { background: var(--color-surface); border-block-end: 1px solid var(--color-border); }
.hero-inner { max-width: 1200px; margin-inline: auto; padding-inline: 20px; padding-block: 56px 44px; text-align: center; }
.hero-eyebrow { display: inline-block; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-accent); background: #fef3ec; border-radius: 999px; padding-inline: 14px; padding-block: 5px; margin-block-end: 14px; }
.hero h1 { margin: 0 0 10px; font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -0.02em; line-height: 1.15; color: var(--color-text); }
.hero p { color: var(--color-muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto 20px; }
.container { max-width: 1200px; margin-inline: auto; padding-inline: 20px; padding-block: 24px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-block: 18px; }
.search { flex: 1; min-width: 180px; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding-inline: 14px; padding-block: 11px; background: #fff; }
.search:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-block: 12px; }
.pill { border: 1px solid var(--color-border); background: #fff; border-radius: 999px; padding-inline: 16px; padding-block: 8px; cursor: pointer; font-weight: 600; transition: all 0.15s ease; }
.pill:hover { border-color: var(--color-primary); color: var(--color-primary-hover); }
.pill.active { background: var(--color-primary, #0f4c5c); color: #fff; border-color: var(--color-primary, #0f4c5c); }
.pill.active:hover { background: var(--color-primary-hover, #0a333e); border-color: var(--color-primary-hover, #0a333e); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
/* 1-column override applied by the grid toggle (both split grids) */
#newArrivalsGrid.grid-cols-1, #bestSellersGrid.grid-cols-1 { grid-template-columns: 1fr; }
/* Equal-height cards + bottom-sticky action buttons (petrol only, no emerald) */
.p-card, .product-card { background: #fff; border: 1px solid #edf2f7; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-card); display: flex; flex-direction: column; height: 100%; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.p-card:hover, .product-card:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06); }
.p-media { position: relative; aspect-ratio: 1/1; background: #f1f5f9; overflow: hidden; }
.p-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }

/* Badges container for .p-card / .product-card — cleanly stacks discount & bundle badges with zero collision */
.p-badges, .product-card-badges, .badges-container {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  z-index: 3;
  pointer-events: none;
}
.p-badges .off,
.p-badges .p-bundle-tag,
.product-card-badges .off,
.product-card-badges .p-bundle-tag,
.badges-container .off,
.badges-container .p-bundle-tag {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  inset-inline-start: auto;
  inset-inline-end: auto;
  margin: 0;
}

/* Discount & bundle badges (standalone fallback + inside container) */
.off { position: absolute; top: 8px; inset-inline-start: 8px; background: var(--color-accent); color: #fff; border-radius: 999px; padding-inline: 10px; padding-block: 4px; font-size: 0.75rem; font-weight: 800; box-shadow: 0 2px 8px rgba(227, 100, 20, 0.4); z-index: 2; white-space: nowrap; line-height: 1.2; }
.p-bundle-tag { position: absolute; top: 8px; inset-inline-start: 8px; background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; border-radius: 999px; padding-inline: 9px; padding-block: 3px; font-size: 0.72rem; font-weight: 800; box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4); z-index: 2; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; line-height: 1.2; }

/* Direct-child fallback when badges are not inside .p-badges container */
.off ~ .p-bundle-tag, .p-bundle-tag ~ .off { top: 38px; }

/* Top-left anchor support for bundle badge if placed independently */
.p-card .p-bundle-tag.anchor-tl,
.product-card .p-bundle-tag.anchor-tl {
  left: 8px;
  top: 8px;
  right: auto;
  inset-inline-start: auto;
}

/* Wishlist heart toggle (opposing corner from discount badge, slate → danger when active) */
.p-wish {
  position: absolute; top: 8px; inset-inline-end: 8px; width: 34px; height: 34px;
  border: 1px solid #edf2f7; background: rgba(255, 255, 255, 0.92); border-radius: 50%;
  display: inline-grid; place-items: center; cursor: pointer; color: #718096;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.p-wish:hover { color: var(--color-danger); background: #fff; transform: scale(1.08); }
.p-wish.on { color: var(--color-danger); background: #fff5f5; }
.p-wish .icon { width: 17px; height: 17px; }
/* Star rating line (gold stars + muted score) */
.p-rating { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--color-muted); }
.p-rating .stars { color: #f5b301; letter-spacing: 1px; }
.p-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }

/* Card meta tags row (category badge + bundle pill) */
.p-meta-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Subtle bundle pill badge inside card body */
.bundle-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  padding-inline: 8px;
  padding-block: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Bundle constituent snippet subtitle */
.bundle-snippet {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #d97706;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.3;
}
.bundle-snippet::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f59e0b;
}
.p-body h3 { margin: 0; font-size: 1.02rem; letter-spacing: -0.01em; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { font-size: 1.15rem; font-weight: 800; color: var(--color-primary); }
.muted { color: var(--color-muted); font-size: 0.88rem; }
/* Price + stock pinned to the card bottom (auto margin absorbs slack — no empty voids) */
.price-row { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-block-start: auto; }
.price-row s { color: var(--color-muted); }
.p-body .stock { margin-inline-start: auto; font-size: 0.78rem; color: var(--color-muted); white-space: nowrap; }
.stock.low { color: var(--color-danger); font-weight: 700; }
/* Floating circular quick-add (+) over the image, bottom-inline-end corner */
.p-quick-add {
  position: absolute; bottom: 10px; inset-inline-end: 10px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: #fff; color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border: 1px solid #edf2f7; cursor: pointer;
  transition: all 0.2s ease;
}
.p-quick-add:hover { background: var(--color-primary); color: #fff; transform: scale(1.06); }
.p-quick-add:focus-visible { outline: 2px solid var(--color-primary-soft); outline-offset: 2px; }
.p-quick-add:disabled { opacity: 0.55; cursor: not-allowed; }
.p-quick-add:disabled:hover { background: #fff; color: var(--color-primary); transform: none; }
.p-quick-add .icon { width: 18px; height: 18px; }
.p-quick-add.added { background: var(--color-primary); color: #fff; }
.empty { padding: 30px; text-align: center; color: var(--color-muted); border: 1px dashed var(--color-border); border-radius: var(--radius-md); grid-column: 1/-1; }
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 900; }
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(400px, 92vw); background: #fff; z-index: 910; transform: translateX(-110%); transition: transform 0.25s ease; display: flex; flex-direction: column; }
[dir="ltr"] .drawer { transform: translateX(110%); }
.drawer.open { transform: none !important; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px; border-block-end: 1px solid var(--color-border); }
.drawer-body { flex: 1; overflow: auto; padding: 16px; display: grid; gap: 12px; align-content: start; }
.c-row { display: flex; gap: 12px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 12px; }
.c-row img,
.cart-item-img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; background-color: #f1f5f9; }
.c-info { flex: 1; display: grid; gap: 4px; }
.qty { display: inline-flex; gap: 8px; align-items: center; }
.qty button { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--color-border); background: #fff; cursor: pointer; }
.c-total { display: grid; gap: 6px; justify-items: end; font-weight: 700; }
.rm { border: 0; background: transparent; color: var(--color-danger); cursor: pointer; }
.drawer-foot { padding: 16px; border-block-start: 1px solid var(--color-border); display: grid; gap: 10px; }
.drawer-foot .btn { width: 100%; justify-content: center; }
.tot-row { display: flex; justify-content: space-between; }
.tot-row.grand { font-weight: 800; font-size: 1.1rem; border-block-start: 1px solid var(--color-border); padding-block-start: 8px; }
.modal { position: fixed; inset: 0; z-index: 920; display: none; place-items: center; padding: 16px; }
.modal.open { display: grid; }
.modal::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.modal-card { position: relative; background: #fff; border-radius: var(--radius-lg); padding: 20px; width: min(520px, 94vw); max-height: 88vh; overflow: auto; box-shadow: var(--shadow-pop); }
.modal-card h2 { margin-block-start: 0; }

/* ── Auth Modal (Login / Register overlay) ─────────────────────────────────── */
#authModal.auth-modal,
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
#authModal.auth-modal.open,
.auth-modal.open {
  display: flex !important;
}
.auth-modal-ov {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1;
}
.auth-card {
  position: relative;
  z-index: 2;
  background: #ffffff;
  color: #1a202c;
  border-radius: 16px;
  padding: 24px 28px;
  width: min(440px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(15, 76, 92, 0.25), 0 0 0 1px rgba(15, 76, 92, 0.08);
  box-sizing: border-box;
  animation: authModalSlideIn 0.2s ease-out;
}
@keyframes authModalSlideIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.auth-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.auth-card-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f4c5c;
}
.auth-close-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.15s ease;
}
.auth-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.auth-tabs {
  display: flex;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 18px;
}
.auth-tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}
.auth-tabs button.on {
  background: #0f4c5c;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 76, 92, 0.2);
}
.auth-card .field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}
.auth-card .field label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #334155;
}
.auth-card .field input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.92rem;
  box-sizing: border-box;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-card .field input:focus {
  outline: none;
  border-color: #0f4c5c;
  box-shadow: 0 0 0 3px rgba(15, 76, 92, 0.15);
}
.auth-err,
.auth-ok {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.auth-err {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.auth-ok {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.auth-card [hidden] {
  display: none !important;
}
.track-card { padding: 12px; margin-block-start: 10px; }
.success-code { font-size: 1.6rem; font-weight: 800; color: var(--color-primary-hover); }

/* Pill / ghost navigation buttons (e.g. Home back button) */
.nav-btn,
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #4a5568;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 9999px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}
.nav-btn:hover,
.back-btn:hover {
  background: #f7fafc;
  border-color: #cbd5e0;
  color: #0f4c5c;
  transform: translateX(-2px);
}
.nav-btn:focus-visible,
.back-btn:focus-visible,
.hero-cta:focus-visible { outline: 2px solid var(--color-primary-soft); outline-offset: 2px; }
.nav-btn .icon,
.back-btn .icon { color: inherit; }
/* RTL pages are the default, so the "back" pill slides left; slide right once LTR */
[dir="ltr"] .nav-btn:hover,
[dir="ltr"] .back-btn:hover { transform: translateX(2px); }

/* Hero CTA pill button ("Shop now / تسوق الآن") */
.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border-radius: 9999px;
  background-color: var(--color-accent, #e36414);
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 4px 14px rgba(227, 100, 20, 0.3);
  text-decoration: none;
  transition: background-color 0.18s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.hero-cta:hover {
  background-color: var(--color-accent-hover, #c4520f);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(227, 100, 20, 0.4);
}
/* ── 3-Banner Promotional Ads Showcase (Desktop Grid & Mobile Peek Slider) ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
.promo-banners-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 16px 0;
}
.promo-banners-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  grid-template-rows: repeat(2, 220px);
  gap: 16px;
  margin: 16px auto 0;
}
.promo-banner-card {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  text-decoration: none;
  background-color: #f1f5f9;
}
.promo-banner-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}
.promo-banner-card.slot-1 {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  height: 100%;
}
.promo-banner-card.slot-2 {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}
.promo-banner-card.slot-3 {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
}
.promo-banner-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

/* ── Main storefront container spacing directly beneath promo banners ──── */
main.container {
  padding-block: 14px 24px;
}

/* ── Section headers (shared by categories & products) ───────────────────── */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-block: 0 12px; }
.section-head h2 { margin: 0; font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; color: #1e293b; }
.section-head h2::after { display: none !important; }
.section-head .muted { color: var(--color-muted); font-size: 0.9rem; }
.section-head .grid-toggle { margin-inline-start: auto; }

/* Subtle view-all button for category header pointing to /catalog.html */
.category-view-all {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-primary, #0f4c5c);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--color-border, #e2e8f0);
  background: var(--color-surface, #ffffff);
  transition: all 0.15s ease;
}
.category-view-all:hover {
  background: var(--color-primary, #0f4c5c);
  color: #ffffff;
  border-color: var(--color-primary, #0f4c5c);
}
/* ── Visual category showcase (app-style icon grid) ─────────────────────── */
.category-section { margin-block-end: 32px; }
.categories-grid, #categoriesGrid, .category-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: 8px 12px 16px !important;
  gap: 12px !important;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
}
.categories-grid::-webkit-scrollbar, #categoriesGrid::-webkit-scrollbar, .category-grid::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}
.category-icon-card {
  flex: 0 0 110px; /* Fixed neat width on desktop */
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 10px 14px;
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: var(--radius-lg, 16px);
  text-decoration: none;
  color: var(--color-text, #1e293b);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background-color 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  box-sizing: border-box;
}
.category-icon-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px -4px rgba(15, 76, 92, 0.12);
}
.category-icon-card:active {
  transform: scale(0.96);
}

/* Spinneys-Style Soft Pastel Tinted Card Backgrounds */
.category-icon-card.cat-grocery,
.category-icon-card[data-slug="grocery"] {
  background: #f0fdf4;
  border-color: #dcfce7;
}
.category-icon-card.cat-grocery:hover,
.category-icon-card[data-slug="grocery"]:hover {
  background: #e6fbee;
  border-color: #bbf7d0;
  box-shadow: 0 10px 20px -4px rgba(34, 197, 94, 0.18);
}

.category-icon-card.cat-beverages,
.category-icon-card[data-slug="beverages"] {
  background: #eff6ff;
  border-color: #dbeafe;
}
.category-icon-card.cat-beverages:hover,
.category-icon-card[data-slug="beverages"]:hover {
  background: #e0f0fe;
  border-color: #bfdbfe;
  box-shadow: 0 10px 20px -4px rgba(59, 130, 246, 0.18);
}

.category-icon-card.cat-care,
.category-icon-card[data-slug="care"],
.category-icon-card.cat-personal-care,
.category-icon-card[data-slug="personal-care"] {
  background: #fdf2f8;
  border-color: #fce7f3;
}
.category-icon-card.cat-care:hover,
.category-icon-card[data-slug="care"]:hover,
.category-icon-card.cat-personal-care:hover,
.category-icon-card[data-slug="personal-care"]:hover {
  background: #fce7f3;
  border-color: #fbcfe8;
  box-shadow: 0 10px 20px -4px rgba(236, 72, 153, 0.18);
}

.category-icon-card.cat-electronics,
.category-icon-card[data-slug="electronics"] {
  background: #ecfeff;
  border-color: #cffafe;
}
.category-icon-card.cat-electronics:hover,
.category-icon-card[data-slug="electronics"]:hover {
  background: #dffcfe;
  border-color: #a5f3fc;
  box-shadow: 0 10px 20px -4px rgba(6, 182, 212, 0.18);
}

.category-icon-card.cat-fashion,
.category-icon-card[data-slug="fashion"] {
  background: #fff7ed;
  border-color: #ffedd5;
}
.category-icon-card.cat-fashion:hover,
.category-icon-card[data-slug="fashion"]:hover {
  background: #ffeedb;
  border-color: #fed7aa;
  box-shadow: 0 10px 20px -4px rgba(249, 115, 22, 0.18);
}

.category-icon-card.cat-home-kitchen,
.category-icon-card[data-slug="home-kitchen"] {
  background: #fefce8;
  border-color: #fef08a;
}
.category-icon-card.cat-home-kitchen:hover,
.category-icon-card[data-slug="home-kitchen"]:hover {
  background: #fef9c3;
  border-color: #fde047;
  box-shadow: 0 10px 20px -4px rgba(234, 179, 8, 0.18);
}

.category-icon-card.cat-sports,
.category-icon-card[data-slug="sports"] {
  background: #fff1f2;
  border-color: #ffe4e6;
}
.category-icon-card.cat-sports:hover,
.category-icon-card[data-slug="sports"]:hover {
  background: #ffe4e6;
  border-color: #fecdd3;
  box-shadow: 0 10px 20px -4px rgba(244, 63, 94, 0.18);
}

.category-icon-card.cat-perfumes,
.category-icon-card[data-slug="perfumes"] {
  background: #f5f3ff;
  border-color: #ede9fe;
}
.category-icon-card.cat-perfumes:hover,
.category-icon-card[data-slug="perfumes"]:hover {
  background: #ede9fe;
  border-color: #ddd6fe;
  box-shadow: 0 10px 20px -4px rgba(139, 92, 246, 0.18);
}

.category-icon-card.cat-books-stationery,
.category-icon-card[data-slug="books-stationery"] {
  background: #f0fdfa;
  border-color: #ccfbf1;
}
.category-icon-card.cat-books-stationery:hover,
.category-icon-card[data-slug="books-stationery"]:hover {
  background: #e6faf6;
  border-color: #99f6e4;
  box-shadow: 0 10px 20px -4px rgba(20, 184, 166, 0.18);
}

.category-icon-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  color: var(--color-primary, #0f4c5c);
  margin-bottom: 8px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}
.category-icon-card:hover .category-icon-circle {
  transform: scale(1.1) translateY(-2px);
}
.category-3d-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
  user-select: none;
  pointer-events: none;
}
.category-icon-card:hover .category-3d-icon {
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.15));
}
.category-icon-circle svg,
.category-icon-circle .category-svg-icon {
  width: 30px;
  height: 30px;
  stroke: var(--color-primary, #0f4c5c);
  stroke-width: 1.8;
  fill: none;
}
.category-icon-emoji {
  display: inline-block;
  line-height: 1;
}
.category-icon-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--color-text, #1e293b);
  line-height: 1.25;
  margin-bottom: 3px;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.category-icon-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted, #64748b);
  line-height: 1.2;
}

/* Backward compatibility for .cat-card if referenced elsewhere */
.cat-card {
  display: flex; flex-direction: column; gap: 10px; cursor: pointer;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-card); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.cat-card .cat-media { position: relative; aspect-ratio: 16/10; background: #f1f5f9; overflow: hidden; }
.cat-card .cat-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.cat-card:hover .cat-media img { transform: scale(1.06); }
.cat-card .cat-num { position: absolute; top: 10px; inset-inline-end: 10px; background: var(--color-primary-soft); color: var(--color-primary-hover); border-radius: 999px; padding-inline: 9px; padding-block: 3px; font-size: 0.7rem; font-weight: 800; }
.cat-card .cat-body { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px 16px; }
.cat-card .cat-name { flex: 1; font-size: 1.05rem; font-weight: 800; color: var(--color-text); }
/* ── Product catalog: filter bar + New Arrivals & Best Sellers ─────────────── */
.product-section { margin-block-end: 20px; scroll-margin-top: 78px; }
#resultCount { font-weight: 700; color: var(--color-muted); font-size: 0.88rem; white-space: nowrap; }
.catalog-filter {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-block: 4px 2px; padding-block: 10px;
  border-block-end: 1px solid var(--color-border);
}
.catalog-filter .pills { margin: 0; }
.catalog-filter .grid-toggle { margin-inline-start: auto; }
.subsection { margin-block: 24px 8px; }
.subsection-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.subsection-head h3 { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; color: var(--color-text); }
.subsection-head h3::after { content: ""; display: block; width: 30px; height: 4px; border-radius: 999px; background: var(--color-accent); margin-block-start: 6px; }
.subsection-head .muted { color: var(--color-muted); font-size: 0.85rem; font-weight: 700; }
.view-all {
  margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--color-border); background: var(--color-surface);
  color: var(--color-primary-hover); border-radius: 999px; padding-inline: 16px; padding-block: 8px;
  font-size: 0.85rem; font-weight: 700; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.view-all:hover { background: var(--color-primary, #0f4c5c); border-color: var(--color-primary, #0f4c5c); color: #fff; }
.view-all .icon { width: 16px; height: 16px; }
/* Split product grids — desktop 4-up, tablet 3-up, mobile overridden below */
#newArrivalsGrid, #bestSellersGrid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media screen and (max-width: 1020px) { #newArrivalsGrid, #bestSellersGrid { grid-template-columns: repeat(3, 1fr); } }
/* ── Mobile grid-view toggle (hidden on desktop, shown ≤768px) ─────────── */
.grid-toggle { display: none; margin-inline-start: auto; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--color-border); border-radius: 10px; padding: 3px; }
.grid-toggle button { display: inline-grid; place-items: center; width: 34px; height: 30px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; color: #718096; transition: background 0.15s ease, color 0.15s ease; }
.grid-toggle button:hover { background: #f1f5f9; color: var(--color-primary-hover, #0a333e); }
.grid-toggle button.active { background: var(--color-primary, #0f4c5c); color: #fff; }
.grid-toggle .icon { width: 17px; height: 17px; color: inherit; }

/* ── Mobile: 2-column default grid + compact cards, 1-column override ──── */
@media screen and (max-width: 768px) {
  .grid-toggle { display: inline-flex; }
  #newArrivalsGrid, #bestSellersGrid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  #newArrivalsGrid.grid-cols-1, #bestSellersGrid.grid-cols-1 { grid-template-columns: 1fr; }
  /* Compact 2-col cards: tighter padding, smaller title/price/button */
  #newArrivalsGrid:not(.grid-cols-1) .p-card, #bestSellersGrid:not(.grid-cols-1) .p-card { border-radius: var(--radius-md); }
  #newArrivalsGrid:not(.grid-cols-1) .p-body, #bestSellersGrid:not(.grid-cols-1) .p-body { padding: 10px 12px; gap: 5px; }
  #newArrivalsGrid:not(.grid-cols-1) .badge, #bestSellersGrid:not(.grid-cols-1) .badge { font-size: 0.62rem; padding-inline: 6px; padding-block: 2px; }
  #newArrivalsGrid:not(.grid-cols-1) .bundle-pill-badge, #bestSellersGrid:not(.grid-cols-1) .bundle-pill-badge { font-size: 0.62rem; padding-inline: 6px; padding-block: 1.5px; }
  #newArrivalsGrid:not(.grid-cols-1) .bundle-snippet, #bestSellersGrid:not(.grid-cols-1) .bundle-snippet { font-size: 0.7rem; }
  #newArrivalsGrid:not(.grid-cols-1) .p-body h3, #bestSellersGrid:not(.grid-cols-1) .p-body h3 { font-size: 14px; }
  #newArrivalsGrid:not(.grid-cols-1) .price-row strong, #bestSellersGrid:not(.grid-cols-1) .price-row strong { font-size: 13px; }
  #newArrivalsGrid:not(.grid-cols-1) .price-row s, #bestSellersGrid:not(.grid-cols-1) .price-row s { font-size: 0.72rem; }
  #newArrivalsGrid:not(.grid-cols-1) .stock, #bestSellersGrid:not(.grid-cols-1) .stock { font-size: 0.7rem; }
  #newArrivalsGrid:not(.grid-cols-1) .p-quick-add, #bestSellersGrid:not(.grid-cols-1) .p-quick-add { width: 32px; height: 32px; bottom: 8px; inset-inline-end: 8px; }
  /* 3-Banner Promotional Ads: Enforce identical dimensions for all 3 slots on mobile (<= 768px) */
  .promo-banners-wrapper {
    padding: 6px 0 0 !important;
    margin-bottom: 6px !important;
    max-width: 100% !important;
  }
  .promo-banners-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 12px !important;
    padding: 10px 14px 0 !important;
    scrollbar-width: none;
    margin: 4px 0 0 !important;
  }
  .promo-banners-grid::-webkit-scrollbar {
    display: none;
  }

  /* Enforce identical width, height, and aspect ratio for ALL 3 banner slots */
  .promo-banner-card,
  .promo-banner-card.slot-1,
  .promo-banner-card.slot-2,
  .promo-banner-card.slot-3 {
    flex: 0 0 86% !important;
    width: 86% !important;
    max-width: 86% !important;
    height: 190px !important; /* Unified fixed height */
    aspect-ratio: 16 / 9;
    scroll-snap-align: center;
    border-radius: 14px;
    overflow: hidden;
    margin: 0 !important;
    display: block !important;
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .promo-banner-card img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }

  /* Main container & category header spacing directly beneath promo banners */
  main.container {
    padding-block-start: 0 !important;
  }

  /* Category section & header wrapper: 4px top, 8px bottom */
  .category-section {
    margin-block-start: 0 !important;
    margin-block-end: 6px !important;
  }
  .category-section .section-head,
  .category-section-head,
  .section-head {
    margin: 4px 0 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }
  .category-section .section-head h2,
  .category-section-head h2,
  .section-head h2 {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 0 !important;
    line-height: 1.25 !important;
  }
  .category-section .section-head h2::after,
  .category-section-head h2::after,
  .section-head h2::after {
    display: none !important;
  }
  .category-view-all {
    font-size: 0.78rem !important;
    padding: 3px 8px !important;
  }

  /* Category carousel: 2-Row Horizontal Scroll Grid (3 Columns x 2 Rows) */
  .categories-grid, #categoriesGrid, .category-grid {
    display: grid !important;
    grid-template-rows: repeat(2, auto) !important;
    grid-auto-flow: column !important;
    grid-auto-columns: calc((100% - 20px) / 3.25) !important; /* Exactly 3 items wide with peek for swiping */
    gap: 8px 10px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 4px 10px 10px !important;
    margin: 0 0 6px !important;
    scrollbar-width: none;
  }
  .categories-grid::-webkit-scrollbar, #categoriesGrid::-webkit-scrollbar, .category-grid::-webkit-scrollbar {
    display: none !important;
  }
  .category-icon-card {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    scroll-snap-align: start;
    padding: 10px 6px 8px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
  }
  .category-icon-circle {
    width: 50px !important;
    height: 50px !important;
    margin: 0 auto 4px !important;
    background: transparent !important;
    border: none !important;
    font-size: 1.25rem !important;
  }
  .category-3d-icon {
    width: 100% !important;
    height: 100% !important;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.09)) !important;
  }
  .category-icon-circle svg,
  .category-icon-circle .category-svg-icon {
    width: 24px !important;
    height: 24px !important;
  }
  .category-icon-title {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100%;
    padding-inline: 2px;
  }
  .category-icon-count,
  .category-icon-card.category-icon-skeleton .skel-cat-count {
    display: none !important;
  }

  /* Products section: minimized vertical spacing directly beneath categories */
  .product-section,
  #products,
  #latestProductsSection,
  #newArrivalsSection,
  .category-section + .product-section .subsection:first-of-type {
    margin-block-start: 6px !important;
    padding-block-start: 0 !important;
  }
  .catalog-filter {
    gap: 8px;
    margin: 0 !important;
    padding: 0 0 4px !important;
    border-block-end: none !important;
  }
  .subsection-head h3 { font-size: 1.12rem; }
  .view-all { padding-inline: 12px; padding-block: 6px; }
}
@media screen and (max-width: 480px) {
  .hero-proof { flex-wrap: wrap; }
}
/* ── Skeleton loaders (shimmer placeholders during API fetch) ────────────── */
.skeleton {
  position: relative;
  overflow: hidden;
  background: #e2e8f0;
  background-image: linear-gradient(100deg, #e2e8f0 30%, #f1f5f9 46%, #e2e8f0 62%);
  background-size: 200% 100%;
  animation: matgary-shimmer 1.4s linear infinite;
  color: transparent !important;
  pointer-events: none;
  user-select: none;
}
@keyframes matgary-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
}
/* Product card skeleton (matches .p-card: 1:1 media, title bar, price bar, round action) */
.p-card-skel {
  background: #fff;
  border: 1px solid #edf2f7;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.p-card-skel .skel-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #e2e8f0;
  background-image: linear-gradient(100deg, #e2e8f0 30%, #f1f5f9 46%, #e2e8f0 62%);
  background-size: 200% 100%;
  animation: matgary-shimmer 1.4s linear infinite;
}
.p-card-skel .skel-action {
  position: absolute;
  bottom: 10px;
  inset-inline-end: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #cbd5e1;
  background-image: linear-gradient(100deg, #cbd5e1 30%, #e2e8f0 46%, #cbd5e1 62%);
  background-size: 200% 100%;
  animation: matgary-shimmer 1.4s linear infinite;
}
.p-card-skel .skel-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.p-card-skel .skel-title,
.p-card-skel .skel-price {
  border-radius: 6px;
  background: #e2e8f0;
  background-image: linear-gradient(100deg, #e2e8f0 30%, #f1f5f9 46%, #e2e8f0 62%);
  background-size: 200% 100%;
  animation: matgary-shimmer 1.4s linear infinite;
}
.p-card-skel .skel-title { width: 82%; height: 14px; }
.p-card-skel .skel-price { width: 55%; height: 12px; margin-block-start: auto; }
/* Category icon card skeleton */
.category-icon-card.category-icon-skeleton {
  pointer-events: none;
}
.category-icon-card.category-icon-skeleton .category-icon-circle {
  border-color: transparent;
}
.category-icon-card.category-icon-skeleton .skel-shimmer {
  background: #e2e8f0;
  background-image: linear-gradient(100deg, #e2e8f0 30%, #f1f5f9 46%, #e2e8f0 62%);
  background-size: 200% 100%;
  animation: matgary-shimmer 1.4s linear infinite;
}
.category-icon-card.category-icon-skeleton .skel-cat-title {
  width: 70%;
  height: 12px;
  border-radius: 4px;
  margin-bottom: 4px;
}
.category-icon-card.category-icon-skeleton .skel-cat-count {
  width: 45%;
  height: 10px;
  border-radius: 4px;
}

/* Category card skeleton (matches .cat-card: media banner + name bar) */
.cat-card-skel {
  background: #fff;
  border: 1px solid #edf2f7;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.cat-card-skel .skel-cat-media {
  aspect-ratio: 16 / 9;
  background: #e2e8f0;
  background-image: linear-gradient(100deg, #e2e8f0 30%, #f1f5f9 46%, #e2e8f0 62%);
  background-size: 200% 100%;
  animation: matgary-shimmer 1.4s linear infinite;
}
.cat-card-skel .skel-cat-body { padding: 12px 14px; }
.cat-card-skel .skel-cat-name {
  width: 60%;
  height: 14px;
  border-radius: 6px;
  background: #e2e8f0;
  background-image: linear-gradient(100deg, #e2e8f0 30%, #f1f5f9 46%, #e2e8f0 62%);
  background-size: 200% 100%;
  animation: matgary-shimmer 1.4s linear infinite;
}
/* ── Universal 4-column footer (Petrol Blue & Ember design system) ───────── */
footer, .site-footer, .footer {
  background: #0f4c5c !important;
  color: #e2e8f0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-block-start: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 40px;
  margin-block-start: 40px;
}
.footer-inner {
  max-width: 1200px; margin-inline: auto; padding-inline: 20px; padding-block: 48px 40px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px;
}
@media (max-width: 1020px) { .footer-inner { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-col { display: grid; gap: 12px; align-content: start; min-width: 0; }
.footer-col h4, .footer h4, .footer h5, .footer-title {
  margin: 0; font-size: 0.95rem; font-weight: 700; color: #ffffff !important; letter-spacing: -0.01em;
}
/* Brand: white wordmark + Ember Orange icon accent (mirrors the topbar) */
.footer-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.2rem; color: #ffffff !important; }
.footer-logo .logo-icon { width: 22px; height: 22px; color: #e36414; stroke: #e36414; }
.footer-bio { margin: 0; font-size: 0.88rem; line-height: 1.8; color: #e2e8f0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a, .footer a {
  font-size: 0.9rem; font-weight: 600; color: #cbd5e1; text-decoration: none;
  transition: color 0.2s ease;
}
.footer-links a:hover, .footer-links a:focus-visible,
.footer a:hover, .footer a:focus-visible { color: #e36414 !important; }
.footer-trust { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 700; color: #e2e8f0; }
.footer-badge .icon { width: 16px; height: 16px; color: #e36414; }
.footer-contact { display: grid; gap: 10px; }
.footer-contact a { color: #cbd5e1; font-weight: 600; font-size: 0.9rem; transition: color 0.2s ease; }
.footer-contact a:hover { color: #e36414 !important; }
.footer-contact .hours { color: #94a3b8; font-size: 0.85rem; line-height: 1.6; }
.footer-wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12); color: #ffffff; font-weight: 700; font-size: 0.88rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.footer-wa:hover, .footer-wa:focus-visible { background: #25D366; border-color: #25D366; color: #ffffff; }
.footer-wa .icon { color: currentColor; }
.footer-bar, .footer-bottom, .copyright {
  max-width: 1200px; margin-inline: auto; padding-inline: 20px; padding-block: 16px;
  border-block-start: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center; font-size: 0.82rem; color: #94a3b8; background: rgba(0, 0, 0, 0.15);
}

/* ══════════════════════════════════════════════════════════════════════════
   RESTAURANT FOOD-TECH STYLES: Meal Customizer Drawer & Floating Order Bar
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Meal Customizer Drawer / Modal ── */
body.mc-open { overflow: hidden; }

.mc-overlay {
  position: fixed; inset: 0; z-index: 998;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s ease;
}
.mc-overlay.open {
  opacity: 1; pointer-events: auto;
}

.mc-drawer {
  position: fixed; z-index: 999;
  background: #ffffff;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  display: flex; flex-direction: column;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mobile: Bottom Sheet */
@media (max-width: 768px) {
  .mc-drawer {
    inset-inline: 0; bottom: 0;
    max-height: 90vh;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
  }
  .mc-drawer.open {
    transform: translateY(0);
  }
}

/* Desktop: Centered Floating Modal */
@media (min-width: 769px) {
  .mc-drawer {
    top: 50%; left: 50%;
    transform: translate(-50%, -46%) scale(0.96);
    width: 90%; max-width: 580px;
    max-height: 86vh;
    border-radius: 20px;
    opacity: 0; pointer-events: none;
  }
  .mc-drawer.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1; pointer-events: auto;
  }
}

/* Header & Hero */
.mc-header {
  position: relative;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  border-radius: 20px 20px 0 0;
}
.mc-close-btn {
  position: absolute; top: 14px; inset-inline-end: 14px; z-index: 10;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(15, 23, 42, 0.6); color: #ffffff;
  border: none; cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, transform 0.15s ease;
}
.mc-close-btn:hover { background: rgba(15, 23, 42, 0.85); transform: scale(1.05); }

.mc-hero-media {
  position: relative; width: 100%; height: 210px; overflow: hidden;
  background: #0f172a;
}
.mc-hero-media img {
  width: 100%; height: 100%; object-fit: cover;
}
.mc-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.8) 0%, transparent 60%);
}
.mc-hero-info {
  padding: 16px 20px 12px;
}
.mc-hero-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.mc-hero-top h2 {
  margin: 0; font-size: 1.35rem; font-weight: 800; color: #0f172a;
}
.mc-hero-price {
  font-size: 1.25rem; font-weight: 800; color: var(--color-primary, #d9381e);
  white-space: nowrap;
}
.mc-hero-desc {
  margin: 6px 0 10px; font-size: 0.88rem; line-height: 1.5; color: #64748b;
}
.mc-tags-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.mc-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.78rem; font-weight: 700; padding: 4px 10px;
  border-radius: 999px;
}
.mc-tag-prep { background: #fef3c7; color: #b45309; }
.mc-tag-cal { background: #fee2e2; color: #dc2626; }
.mc-tag-spicy { background: #ffedd5; color: #ea580c; font-weight: 800; }

/* Body: Scrollable modifier groups */
.mc-body {
  flex: 1; overflow-y: auto; padding: 16px 20px;
  display: flex; flex-direction: column; gap: 20px;
  -webkit-overflow-scrolling: touch;
}
.mc-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 40px 0; color: #64748b; font-size: 0.9rem;
}
.mc-spinner {
  width: 32px; height: 32px; border: 3px solid #e2e8f0;
  border-top-color: var(--color-primary, #d9381e);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.mc-group {
  background: #f8fafc; border: 1.5px solid #e2e8f0;
  border-radius: 14px; padding: 14px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.mc-group.has-error {
  border-color: #ef4444; background: #fff5f5;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.mc-group-error {
  margin-top: 8px; font-size: 0.82rem; font-weight: 700; color: #dc2626;
}
.mc-group-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 12px;
}
.mc-group-title-wrap {
  display: flex; flex-direction: column; gap: 2px;
}
.mc-group-title {
  font-size: 0.98rem; font-weight: 800; color: #1e293b;
}
.mc-group-hint {
  font-size: 0.78rem; color: #64748b;
}
.mc-badge-req {
  font-size: 0.72rem; font-weight: 800; color: #dc2626;
  background: #fee2e2; padding: 3px 8px; border-radius: 6px;
}
.mc-badge-optional {
  font-size: 0.72rem; font-weight: 600; color: #64748b;
  background: #f1f5f9; padding: 3px 8px; border-radius: 6px;
}

/* Options Grid */
.mc-options-grid {
  display: grid; gap: 8px;
}
.mc-opt-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: 10px; background: #ffffff;
  border: 1.5px solid #e2e8f0; cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
  user-select: none;
}
.mc-opt-card:hover {
  border-color: #cbd5e1; background: #fdfdfd;
}
.mc-opt-input {
  display: none;
}
.mc-opt-content {
  display: flex; align-items: center; gap: 10px;
}
.mc-opt-marker {
  width: 18px; height: 18px; border: 2px solid #cbd5e1;
  background: #ffffff; display: grid; place-items: center;
  transition: border-color 0.16s ease, background 0.16s ease;
  flex: none;
}
.mc-radio-card .mc-opt-marker { border-radius: 50%; }
.mc-check-card .mc-opt-marker { border-radius: 5px; }

.mc-opt-input:checked + .mc-opt-content .mc-opt-marker {
  border-color: var(--color-primary, #d9381e);
  background: var(--color-primary, #d9381e);
}
.mc-radio-card .mc-opt-input:checked + .mc-opt-content .mc-opt-marker::after {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ffffff;
}
.mc-check-card .mc-opt-input:checked + .mc-opt-content .mc-opt-marker::after {
  content: "✓"; color: #ffffff; font-size: 11px; font-weight: 900; line-height: 1;
}
.mc-opt-card:has(.mc-opt-input:checked) {
  border-color: var(--color-primary, #d9381e);
  background: #fff8f7;
}
.mc-opt-name {
  font-size: 0.9rem; font-weight: 600; color: #1e293b;
}
.mc-opt-price {
  font-size: 0.86rem; font-weight: 700; color: var(--color-primary, #d9381e);
}
.mc-free-tag {
  color: #059669; font-weight: 600; font-size: 0.78rem;
}

/* Notes Textarea */
.mc-notes-input {
  width: 100%; border: 1.5px solid #cbd5e1; border-radius: 10px;
  padding: 10px 14px; font-size: 0.88rem; outline: none;
  background: #ffffff; resize: none; font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.mc-notes-input:focus {
  border-color: var(--color-primary, #d9381e);
  box-shadow: 0 0 0 3px rgba(217, 56, 30, 0.12);
}

/* Sticky Footer */
.mc-footer {
  padding: 14px 20px; border-top: 1px solid #f1f5f9;
  background: #ffffff; border-radius: 0 0 20px 20px;
  display: flex; align-items: center; gap: 14px;
}
.mc-qty-control {
  display: inline-flex; align-items: center; gap: 10px;
  background: #f1f5f9; border-radius: 12px; padding: 4px 8px;
}
.mc-qty-btn {
  width: 34px; height: 34px; border-radius: 8px; border: none;
  background: #ffffff; color: #0f172a; font-size: 1.2rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08); transition: background 0.15s ease, transform 0.1s ease;
}
.mc-qty-btn:hover { background: #e2e8f0; }
.mc-qty-btn:active { transform: scale(0.95); }
.mc-qty-val {
  min-width: 24px; text-align: center; font-size: 1rem; font-weight: 800; color: #0f172a;
}
.mc-submit-btn {
  flex: 1; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-radius: 14px; font-size: 1rem; font-weight: 800;
  background: var(--color-primary, #d9381e); color: #ffffff; border: none;
  cursor: pointer; box-shadow: 0 4px 14px rgba(217, 56, 30, 0.35);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.mc-submit-btn:hover {
  background: #b82b14; box-shadow: 0 6px 18px rgba(217, 56, 30, 0.45);
}
.mc-submit-btn:active { transform: scale(0.98); }
.mc-submit-price {
  font-family: inherit; font-size: 1.05rem; font-weight: 800;
}

/* ── Mobile Floating Order Summary Bar ── */
.floating-order-bar {
  position: fixed; inset-inline: 16px; bottom: 16px; z-index: 800;
  max-width: 600px; margin-inline: auto;
  background: #1e293b; color: #ffffff;
  border-radius: 18px; padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: floatBarSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes floatBarSlideUp {
  from { transform: translateY(120%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.floating-order-bar.hidden { display: none !important; }
.fob-info {
  display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 1;
}
.fob-icon-wrap {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex: none;
}
.fob-text {
  display: flex; flex-direction: column; gap: 2px;
}
.fob-count {
  font-size: 0.85rem; color: #94a3b8; font-weight: 600;
}
.fob-price {
  font-size: 1.05rem; color: #ffffff; font-weight: 800;
}
.fob-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 12px;
  background: var(--color-primary, #d9381e); color: #ffffff;
  font-weight: 800; font-size: 0.92rem; border: none; cursor: pointer;
  box-shadow: 0 2px 10px rgba(217, 56, 30, 0.4);
  transition: background 0.15s ease, transform 0.12s ease;
  white-space: nowrap;
}
.fob-btn:hover { background: #b82b14; transform: translateY(-1px); }

/* ── Cart Item Modifiers & Notes Badges ── */
.c-mods-list {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px;
}
.c-mod-pill {
  font-size: 0.73rem; font-weight: 700; padding: 2px 7px;
  background: #f1f5f9; color: #475569; border-radius: 6px;
  border: 1px solid #e2e8f0;
}
.c-item-notes {
  display: block; font-size: 0.74rem; font-weight: 600; color: #d97706;
  margin-top: 3px; font-style: italic;
}