/* Revuei Mobile UX Redesign (2026-11-26):
 * 1) Anti-wrap single-row mobile header with single seasonal pill
 * 2) Single-layer bottom bar on product pages (hide duplicate 5-tab bar)
 * 3) Direction-aware ergonomic scroll-hide animation for bottom bars
 */
@media (max-width: 599px) {
  /* 1. Single-row mobile appbar: REVUEI never wraps */
  .rv-mobile .rv-m-appbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    padding: 0 12px 0 10px !important;
    flex-wrap: nowrap !important;
  }
  .rv-mobile .rv-m-appbar-left,
  .rv-mobile .rv-m-appbar-right {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
  }
  .rv-mobile .rv-m-appbar-left {
    flex: 0 0 auto;
  }
  .rv-mobile .rv-m-appbar-right {
    flex: 0 0 auto;
    margin-left: auto;
  }
  .rv-mobile .rv-m-wordmark,
  .rv-mobile .rv-m-wordmark-small {
    white-space: nowrap !important;
    flex: 0 0 auto !important;
    font-size: 16px !important;
    letter-spacing: 0.16em !important;
    line-height: 1 !important;
    padding: 0 2px !important;
  }
  /* Option 1 (2026-11-26): Dual fine-line SVG icon + micro-label nav (42x44 each) */
  .rv-mobile .rv-m-appbar .rv-m-season-group {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    flex: 0 0 auto !important;
  }
  .rv-mobile .rv-m-appbar a.rv-m-season-item {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2.5px !important;
    width: 42px !important;
    min-width: 42px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 9px !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    text-decoration: none !important;
    line-height: 1 !important;
    flex: 0 0 auto !important;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  }
  .rv-mobile .rv-m-appbar a.rv-m-season-item .rv-m-season-ico {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
    flex: 0 0 auto !important;
    pointer-events: none !important;
    stroke: currentColor !important;
    color: inherit !important;
  }
  .rv-mobile .rv-m-appbar a.rv-m-season-item .rv-m-season-lbl {
    font-size: 9.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.03em !important;
    line-height: 1 !important;
    pointer-events: none !important;
    white-space: nowrap !important;
    color: inherit !important;
  }
  /* Light header colors */
  .rv-mobile .rv-m-appbar a.rv-m-season-bf {
    color: #171513 !important;
  }
  .rv-mobile .rv-m-appbar a.rv-m-season-xmas {
    color: #164030 !important;
  }
  .rv-mobile .rv-m-appbar a.rv-m-season-item:active {
    background: rgba(23, 21, 19, 0.06) !important;
  }
  /* Dark Black Friday header colors */
  body.rv-bf-v3-page .rv-mobile .rv-m-appbar a.rv-m-season-bf,
  body.rv-bf-v3-page .rv-mobile .rv-m-appbar a.rv-m-season-xmas {
    color: #D8D2C7 !important;
  }
  body.rv-bf-v3-page .rv-mobile .rv-m-appbar a.rv-m-season-bf[aria-current="page"] {
    color: #F0D597 !important;
    background: rgba(240, 213, 151, 0.12) !important;
    border-color: rgba(240, 213, 151, 0.36) !important;
  }
  body.rv-bf-v3-page .rv-mobile .rv-m-appbar a.rv-m-season-item .rv-m-season-ico {
    stroke: currentColor !important;
  }
  /* Dark Christmas header colors (overrides xmas-2026-v1.css svg stroke) */
  body.rv-xmas-v1-page .rv-mobile .rv-m-appbar a.rv-m-season-bf,
  body.rv-xmas-v1-page .rv-mobile .rv-m-appbar a.rv-m-season-xmas {
    color: #D8D2C7 !important;
  }
  body.rv-xmas-v1-page .rv-mobile .rv-m-appbar a.rv-m-season-xmas[aria-current="page"] {
    color: #DFC390 !important;
    background: rgba(223, 195, 144, 0.12) !important;
    border-color: rgba(223, 195, 144, 0.36) !important;
  }
  body.rv-xmas-v1-page .rv-mobile .rv-m-appbar a.rv-m-season-item .rv-m-season-ico {
    stroke: currentColor !important;
  }

  /* 2. Product page single-layer bottom bar: remove duplicate 5-tab stack */
  .rv-mobile.rv-m-product-page > .rv-m-tabs {
    display: none !important;
  }
  .rv-mobile.rv-m-product-page {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .rv-mobile.rv-m-product-page .rv-m-product-actions {
    bottom: 0 !important;
    height: auto !important;
    min-height: 60px !important;
    padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    box-shadow: 0 -6px 24px rgba(33, 24, 19, 0.08);
  }
  .rv-mobile.rv-m-product-page .rv-m-product-actions .rv-m-icon-button,
  .rv-mobile.rv-m-product-page .rv-m-product-actions > .rv-m-button {
    min-height: 44px !important;
  }
  /* Keep consent toast cleanly above single-layer bar on product pages */
  body:has(.rv-m-product-page) .rv-consent-mobile,
  body:has(.rv-m-product-page) .toast {
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  }

  /* 3. Direction-aware ergonomic scroll-hide animation (GPU transform) */
  .rv-mobile .rv-m-product-actions,
  .rv-mobile > .rv-m-tabs {
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease;
    will-change: transform;
  }
  body.rv-mbar-hidden .rv-mobile .rv-m-product-actions,
  body.rv-mbar-hidden .rv-mobile > .rv-m-tabs {
    transform: translate3d(0, calc(100% + 18px), 0) !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  @media (prefers-reduced-motion: reduce) {
    .rv-mobile .rv-m-product-actions,
    .rv-mobile > .rv-m-tabs {
      transition: none !important;
    }
  }
}
