/* =====================================================================
   LIVE DELIVERY  -  Responsive refinements
   Breakpoints verified for 320 / 360 / 375 / 390 / 414 / 430 /
   768 / 820 / 912 / 1024 / 1280 / 1366 / 1440 / 1600 / 1920
   ===================================================================== */

/* -------------------------- 320px base ----------------------------- */
@media (max-width: 359.98px) {
  .wrap { padding-inline: 14px; }
  .cats-scroll, .rail, .chips, .hero-track { margin-inline: -14px; padding-inline: 14px; }
  .grid-products { gap: 10px; }
  .p-card__body { padding: 10px 10px 12px; }
  .p-card__name { font-size: 13.5px; }
  .p-card__price strong { font-size: 16px; }
  .add-btn { width: 34px; height: 34px; }
  .add-btn svg { width: 17px; height: 17px; }
  .brand__text b { font-size: 14.5px; }
  .brand__mark { width: 34px; height: 34px; }
  .icon-btn { width: 38px; height: 38px; }
  .cart-btn { height: 38px; padding: 0 13px; }
  .cat__ring { width: 66px; height: 66px; }
  .cat { width: 76px; }
  .hero-slide__body { padding: 17px 16px; width: 66%; }
  .hero-title { font-size: 23px; }
  .section-title { font-size: 18.5px; }
  .float-cart { left: 8px; right: 8px; padding-left: 14px; }
  .float-cart__total { font-size: 15.5px; }
  .float-cart__go { padding: 0 15px; font-size: 12.5px; }
  .pdp-title { font-size: 21px; }
  .pdp-price strong { font-size: 27px; }
  .cart-item { grid-template-columns: 64px 1fr; gap: 11px; padding: 11px; }
  .cart-item__img { width: 64px; height: 64px; }
}

/* ------------------------ 360px - 430px ---------------------------- */
@media (min-width: 360px) and (max-width: 429.98px) {
  .hero-slide { min-height: 200px; }
}

@media (min-width: 414px) {
  .wrap { padding-inline: 20px; }
  .cats-scroll, .rail, .chips, .hero-track { margin-inline: -20px; padding-inline: 20px; }
}

/* ---------------------------- 430px+ -------------------------------- */
@media (min-width: 430px) {
  .hero-slide { min-height: 212px; }
}

/* ---------------------------- Tablet ------------------------------- */
@media (min-width: 768px) {
  .section { padding-block: 34px; }
  .wrap { padding-inline: 28px; }
  .cats-scroll, .rail, .chips, .hero-track { margin-inline: 0; padding-inline: 0; }
  :root { --hero-h: 380px; }

  .float-cart {
    left: auto;
    right: 24px;
    bottom: 24px;
    min-width: 330px;
    padding: 10px 10px 10px 20px;
  }

  .toast-stack { bottom: 104px; }
}

@media (min-width: 820px) {
  :root { --hero-h: 360px; }
}

/* ---------------------------- Laptop ------------------------------- */
@media (min-width: 992px) {
  :root { --header-h: 76px; }

  .desk-nav { display: flex; }
  .header-search { display: block; }

  /* from here up the header search is visible, so the big search bar
     above the hero would be a duplicate - drop it (and its padding). */
  .home-search { display: none; }

  .cart-btn__label { display: inline; }
  .cart-btn { padding: 0 8px 0 18px; }
  .hero-track { position: relative; }

  /* arrows + dots sit over the bottom of the hero on large screens */
  .hero-nav {
    position: absolute;
    inset: auto 0 0 0;
    margin: 0;
    padding: 0 24px 20px;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    pointer-events: none;
    z-index: 5;
  }
  .hero-nav > * { pointer-events: auto; }
  .hero-dots { display: flex; }
  .hero-dots button {
    background: rgba(255, 255, 255, .5);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  }
  .hero-dots button:hover { background: var(--gold); }
  .hero-dots button.is-active { background: var(--gold); }
  .hero-arrow {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .38);
    color: #fff;
    backdrop-filter: blur(6px);
  }
  .hero-arrow:hover { background: var(--gold); border-color: var(--gold); color: var(--burgundy); }

  .section { padding-block: 40px; }

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

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

@media (min-width: 1200px) {
  .grid-products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  :root { --hero-h: 420px; }
}

/* ---------------------------- Desktop ------------------------------ */
@media (min-width: 1366px) {
  .wrap { padding-inline: 36px; }
  .hero-title { font-size: 48px; }
}

@media (min-width: 1440px) {
  :root { --maxw: 1360px; }
  .grid-products { gap: 22px; }
  .p-card__media { aspect-ratio: 1 / 1; }
}

@media (min-width: 1600px) {
  :root { --maxw: 1440px; }
}

@media (min-width: 1920px) {
  :root { --maxw: 1560px; }
  body { font-size: 16px; }
  .grid-products { gap: 26px; }
}

/* -------------------- Reduced motion / a11y ----------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-contrast: more) {
  .p-card, .panel, .summary, .receipt, .cart-item { box-shadow: 0 0 0 2px var(--ink); }
  .p-card__desc, .section-sub, .pdp-desc { color: #3A3532; }
}

/* ---------------------------- Print -------------------------------- */
@media print {
  .site-header, .bottom-nav, .float-cart, .site-footer,
  .toast-stack, .pdp-actions, .drawer { display: none !important; }
  body { background: #fff; padding: 0; }
  .panel, .receipt, .summary { box-shadow: none; border: 1px solid #ccc; }
}

/* ---------------------- Admin responsive -------------------------- */
@media (max-width: 991.98px) {
  .admin-shell { flex-direction: column; }
  .admin-side {
    position: fixed;
    inset: 0 auto 0 0;
    width: 262px;
    z-index: 1200;
    transform: translateX(-102%);
    transition: transform .3s var(--ease);
    box-shadow: var(--sh-lg);
  }
  .admin-side.is-open { transform: translateX(0); }
  .admin-scrim {
    position: fixed;
    inset: 0;
    background: rgba(29, 29, 29, .45);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--ease), visibility .3s;
  }
  .admin-scrim.is-open { opacity: 1; visibility: visible; }
  .admin-main { width: 100%; }
  .admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-table { min-width: 720px; }
  .admin-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* notification bar stacks on small screens */
  .notify-bar { align-items: flex-start; }
  .notify-bar__actions { margin-left: 0; width: 100%; }
  .notify-toggle { flex: 1; justify-content: center; }
}

@media (max-width: 640px) {
  .notify-bar__actions .notify-toggle--link { display: none; }
  .order-alerts {
    max-width: 100%;
    left: 0;
    padding: 12px;
    bottom: 0;
  }
  .order-alert__foot { flex-direction: column; }
}

@media (min-width: 992px) {
  .admin-scrim { display: none; }
  .admin-toggle { display: none !important; }
}

/* ------------------------ Reduced density -------------------------- */
@media (min-width: 992px) and (max-width: 1279px) {
  .admin-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}