:root {
  --color-primary: #032e65;
  --color-primary-dark: #02244f;
  --color-accent: #fd0304;
  --color-accent-dark: #c90001;
  --color-text: #1a1a1a;
  --color-muted: #666;
  --color-bg: #fff;
  --color-border: #e5e5e5;
  --radius: 8px;
  --max-width: 1240px;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--color-text); background: #fafafa; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
picture { display: block; }

/* Mobile-only elements (header row, search bar, drawer, sticky product bar)
   stay hidden by default so desktop is pixel-identical to the original.
   The <= 860px query further down switches each one on for small screens. */
.site-header__mobile-row,
.search-form--mobile,
.mobile-sticky-actions,
.drawer-backdrop,
.mobile-drawer {
  display: none;
}

.announcement-bar {
  background: var(--color-primary); color: #fff;
  display: flex; align-items: center; gap: 1rem;
  font-size: 0.85rem; padding: 6px 12px;
}
.announcement-bar__scroll { flex: 1; overflow: hidden; min-width: 0; }
.announcement-bar__track {
  display: inline-flex; white-space: nowrap; will-change: transform;
  animation: announcement-scroll 22s linear infinite;
}
.announcement-bar__item { padding: 0 2rem; }
.announcement-bar__phone { color: #fff; text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.announcement-bar a { color: #fff; text-decoration: underline; }
@keyframes announcement-scroll {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .announcement-bar__track { animation: none; }
}

.site-header { background: #fff; border-bottom: 1px solid var(--color-border); padding: 0.75rem 1.5rem; }
.site-header__row { display: flex; align-items: center; gap: 1.5rem; max-width: var(--max-width); margin: 0 auto; }
.logo img { height: 42px; }
.search-form { flex: 1; display: flex; }
.search-form input { flex: 1; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius) 0 0 var(--radius); }
.search-form button { padding: 8px 16px; background: var(--color-primary); color: #fff; border: none; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; }
.header-icons { display: flex; gap: 1rem; align-items: center; white-space: nowrap; }
.header-icons button { background: none; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 6px 12px; cursor: pointer; }

.category-nav { display: flex; gap: 1.25rem; max-width: var(--max-width); margin: 0.5rem auto 0; flex-wrap: wrap; font-size: 0.9rem; }
.category-nav a:hover { color: var(--color-primary); }

main { max-width: var(--max-width); margin: 0 auto; padding: 1.5rem; }

.hero img { border-radius: var(--radius); width: 100%; }

.hero-slider { position: relative; overflow: hidden; border-radius: var(--radius); }
.hero-slider__track { position: relative; }
.hero-slider__slide { position: relative; }
.hero-slider__slide img { display: block; width: 100%; border-radius: var(--radius); }
.hero-slider__overlay {
  position: absolute; left: 5%; bottom: 8%; max-width: 480px;
  color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.hero-slider__overlay h2 { margin: 0 0 0.4rem; font-size: 1.8rem; }
.hero-slider__overlay p { margin: 0 0 0.75rem; }
.hero-slider__dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.hero-slider__dot {
  width: 10px; height: 10px; border-radius: 50%; border: none; background: rgba(255,255,255,0.5);
  cursor: pointer; padding: 0;
}
.hero-slider__dot.is-active { background: #fff; }

.category-grid, .product-grid { display: grid; gap: 1rem; margin-top: 1rem; }
.category-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.category-tile { text-align: center; }
.category-tile img { width: 64px; height: 64px; object-fit: cover; border-radius: 50%; margin: 0 auto 6px; border: 1px solid var(--color-border); }

.product-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 0.75rem; position: relative; }
.product-card__image-link { position: relative; display: block; margin-bottom: 0.5rem; }
.product-card__image-link img { border-radius: var(--radius); aspect-ratio: 1/1; object-fit: cover; }
.badge { position: absolute; top: 6px; padding: 2px 8px; font-size: 0.7rem; border-radius: 4px; color: #fff; }
.badge--discount { left: 6px; background: #fd0304; }
.badge--featured { right: 6px; background: #333; }
.product-card h3 { font-size: 0.95rem; margin: 0.25rem 0; }
.product-card__price { display: flex; gap: 0.5rem; align-items: baseline; }
.price-now { font-weight: bold; color: var(--color-primary); }
.price-was { text-decoration: line-through; color: var(--color-muted); font-size: 0.85rem; }
.product-card__actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }

.btn { padding: 8px 16px; border-radius: var(--radius); border: 1px solid var(--color-border); background: #fff; cursor: pointer; font-size: 0.9rem; }
.btn--primary { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn--primary:hover { background: var(--color-primary-dark); }
.btn--secondary { background: #032e65; color: #fff; border-color: #032e65; }

.home-section { margin: 2rem 0; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; }

.newsletter { text-align: center; padding: 2rem; background: #fff; border-radius: var(--radius); margin: 2rem 0; }
.newsletter form { display: inline-flex; gap: 0.5rem; margin-top: 0.75rem; }
.newsletter input { padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); }

.site-footer { background: #032e65; color: #dce7f5; padding: 2rem 1.5rem 1rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; max-width: var(--max-width); margin: 0 auto; }
.footer-grid h4 { color: #fff; margin-bottom: 0.5rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid a:hover { color: #fff; }
.footer-social { display: flex; gap: 0.75rem; margin-top: 0.5rem; flex-wrap: wrap; }
.footer-social a { border: 1px solid #315b8f; border-radius: var(--radius); padding: 2px 10px; font-size: 0.85rem; }
.footer-bottom { text-align: center; margin-top: 1.5rem; font-size: 0.8rem; color: #888; }

.cart-drawer { position: fixed; top: 0; right: 0; width: 340px; max-width: 100%; height: 100%; background: #fff; box-shadow: -2px 0 12px rgba(0,0,0,0.15); z-index: 100; overflow-y: auto; padding: 1rem; }
.cart-drawer[hidden] { display: none; }
.cart-drawer__item { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.75rem; position: relative; }
.cart-drawer__item img { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; }
.cart-remove-btn { position: absolute; right: 0; top: 0; background: none; border: none; cursor: pointer; font-size: 1.1rem; }

.breadcrumb { font-size: 0.85rem; color: var(--color-muted); margin-bottom: 0.75rem; }
.page-heading { margin-top: 0; }

.shop-layout { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; }
.shop-filters label { display: block; margin-bottom: 0.75rem; }
.shop-filters input, .shop-filters select { width: 100%; padding: 6px; }

.pagination { display: flex; gap: 0.5rem; margin-top: 1.5rem; }
.pagination a { padding: 6px 12px; border: 1px solid var(--color-border); border-radius: 4px; }
.pagination a.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.product-gallery img#main-image { border-radius: var(--radius); aspect-ratio: 1/1; object-fit: cover; }
.thumbnail-row { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.thumbnail-row .thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 1px solid var(--color-border); }
.product-price { font-size: 1.5rem; margin: 0.5rem 0; }
.quantity-stepper { display: flex; align-items: center; gap: 0.5rem; margin: 1rem 0; }
.quantity-stepper input { width: 60px; text-align: center; }
.product-actions { display: flex; gap: 0.75rem; margin-bottom: 1rem; }
.delivery-info p { margin: 0.25rem 0; font-size: 0.9rem; }
.product-tabs { margin-top: 2rem; }
.details-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.details-table th, .details-table td { text-align: left; padding: 6px; border-bottom: 1px solid var(--color-border); }

.cart-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.cart-table th, .cart-table td { padding: 10px; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: middle; }
.cart-table img { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; display: inline-block; margin-right: 8px; }
.cart-qty-input { width: 60px; }
.cart-summary { display: flex; justify-content: flex-end; align-items: center; gap: 1.5rem; margin-top: 1.5rem; }

.checkout-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
.checkout-layout form label { display: block; margin-bottom: 0.75rem; }
.checkout-layout input, .checkout-layout select, .checkout-layout textarea { width: 100%; padding: 8px; border: 1px solid var(--color-border); border-radius: 4px; }
.checkout-summary { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1rem; }
.checkout-summary__item { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.checkout-summary__item img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; }
.checkout-summary__row { display: flex; justify-content: space-between; margin-top: 0.5rem; }
.checkout-summary__total { font-size: 1.1rem; border-top: 1px solid var(--color-border); padding-top: 0.5rem; }

.order-success { background: #fff; border-radius: var(--radius); padding: 1.5rem; }
.order-totals div { margin: 0.25rem 0; }

.auth-form { max-width: 420px; margin: 0 auto; background: #fff; padding: 1.5rem; border-radius: var(--radius); }
.auth-form label { display: block; margin-bottom: 0.75rem; }
.auth-form input, .auth-form textarea { width: 100%; padding: 8px; border: 1px solid var(--color-border); border-radius: 4px; }
.form-error { color: #c91b22; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--color-muted); }

.cms-content img, .cms-content table, .cms-content iframe, .cms-content video { max-width: 100%; height: auto; }
.cms-content table { overflow-x: auto; display: block; }

@media (max-width: 860px) {
  .shop-layout, .product-detail, .checkout-layout { grid-template-columns: 1fr; }
}

/* =====================================================================
   MOBILE EXPERIENCE OVERHAUL (<= 860px)
   Desktop layout above this breakpoint is completely untouched — every
   selector below either targets a mobile-only element (added in
   includes/navbar.php / product.php / cart.php / admin templates) or
   hides/restyles existing elements *only* inside this query.
   ===================================================================== */
@media (max-width: 860px) {

  /* ---------- Elements hidden on mobile, shown on desktop ---------- */
  .site-header__row,      /* desktop header row (logo/search/icons) */
  .category-nav {         /* old top category strip -> moved into drawer */
    display: none;
  }

  /* ---------- Elements hidden on desktop, shown on mobile ---------- */
  .site-header__mobile-row,
  .search-form--mobile {
    display: flex;
  }

  /* ---------- Header ---------- */
  .site-header {
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 80;
  }

  .site-header__mobile-row {
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    gap: 0.5rem;
  }

  .mobile-menu-toggle {
    order: 1;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
  }
  .mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
  }

  .logo--mobile {
    order: 2;
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
  }
  .logo--mobile img { height: 32px; }

  .mobile-cart-icon {
    order: 3;
    flex: 0 0 auto;
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
  }
  .cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.65rem;
    line-height: 16px;
    text-align: center;
  }

  /* ---------- Mobile search bar (below header, above slider) ---------- */
  .search-form--mobile {
    padding: 0 0.85rem 0.65rem;
  }
  .search-form--mobile input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 0.95rem;
  }
  .search-form--mobile button {
    height: 44px;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
  }

  main { padding: 0.85rem; }

  /* ---------- Hero slider gets tighter corners on small screens ---------- */
  .hero-slider__overlay h2 { font-size: 1.2rem; }
  .hero-slider__overlay p { font-size: 0.85rem; }

  /* ---------- Round category section: horizontal scroll strip ---------- */
  .popular-categories h2 { font-size: 1.05rem; }
  .category-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0.9rem;
    padding: 0.25rem 0.1rem 0.6rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .category-grid::-webkit-scrollbar { height: 4px; }
  .category-tile {
    flex: 0 0 auto;
    width: 72px;
    scroll-snap-align: start;
  }
  .category-tile img { width: 56px; height: 56px; }
  .category-tile span {
    display: block;
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ---------- Product grid: clean 2-column layout everywhere ---------- */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }
  .product-card {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  .product-card h3 {
    font-size: 0.82rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.1em;
  }
  .product-card__price {
    flex-wrap: wrap;
    row-gap: 0.15rem;
    font-size: 0.85rem;
  }
  .price-was { font-size: 0.75rem; }
  .badge { font-size: 0.62rem; padding: 2px 6px; }
  .product-card__actions {
    margin-top: auto;
    padding-top: 0.5rem;
  }
  .product-card__actions .btn {
    flex: 1 1 calc(50% - 0.25rem);
    padding: 6px 4px;
    font-size: 0.72rem;
    text-align: center;
    white-space: nowrap;
  }
  .product-card__actions .js-toggle-wishlist {
    flex: 0 0 36px;
    padding: 6px 0;
  }

  .section-heading h2 { font-size: 1.05rem; }

  /* ---------- Generic overflow / responsiveness safety net ---------- */
  body { overflow-x: hidden; }
  table { max-width: 100%; }
  .table-scroll,
  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .cart-table, .details-table, .admin-table { min-width: 480px; }
  .newsletter form { flex-wrap: wrap; justify-content: center; }
  .newsletter input { width: 100%; }
  .footer-grid { text-align: left; }
  .cart-drawer { width: 100%; }

  /* ---------- Mobile off-canvas drawer menu ---------- */
  .drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 95;
    opacity: 0;
    transition: opacity 0.25s ease;
  }
  .drawer-backdrop.is-open { opacity: 1; }

  .mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 82%;
    max-width: 320px;
    background: #fff;
    z-index: 96;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.2);
  }
  .mobile-drawer.is-open { transform: translateX(0); }

  .mobile-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--color-primary);
    color: #fff;
    flex: 0 0 auto;
  }
  .mobile-drawer__title { font-weight: 600; }
  .mobile-drawer__close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
  }

  .mobile-drawer__body { overflow-y: auto; padding: 0.5rem 0 1.5rem; }
  .mobile-drawer__section { padding: 0.5rem 1rem 1rem; border-bottom: 1px solid var(--color-border); }
  .mobile-drawer__section:last-child { border-bottom: none; }
  .mobile-drawer__section h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-muted);
    margin: 0.5rem 0;
  }
  .mobile-drawer__section a {
    display: block;
    padding: 10px 4px;
    font-size: 0.95rem;
    border-bottom: 1px solid #f2f2f2;
  }
  .mobile-drawer__section a:last-child { border-bottom: none; }

  body.drawer-open { overflow: hidden; }

  /* ---------- Product page: sticky mobile Add to Cart / Buy Now bar ---------- */
  .pagetype-product { padding-bottom: 76px; }
  .mobile-sticky-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem calc(0.6rem + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
  }
  .mobile-sticky-actions .btn { flex: 1; text-align: center; padding: 12px; font-size: 0.95rem; }

  .product-detail { gap: 1rem; }
  .product-actions { flex-wrap: wrap; }
  .product-actions .btn { flex: 1 1 auto; }
  .thumbnail-row { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .thumbnail-row .thumb { flex: 0 0 auto; }
  #variant-select { width: 100%; margin-top: 4px; }
  .product-info > label { display: block; margin-bottom: 0.75rem; }
  .quantity-stepper input { width: 100%; }
  .checkout-coupon { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .checkout-coupon input { flex: 1 1 100%; }
  .pagination { flex-wrap: wrap; }

  /* ---------- Forms: full-width, no horizontal overflow ---------- */
  .checkout-layout input,
  .checkout-layout select,
  .checkout-layout textarea,
  .auth-form input,
  .auth-form textarea,
  .shop-filters input,
  .shop-filters select {
    font-size: 16px; /* prevents iOS auto-zoom on focus */
  }
}

@media (max-width: 860px) {
  .drawer-backdrop[hidden],
  .mobile-drawer[hidden] {
    display: none;
  }
  .drawer-backdrop:not([hidden]) { display: block; }
  .mobile-drawer:not([hidden]) { display: flex; }
  .mobile-sticky-actions { display: flex; }
}

@media (max-width: 480px) {
  .product-grid { gap: 0.5rem; }
  .product-card__actions .btn { font-size: 0.68rem; }
  .hero-slider__overlay { left: 4%; bottom: 6%; max-width: 70%; }
}

/* =====================================================================
   FINAL HEADER / RESPONSIVE OVERRIDES
   These rules intentionally use !important for the two mutually exclusive
   search forms so a stale/generic .search-form rule can never expose both.
   ===================================================================== */
.search-form--mobile { display: none !important; }
.site-header__mobile-row { display: none !important; }

.site-header__row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.site-header__row .logo { flex: 0 0 auto; }
.site-header__row .logo img { width: auto; height: 46px; max-width: 230px; object-fit: contain; }
.search-form--desktop { display: flex !important; flex: 1 1 auto; min-width: 0; }
.search-form--desktop input { min-width: 0; }
.header-icons { flex: 0 0 auto; }

.category-nav {
  align-items: center;
  min-height: 34px;
}

.popular-categories { margin-top: 2rem; }
.popular-categories h2 { margin: 0; }
.category-tile {
  display: block;
  color: var(--color-text);
}
.category-tile:hover { color: var(--color-primary); }
.category-tile img {
  background: #fff;
}

.mobile-drawer__brand img {
  display: block;
  width: auto;
  height: 32px;
  max-width: 190px;
  object-fit: contain;
}
.mobile-drawer__section a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.mobile-drawer__section a > span:last-child {
  color: var(--color-muted);
  font-size: 1.2rem;
  line-height: 1;
}

@media (max-width: 860px) {
  .site-header__row,
  .category-nav,
  .search-form--desktop {
    display: none !important;
  }

  .site-header__mobile-row {
    display: flex !important;
    min-height: 56px;
  }

  .search-form--mobile {
    display: flex !important;
    width: 100%;
    margin: 0;
    padding: 0 0.85rem 0.7rem;
  }

  .search-form--mobile input {
    width: 100%;
    min-width: 0;
  }

  .site-header {
    border-bottom: 1px solid var(--color-border);
  }

  main { padding-top: 0.75rem; }

  /* Categories belong below the hero on mobile and scroll horizontally. */
  .popular-categories {
    margin-top: 1.25rem;
    overflow: hidden;
  }
  .popular-categories h2 {
    margin-bottom: 0.65rem;
  }
  .category-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.75rem;
    overflow-x: auto !important;
    overflow-y: hidden;
    margin-top: 0;
    padding: 0.15rem 0.1rem 0.65rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .category-tile {
    flex: 0 0 82px !important;
    width: 82px !important;
  }
  .category-tile img {
    width: 68px !important;
    height: 68px !important;
    margin: 0 auto 0.4rem;
    border-radius: 50%;
    object-fit: cover;
  }
  .category-tile span {
    display: block;
    font-size: 0.72rem;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
  }

  .mobile-drawer {
    z-index: 1001;
  }
  .drawer-backdrop {
    z-index: 1000;
  }
  .cart-drawer {
    z-index: 1002;
  }
}


/* =====================================================================
   AUTHORITATIVE RESPONSIVE HEADER
   This block is intentionally last. It replaces conflicting legacy rules.
   ===================================================================== */

/* Desktop baseline: only desktop header/search/nav is visible. */
.site-header__mobile-row,
.search-form--mobile,
.mobile-drawer,
.drawer-backdrop { display: none; }
.site-header__row { display: flex; }
.search-form--desktop { display: flex; }
.category-nav { display: flex; }

@media screen and (max-width: 860px) {
  /* Never render the desktop header/search/category strip on mobile. */
  .site-header__row,
  .search-form--desktop,
  .category-nav {
    display: none !important;
  }

  /* Mobile header: menu | centered logo | cart */
  .site-header {
    position: relative;
    padding: 0 !important;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    z-index: 80;
  }

  .site-header__mobile-row {
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 7px 10px;
    gap: 4px;
  }

  .mobile-menu-toggle {
    grid-column: 1;
    width: 44px;
    height: 44px;
    margin: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
  }
  .mobile-menu-toggle span {
    display: block !important;
    width: 23px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
  }

  .logo--mobile {
    grid-column: 2;
    justify-self: center;
    width: 100%;
    max-width: 190px;
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
  .logo--mobile img {
    width: auto;
    height: 42px;
    max-width: 180px;
    object-fit: contain;
  }

  .mobile-cart-icon {
    grid-column: 3;
    justify-self: end;
    width: 44px;
    height: 44px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--color-text);
  }
  .mobile-cart-icon svg { width: 27px; height: 27px; }
  .mobile-cart-icon .cart-badge {
    top: 1px;
    right: 0;
    min-width: 17px;
    height: 17px;
    line-height: 17px;
    font-size: 10px;
  }

  /* Exactly one search field, immediately below mobile header. */
  .search-form--mobile {
    display: flex !important;
    width: 100%;
    padding: 0 10px 10px;
    margin: 0;
  }
  .search-form--mobile input {
    height: 44px;
    min-width: 0;
    width: 100%;
    padding: 0 13px;
    font-size: 16px;
    border-radius: 8px 0 0 8px;
  }
  .search-form--mobile button {
    flex: 0 0 54px;
    width: 54px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 8px 8px 0;
  }

  /* No category navigation above the hero on mobile. */
  main { padding: 10px; }

  /* Keep the hero fully inside the mobile viewport. */
  .hero-slider,
  .hero-slider__slide,
  .hero-slider__slide img {
    width: 100%;
    max-width: 100%;
  }
  .hero-slider__slide img {
    height: auto;
    object-fit: contain;
  }
  .hero-slider__overlay { display: none; }

  /* Round categories remain below the slider and are swipeable. */
  .popular-categories {
    margin-top: 18px;
    overflow: hidden;
  }
  .popular-categories h2 {
    font-size: 22px;
    margin: 0 0 12px;
  }
  .category-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100%;
    gap: 14px;
    margin: 0;
    padding: 2px 2px 10px;
    overflow-x: auto !important;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .category-grid::-webkit-scrollbar { display: none; }
  .category-tile {
    flex: 0 0 82px !important;
    width: 82px !important;
    min-width: 82px;
    text-align: center;
  }
  .category-tile img {
    display: block;
    width: 68px !important;
    height: 68px !important;
    margin: 0 auto 7px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--color-border);
    background: #fff;
  }
  .category-tile span {
    display: block;
    width: 100%;
    font-size: 12px;
    line-height: 1.25;
    white-space: normal;
    overflow: hidden;
  }

  /* Mobile drawer: categories only appear after tapping the hamburger. */
  .drawer-backdrop:not([hidden]) {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1000;
  }
  .mobile-drawer:not([hidden]) {
    display: flex !important;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(84vw, 340px);
    height: 100dvh;
    max-height: 100dvh;
    background: #fff;
    flex-direction: column;
    z-index: 1001;
    transform: translateX(-105%);
    transition: transform .25s ease;
    box-shadow: 4px 0 18px rgba(0,0,0,.2);
  }
  .mobile-drawer.is-open { transform: translateX(0); }
  .mobile-drawer__header {
    min-height: 62px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .mobile-drawer__close { font-size: 28px; }
  .mobile-drawer__body { overflow-y: auto; }
}

@media screen and (min-width: 861px) {
  .site-header__mobile-row,
  .search-form--mobile,
  .mobile-drawer,
  .drawer-backdrop { display: none !important; }
  .site-header__row,
  .search-form--desktop,
  .category-nav { display: flex !important; }
}


/* Floating WhatsApp contact button — visibility and number are admin-managed. */
.floating-whatsapp {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  transition: transform .18s ease, box-shadow .18s ease;
}
.floating-whatsapp svg { width: 24px; height: 24px; fill: currentColor; flex: 0 0 auto; }
.floating-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 11px 28px rgba(0,0,0,.23); color: #fff; }
.floating-whatsapp:focus-visible { outline: 3px solid rgba(37,211,102,.35); outline-offset: 3px; }
@media (max-width: 600px) {
  .floating-whatsapp { right: 14px; bottom: 14px; min-height: 50px; padding: 0 15px; }
  .floating-whatsapp span { display: none; }
  .floating-whatsapp svg { width: 27px; height: 27px; }
}
