/* Mobile header (≤900px) — u20261005.
   Five-slot grid: [menu][search] [logo] [cart][account]. The logo owns the middle column and
   shrinks to fit it, so icons can never sit on top of it (whatever moves the search icon).
   Icons are round 40px touch targets; badges are small pills; the bar turns compact + glassy on scroll. */
@media (max-width: 900px) {
  /* five fixed slots — the logo owns the middle one, so nothing can overlap it */
  .site-header .header-main {
    display: grid !important;
    grid-template-columns: 40px 40px minmax(0, 1fr) 40px 40px !important;
    grid-template-rows: auto !important;
    align-items: center !important;
    justify-content: stretch !important;
    column-gap: 4px !important;
    min-height: 60px;
    padding-left: 10px !important;
    padding-right: 10px !important;
    position: relative;
    transition: min-height .2s ease;
  }
  .site-header .header-main > .header-left,
  .site-header .header-main > .header-icons { display: contents !important; }
  .site-header .header-search,
  .site-header .header-icons .header-phone,
  .site-header .header-icons .wishlist-icon-btn { display: none !important; }   /* search box, phone & wishlist live in the bottom bar / chat */
  .site-header .mobile-menu-btn { grid-column: 1; grid-row: 1; }
  .site-header .header-search-icon { grid-column: 2; grid-row: 1; }
  .site-header .header-icons [data-action="cart"] { grid-column: 4; grid-row: 1; }
  .site-header #authTriggerBtn,
  .site-header .hdr-user { grid-column: 5; grid-row: 1; justify-self: center; }
  .site-header .header-main > .site-logo {
    grid-column: 3; grid-row: 1; justify-self: center;
    position: static !important; left: auto !important; transform: none !important; margin: 0 !important;
    display: flex; align-items: center; justify-content: center;
    min-width: 0; max-width: 100% !important;
    line-height: 0;
  }
  .site-header .site-logo-img {
    max-width: 100% !important;
    width: auto; height: auto;
    object-fit: contain;
    transition: transform .2s ease;
    transform-origin: center;
  }
  .site-header .site-logo .logo-text {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 100%; line-height: 1.2;
  }

  /* round touch targets */
  .site-header .mobile-menu-btn,
  .site-header .header-search-icon,
  .site-header .header-icons .icon-btn {
    width: 40px !important; height: 40px !important; min-width: 0 !important; padding: 0 !important;
    border-radius: 50% !important; border: 0; background: transparent;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.1rem !important; color: inherit;
    position: relative; flex: 0 0 40px;
    transition: background-color .15s ease, transform .15s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .site-header .mobile-menu-btn:active,
  .site-header .header-search-icon:active,
  .site-header .header-icons .icon-btn:active { transform: scale(.92); background: rgba(127, 127, 127, .18); }
  @media (hover: hover) {
    .site-header .mobile-menu-btn:hover,
    .site-header .header-search-icon:hover,
    .site-header .header-icons .icon-btn:hover { background: rgba(127, 127, 127, .14); }
  }

  /* hamburger: two-length lines, reads lighter */
  .site-header .mobile-menu-btn { flex-direction: column; gap: 5px; }
  .site-header .mobile-menu-btn span { display: block; height: 2px; border-radius: 2px; background: currentColor; margin: 0 !important; transition: width .2s ease; }
  .site-header .mobile-menu-btn span:nth-child(1) { width: 20px; }
  .site-header .mobile-menu-btn span:nth-child(2) { width: 14px; margin-right: 6px !important; }
  .site-header .mobile-menu-btn span:nth-child(3) { width: 20px; }

  /* badges: small pill pinned to the icon's corner */
  .site-header .header-icons .icon-btn .badge {
    position: absolute; top: 3px; right: 1px; left: auto;
    min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
    font-size: 10px; font-weight: 700; line-height: 17px; text-align: center;
    background: var(--color-gold, #c9a227); color: #fff;
    box-shadow: 0 0 0 2px var(--header-bg, #fff);
    transform: none;
  }

  /* signed-in avatar */
  .site-header .hdr-user-btn .hdr-user-av { width: 30px; height: 30px; font-size: 12px; }

  /* compact + glass when scrolled (main.js adds .scrolled) */
  .site-header.scrolled .header-main { min-height: 52px; }
  .site-header.scrolled .site-logo-img { transform: scale(.88); }
  .site-header.scrolled {
    box-shadow: 0 6px 24px rgba(0, 0, 0, .10);
  }
  @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .site-header.scrolled { -webkit-backdrop-filter: saturate(160%) blur(10px); backdrop-filter: saturate(160%) blur(10px); }
  }
}
@media (max-width: 360px) {
  .site-header .header-main { grid-template-columns: 38px 38px minmax(0, 1fr) 38px 38px !important; column-gap: 2px !important; padding-left: 6px !important; padding-right: 6px !important; }
  .site-header .mobile-menu-btn, .site-header .header-search-icon, .site-header .header-icons .icon-btn { width: 38px !important; height: 38px !important; flex-basis: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header .header-main, .site-header .site-logo-img, .site-header .mobile-menu-btn span { transition: none !important; }
}

/* ============================================================
   Product cards on phones (u20261005)
   - grids run almost edge to edge (6px) with tight 8px gutters
   - the old (struck-through) price drops onto its own line
   - card "Add to Cart" buttons are hidden — tap the card / quick view to buy
     (the cart drawer's "You may also like" keeps its buttons)
   ============================================================ */
@media (max-width: 768px) {
  #shopProductsGrid { margin-left: -14px !important; margin-right: -14px !important; gap: 8px !important; column-gap: 8px !important; row-gap: 10px !important; }
  .hpprod-outer { margin-left: -14px !important; margin-right: -14px !important; }
  .pdp-related { padding-left: 0 !important; padding-right: 0 !important; }
  .pdp-related .pdp-car-track { gap: 8px !important; }

  .product-card:not(.cart-rec-list .product-card) .product-prices { flex-direction: column !important; align-items: flex-start !important; gap: 1px !important; }
  .product-card:not(.cart-rec-list .product-card) .price-current { white-space: nowrap; }
  .product-card:not(.cart-rec-list .product-card) .price-old { margin-left: 0 !important; font-size: .78em; }

  .product-card:not(.cart-rec-list .product-card, .te-home .product-card, [data-te-own] .product-card, .te-own) .product-img-cart,
  .product-card:not(.cart-rec-list .product-card, .te-home .product-card, [data-te-own] .product-card, .te-own) .add-to-cart-btn { display: none !important; }   /* 1.83: theme cards decide */

  .product-card .product-badges { gap: 4px; }
  .product-card .product-badges > span { font-size: .58rem !important; padding: 3px 7px !important; }
}

/* ============================================================
   Phones (u20261005): compact category / collection banner + uncropped quick-view photo
   ============================================================ */
@media (max-width: 768px) {
  /* banner with breadcrumb: slim strip — the slider keeps running behind it */
  .shop-breadcrumb-section.has-banner { padding: 14px 0 18px !important; min-height: 0 !important; height: auto !important; }
  .shop-breadcrumb-section.has-banner .container { padding-left: 14px !important; padding-right: 14px !important; }
  .shop-breadcrumb-section .shop-breadcrumb { font-size: 11px !important; margin: 0 0 4px !important; }
  .shop-breadcrumb-section .shop-hero-text h1 { font-size: 1.3rem !important; line-height: 1.2 !important; margin: 0 0 2px !important; }
  .shop-breadcrumb-section .shop-hero-text p { font-size: 12px !important; line-height: 1.4 !important; margin: 0 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .shop-breadcrumb-section .coll-hero-nav,
  .shop-breadcrumb-section .coll-hero-dots { display: none !important; }   /* no arrows / dots on phones — the banner slides on its own */

  /* quick view: show the whole photo (portrait products were cut to a 16:10 strip) */
  .qv-img-main { aspect-ratio: 3 / 4 !important; height: auto !important; max-height: 52vh; background: var(--color-bg-2, #f5f1ea); }
  .qv-img-main #qvMainImage, .qv-img-main > img { width: 100% !important; height: 100% !important; object-fit: contain !important; }
}

/* Quick view (phones): Description / Delivery & Return as a horizontal tab bar above the text
   (the mobile rule made the wrap a flex ROW, so the tabs stood as a column beside the text) */
@media (max-width: 768px) {
  .qv-tabs-wrap { flex-direction: column !important; }
  .qv-tabs-nav { display: flex !important; flex-direction: row !important; width: 100% !important; overflow-x: auto; scrollbar-width: none; }
  .qv-tabs-nav::-webkit-scrollbar { display: none; }
  .qv-tab-btn { flex: 1 1 0 !important; width: auto !important; white-space: nowrap; padding: 12px 10px !important; border-bottom: 2px solid transparent !important; border-right: 0 !important; }
  .qv-tab-btn.active { border-bottom-color: var(--color-gold, #c9a227) !important; }
  .qv-tab-panels { width: 100% !important; }
}

/* ============================================================
   Phones (u20261005): no sideways scrolling, clean cart / checkout / review / account
   ============================================================ */
@media (max-width: 768px) {
  /* nothing may push the page wider than the screen (blank strip on the right) */
  html, body { max-width: 100%; overflow-x: clip; }
  html body .acct-wrap > *, html body .acct-two > *, html body .acct-main, html body .acct-sec,
  html body .cart-grid > *, html body .co-grid2 > * { min-width: 0; }

  /* buttons: the whole button reacts, not only its text / icon */
  html body .co-continue *, html body .co-place *, html body .sf-btn *, html body .asx-btn *, html body .acct-btn * { pointer-events: none; }
  html body .co-continue, html body .co-place, html body .sf-btn { position: relative; z-index: 1; touch-action: manipulation; }

  /* ---------- Shopping cart page ---------- */
  html body .sfpage { padding: 12px 8px 96px; }
  html body .sfh1 { font-size: 24px; margin: 0 0 2px; }
  html body .sfsub { font-size: 12px; margin: 0 0 12px; }
  html body .cart-grid { gap: 12px; }
  html body .cart-items { display: flex; flex-direction: column; gap: 8px; }
  html body .cart-row { grid-template-columns: 70px minmax(0, 1fr) auto; grid-template-areas: "img info rm" "img qty line"; align-items: start; gap: 6px 10px; padding: 8px; border-radius: 10px; }
  html body .cart-row > img { grid-area: img; width: 70px; height: 88px; border-radius: 8px; }
  html body .cart-row .ci-info { grid-area: info; min-width: 0; }
  html body .cart-row .ci-t { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  html body .cart-row .ci-v { flex-wrap: wrap; gap: 4px 8px; margin-top: 2px; }
  html body .cart-row .ci-p { font-size: 12px; margin-top: 2px; color: #8a8175; }
  html body .cart-row .ci-qty { grid-area: qty; justify-self: start; align-self: end; border-width: 1px; }
  html body .cart-row .ci-qty button { width: 30px; height: 30px; }
  html body .cart-row .ci-qty .q { min-width: 26px; }
  html body .cart-row .ci-line { grid-area: line; align-self: end; justify-self: end; min-width: 0; font-size: 14px; }
  html body .cart-row .ci-rm { grid-area: rm; width: 28px; height: 28px; margin: -4px -4px 0 0; }
  html body .cart-summary { position: static; padding: 14px 12px; border-radius: 12px; }
  html body .cart-summary h3 { font-size: 17px; margin: 0 0 8px; }

  /* ---------- Checkout · Review & Pay (one flat card per section, no box-in-box) ---------- */
  html body .cochk { padding: 10px 8px 96px; }
  html body .co-steps { padding: 10px 4px; margin: 0 0 10px; border-radius: 12px; box-shadow: none; }
  html body .co-step { width: auto; flex: 0 0 auto; padding: 0 2px; }
  html body .co-step .n { width: 32px; height: 32px; font-size: 12px; }
  html body .co-step .l { font-size: 10px; margin-top: 6px; }
  html body .co-bar { margin-top: 15px; min-width: 14px; }
  html body .co-grid2 { gap: 10px; }
  html body .co-card { border: 0; border-radius: 12px; box-shadow: none; padding: 12px; }
  html body .co-card:has(> .co-sec-h), html body .co-card:has(> .co-sum), html body .co-card:has(> .co-opts) { padding: 0; }
  html body .co-card h2, html body .co-sec-h h2, html body .co-sum h2 { font-size: 17px; }
  html body .co-card > h2 { margin: 0 0 10px; }
  html body .co-sec-h { padding: 12px 12px 2px; }
  html body .co-opts { padding: 2px 12px 12px; }
  html body .co-opt { gap: 10px; padding: 10px; border-width: 1px; border-radius: 10px; margin-top: 8px; box-shadow: none; }
  html body .co-opt.sel { box-shadow: none; }
  html body .co-ico { width: 32px; height: 32px; font-size: 14px; border-radius: 8px; }
  html body .co-opt-main .t { font-size: 13.5px; }
  html body .co-opt-right .tm { display: none; }
  html body .coi { grid-template-columns: 58px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; }
  html body .coi-img { width: 58px; height: 72px; border-radius: 8px; }
  html body .coi-t { font-size: 13px; }
  html body .co-free { margin: 8px 12px 2px; padding: 10px 12px; }
  html body .co-trust { margin: 10px 12px 12px; padding-top: 10px; }
  html body .co-sum { padding: 2px 12px 12px; }
  html body .co-sum h2 { margin: 10px 0 8px; }
  html body .co-secure { padding: 0 12px 10px; }
  html body .co-continue, html body .co-place { padding: 14px; border-radius: 10px; margin-top: 12px; }
  html body .rv-addrbook { border: 0; padding: 0; background: none; margin-bottom: 12px; }
  html body .rv-ab-head { margin-bottom: 8px; }
  html body .rv-ab-add { padding: 6px 10px; white-space: nowrap; }
  html body .rv-addr { padding: 10px 10px 10px 34px; border-width: 1px; box-shadow: none; }
  html body .rv-addr .rv-radio { left: 11px; top: 12px; }
  html body .rv-addr.sel { box-shadow: none; }
  html body .rv-signed { margin: 0 0 10px; }
  html body .otp-card { padding: 22px 16px; border-radius: 14px; box-shadow: none; }

  /* ---------- My Account: orders as cards, success panel ---------- */
  html body .acct-orow { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 10px; margin-top: 8px; border: 1px solid #efe7d9; border-radius: 12px; background: #fff; }
  html body .acct-orow:last-child { border-bottom: 1px solid #efe7d9; }
  html body .acct-othumb { width: 50px; height: 50px; }
  html body .acct-otitle { white-space: normal; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  html body .acct-osub { font-size: 11px; }
  html body .acct-oright { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
  html body .acct-pcard { align-items: flex-start; gap: 10px; padding: 10px; border-radius: 12px; }
  html body .acct-pthumb { flex: 0 0 auto; }
  html body .acct-ptitle { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  html body .acct-psub { font-size: 11px; }
  html body .acct-pright { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; white-space: normal; }
  html body .acct-pamt { font-size: 14px; }
  html body .acct-success { flex-direction: column; gap: 8px; padding: 14px; margin-bottom: 12px; }
  html body .asx-ic { font-size: 24px; line-height: 1; }
  html body .asx-body { min-width: 0; }
  html body .asx-body h3 { font-size: 15px; }
  html body .asx-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 12px; }
  html body .asx-meta > span { min-width: 0; overflow-wrap: anywhere; }
  html body .asx-meta b { display: block; font-size: 11px; }
  html body .asx-btn { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 11px; border-radius: 10px; }
  html body .acct-card { padding: 12px; border-radius: 12px; }
  html body .acct-daline { overflow-wrap: anywhere; }
}

/* Closed side drawers sit just off the right edge — their shadow leaked in as a grey strip
   (the "blank space on the right"). Shadow only while open. (u20261005) */
.cart-sidebar:not(.open), .wishlist-sidebar:not(.open), .sfad-drawer:not(.open), .sidebar-drawer:not(.open) { box-shadow: none !important; }

/* Product code shown beside the item name (cart page, cart drawer, checkout, review) — u20261005 */
.sf-pcode { display: inline-block; vertical-align: 1px; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: #f3eee6; color: #7a6e60; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; line-height: 1.5; white-space: nowrap; font-family: var(--font-body, inherit); }

/* Phones: checkout process + My Account — cards run edge to edge with no border; the card itself
   adds no padding where its sections already pad their content (u20261006) */
@media (max-width: 768px) {
  html body .cochk { padding-left: 0; padding-right: 0; }
  html body .co-steps { border-left: 0; border-right: 0; border-radius: 0; }
  html body .co-card { border: 0; border-radius: 0; }
  html body .co-card:has(> .co-sec-h), html body .co-card:has(> .co-sum), html body .co-card:has(> .co-opts) { padding: 0; }
  html body .co-grid2 { gap: 8px; }
  html body .co-empty { border: 0; border-radius: 0; }

  html body .acct { padding-left: 0; padding-right: 0; }
  html body .acct-side, html body .acct-hero, html body .acct-card, html body .acct-success { border: 0; border-radius: 0; box-shadow: none; }
  html body .acct-h1 { padding: 0 12px; }
  html body .acct-mtabs { margin-left: 0; margin-right: 0; padding-left: 12px; padding-right: 12px; }
  html body .acct-statgrid, html body .acct-stats { padding: 0 8px; }
  html body .acct-two { gap: 8px; }
  html body .acct-sec > *:not(.acct-card):not(.acct-hero):not(.acct-success):not(.acct-statgrid):not(.acct-stats):not(.acct-two):not(.acct-h1):not(.acct-cb-row) { margin-left: 12px; margin-right: 12px; }
}

/* Product page (phones): Description / Delivery & Return / Additional Info / Check Availability as a
   one-line tab bar you swipe left-right; the content box runs almost edge to edge (u20261006) */
@media (max-width: 768px) {
  html body .pdp-tabs { padding: 0; margin: 22px -10px 0; }
  html body .pdp-tabs--tabs .pdp-tabnav { flex-wrap: nowrap; gap: 0; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-snap-type: x proximity; padding: 0 4px; border-bottom-width: 1px; -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); }
  html body .pdp-tabs--tabs .pdp-tabnav::-webkit-scrollbar { display: none; }
  html body .pdp-tabs--tabs .pdp-tab { flex: 0 0 auto; width: auto; white-space: nowrap; padding: 11px 13px; font-size: 13px; gap: 6px; scroll-snap-align: start; }
  html body .pdp-tabs--tabs .pdp-tab i { font-size: 12px; }
  html body .pdp-tabs--tabs .pdp-tabpanes { padding: 14px 12px; border-left: 0; border-right: 0; border-radius: 0; }
  html body .pdp-tabs--list .pdp-panebody, html body .pdp-tabs--accordion .pdp-panebody { padding-left: 12px; padding-right: 12px; }
  html body .pdp-tabs--list .pdp-panehead, html body .pdp-tabs--accordion .pdp-panehead { padding: 13px 12px; }
  html body .pdp-tabs--list .pdp-tabpane, html body .pdp-tabs--accordion .pdp-tabpane { border-radius: 10px; }
  html body .pdp-spec th { width: auto; padding: 8px 10px; }
  html body .pdp-spec td { padding: 8px 10px; }
}

/* Mobile menu: logo row + Track Order / Store Locator quick links (u20261006) */
.sidebar-drawer .sidebar-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sidebar-drawer .sidebar-logo { display: flex; align-items: center; min-width: 0; }
.sidebar-drawer .sidebar-quick { margin-top: 10px; padding-top: 10px; border-top: 6px solid var(--color-bg-2, #f6f1ea); }
.sidebar-drawer .sidebar-quick-link { display: flex !important; align-items: center; justify-content: flex-start !important; gap: 12px; font-weight: 600; }
.sidebar-drawer .sidebar-quick-link i { width: 20px; text-align: center; color: var(--color-gold, #c9a227); font-size: 15px; }
