* { -webkit-tap-highlight-color: transparent; }
:root { --ease: cubic-bezier(.22, 1, .36, 1); }
body {
  background-color: #F4F6F9;
  background-image: radial-gradient(at 0% 0%, rgba(255, 153, 0, 0.04) 0px, transparent 50%),
                    radial-gradient(at 100% 0%, rgba(0, 113, 133, 0.04) 0px, transparent 50%);
  color: #0F172A;
  font-family: 'Manrope', sans-serif !important;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
h1, h2, h3, .font-display { font-family: 'Sora', sans-serif; letter-spacing: -0.025em; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #F3F4F6; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.bg-amzNavy { background-color: #0B111E !important; }
.bg-amzSubnav { background-color: #151F32 !important; }
.bg-amzAmber { background-color: #FF9900 !important; }
.bg-amzYellow { background-color: #FFD814 !important; }
.bg-amzOrange { background-color: #FFA41C !important; }
.bg-amzBlue { background-color: #007185 !important; }
.bg-amzRed { background-color: #CC0C39 !important; }
.bg-amzGreen { background-color: #067D62 !important; }
.bg-amzTint { background-color: #FEF8EC !important; }
.text-amzNavy { color: #0B111E !important; }
.text-amzAmber { color: #FF9900 !important; }
.text-amzBlue { color: #007185 !important; }
.text-amzRed { color: #CC0C39 !important; }
.text-amzGreen { color: #067D62 !important; }

.amz-shadow { box-shadow: 0 2px 10px -3px rgba(15, 23, 42, 0.06); }
.product-card-hover { transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease); }
.product-card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px rgba(255, 153, 0, .55), 0 16px 36px -10px rgba(255, 153, 0, .35) !important;
}

.card {
  background-color: #ffffff;
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 2px 10px -3px rgba(15, 23, 42, 0.05), 0 1px 3px -1px rgba(15, 23, 42, 0.03);
  transition: transform .24s var(--ease), box-shadow .24s var(--ease), border-color .24s var(--ease);
}
.card-interactive:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 153, 0, 0.45);
  box-shadow: 0 16px 32px -12px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(255, 153, 0, 0.25);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.5rem 1.1rem; border-radius: 0.75rem;
  background: linear-gradient(180deg, #FFE144 0%, #FFD000 100%);
  border: 1px solid #E6B800; color: #0B111E;
  font-weight: 800; font-size: 0.75rem; line-height: 1rem;
  cursor: pointer; transition: all .2s var(--ease);
  box-shadow: 0 1px 2px rgba(11, 17, 30, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  position: relative; overflow: hidden;
}
.btn:hover {
  background: linear-gradient(180deg, #FFD814 0%, #F2B900 100%);
  box-shadow: 0 6px 16px -4px rgba(255, 153, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
}
.btn2 {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.5rem 1.05rem; border-radius: 0.75rem;
  background-color: #ffffff; border: 1px solid #E2E8F0; color: #334155;
  font-weight: 700; font-size: 0.75rem; line-height: 1rem;
  cursor: pointer; transition: all .2s var(--ease);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.btn2:hover {
  background-color: #F8FAFC; border-color: #CBD5E1; color: #0F172A;
  transform: translateY(-1px);
}
.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.5rem 1.1rem; border-radius: 0.75rem;
  background: linear-gradient(180deg, #E11D48 0%, #BE123C 100%);
  border: 1px solid #9F1239; color: #ffffff;
  font-weight: 800; font-size: 0.75rem; line-height: 1rem;
  cursor: pointer; transition: all .2s var(--ease);
  box-shadow: 0 4px 12px -2px rgba(225, 29, 72, 0.35);
}
.btn-danger:hover:not(:disabled) {
  background: linear-gradient(180deg, #F43F5E 0%, #E11D48 100%);
  box-shadow: 0 6px 18px -2px rgba(225, 29, 72, 0.5);
  transform: translateY(-1px);
}
.btn-danger:disabled {
  opacity: 0.38; cursor: not-allowed; box-shadow: none; transform: none;
}

.inp {
  width: 100%; border: 1px solid #CBD5E1; border-radius: 0.75rem;
  padding: 0.575rem 0.85rem; font-size: 0.875rem; line-height: 1.25rem;
  background-color: #F8FAFC; color: #0F172A;
  transition: box-shadow .18s, border-color .18s, background-color .18s;
}
.inp:focus {
  outline: none; background-color: #ffffff; border-color: #FF9900;
  box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.2);
}

/* Custom Executive Toggle Switch */
.toggle-switch {
  appearance: none; -webkit-appearance: none;
  width: 2.75rem; height: 1.5rem;
  background-color: #CBD5E1; border-radius: 9999px;
  position: relative; cursor: pointer;
  transition: background-color 0.25s var(--ease);
  flex-shrink: 0;
}
.toggle-switch::after {
  content: ""; position: absolute;
  top: 2px; left: 2px;
  width: 1.25rem; height: 1.25rem;
  border-radius: 50%; background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s var(--ease);
}
.toggle-switch:checked { background-color: #067D62; }
.toggle-switch:checked::after { transform: translateX(1.25rem); }

/* Motion & Keyframes */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes float { 50% { transform: translateY(-9px) rotate(-1.5deg); } }
@keyframes aurora { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes drift { to { transform: translate(-90px, 70px) scale(1.2); } }
@keyframes drift2 { to { transform: translate(110px, -60px) scale(1.25); } }
@keyframes bump { 40% { transform: scale(1.55); } }
@keyframes sweep { to { transform: translateX(130%); } }

.hero-fx { background: linear-gradient(115deg, #0B111E, #162235, #1D2B42, #121C2D, #0B111E) !important; background-size: 300% 300%; animation: aurora 18s ease infinite; }
.hero-fx::before { content: ""; position: absolute; width: 440px; height: 440px; right: -90px; top: -140px; background: radial-gradient(closest-side, rgba(255, 153, 0, .4), transparent); filter: blur(22px); animation: drift 10s ease-in-out infinite alternate; pointer-events: none; }
.hero-fx::after { content: ""; position: absolute; width: 380px; height: 380px; left: -100px; bottom: -170px; background: radial-gradient(closest-side, rgba(0, 168, 225, .3), transparent); filter: blur(24px); animation: drift2 12s ease-in-out infinite alternate; pointer-events: none; }
.hero-fx > * { position: relative; z-index: 1; }
.float-y { animation: float 6s ease-in-out infinite; }
.stagger > * { animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
button, a { transition: transform .18s var(--ease), background-color .2s, box-shadow .2s, border-color .2s; }
button:active:not(:disabled) { transform: scale(.96); }
button[class*="bg-amzYellow"], button[class*="bg-amzOrange"], a[class*="bg-amzYellow"], .btn { position: relative; overflow: hidden; }
button[class*="bg-amzYellow"]::after, button[class*="bg-amzOrange"]::after, a[class*="bg-amzYellow"]::after, .btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%); transform: translateX(-130%); pointer-events: none; }
button[class*="bg-amzYellow"]:hover::after, button[class*="bg-amzOrange"]:hover::after, a[class*="bg-amzYellow"]:hover::after, .btn:hover::after { animation: sweep .75s var(--ease); }
#cartDrawer, #wishlistDrawer { transition-duration: .5s !important; transition-timing-function: var(--ease) !important; }
.fixed.inset-0:not(.hidden) > div, #dlg > div { animation: pop .32s var(--ease); }
#toastContainer > div { animation: toastIn .42s var(--ease); }
.bump { animation: bump .4s var(--ease); }
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #FF9900, #00A8E1, #FFD814); z-index: 70; pointer-events: none; transition: transform .25s ease, opacity .25s ease; }
header.sticky::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, #FF9900, #00A8E1, #FF9900, transparent); background-size: 200% 100%; animation: aurora 6s linear infinite; pointer-events: none; }
#cartCountBadge { box-shadow: 0 0 10px rgba(255, 153, 0, .85); }
#countdownTimer { text-shadow: 0 0 14px rgba(255, 153, 0, .8); }
.field-err { border-color: #CC0C39 !important; box-shadow: 0 0 0 3px rgba(204, 12, 57, .15); }
label:has(input[name=payMethod]:checked) { border-color: #FF9900 !important; background: #FEF8EC; }
.flt-on { color: #007185 !important; font-weight: 700; }
:focus-visible { outline: 2px solid #FF9900; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; } }

/* ===== Filter buttons + dropdown / bottom-sheet ===== */
.flt-wrap { position: relative; }
.flt-btn {
  display: inline-flex; align-items: center; gap: .4rem; max-width: 100%;
  padding: .45rem .8rem; border-radius: .75rem; background: #fff;
  border: 1px solid #E2E8F0; color: #334155; font-size: .75rem; font-weight: 700;
  line-height: 1rem; white-space: nowrap; box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.flt-btn > span { overflow: hidden; text-overflow: ellipsis; max-width: 11rem; }
.flt-btn:hover { background: #F8FAFC; border-color: #CBD5E1; }
.flt-btn.flt-active { background: #FEF8EC; border-color: #FF9900; color: #0B111E; }
.flt-btn[aria-expanded="true"] { border-color: #FF9900; box-shadow: 0 0 0 3px rgba(255, 153, 0, .18); }
.flt-btn[aria-expanded="true"] .flt-chev { transform: rotate(180deg); }
.flt-chev { transition: transform .2s var(--ease); flex-shrink: 0; }
.flt-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 2;
  min-width: 15rem; max-width: min(22rem, calc(100vw - 2rem));
  background: #fff; border: 1px solid #E2E8F0; border-radius: 1rem; padding: .85rem;
  box-shadow: 0 18px 40px -12px rgba(15, 23, 42, .28);
}
.flt-head { display: none; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.flt-head h4 { font-family: 'Sora', sans-serif; font-weight: 700; font-size: .95rem; color: #0F172A; }
.flt-head button { width: 2rem; height: 2rem; border-radius: 9999px; background: #F1F5F9; color: #475569; font-size: .8rem; }
.flt-opt { padding: .5rem .6rem; border-radius: .6rem; }
.flt-opt:hover { background: #F1F5F9; }
#fltBackdrop { position: fixed; inset: 0; z-index: 1; background: transparent; }
#filterBar.flt-open { z-index: 35; }

@media (max-width: 639px) {
  #filterBar.flt-open { z-index: 60; }
  #fltBackdrop { background: rgba(2, 6, 23, .5); }
  .flt-panel {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 2;
    min-width: 0; max-width: none; max-height: 75vh; overflow-y: auto;
    border-radius: 1.25rem 1.25rem 0 0; border-width: 1px 0 0;
    padding: 1rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    animation: sheetUp .28s var(--ease);
  }
  .flt-head { display: flex; }
  .flt-opt { padding: .8rem .75rem; font-size: .85rem; }
  .flt-panel .space-y-1 > button { font-size: .85rem; padding-top: .8rem; padding-bottom: .8rem; }
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }

/* ===== Responsive hardening (all screen sizes) ===== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video, svg { max-width: 100%; }
img { height: auto; }
.grid > *, .flex > * { min-width: 0; }
h1, h2, h3, h4, p, a, span, li { overflow-wrap: anywhere; }
button, .btn, .btn2, .btn-danger, .flt-btn { overflow-wrap: normal; }
body.min-h-screen { min-height: 100vh; min-height: 100dvh; }

/* Notches / rounded corners / home-indicator */
header.sticky { padding-top: env(safe-area-inset-top, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
@media (max-width: 767px) {
  body.min-h-screen { padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px)); }
  nav.fixed.bottom-0 { padding-bottom: calc(.5rem + env(safe-area-inset-bottom, 0px)); padding-left: max(1.25rem, env(safe-area-inset-left, 0px)); padding-right: max(1.25rem, env(safe-area-inset-right, 0px)); }
}

/* Modals stay reachable on short / landscape screens */
#authModal, #locationModal, #infoModal, #dlg { overflow-y: auto; align-items: safe center; }
#authModal > div, #locationModal > div, #infoModal > div { max-width: 100%; max-height: 100%; overflow-y: auto; }
#cartDrawer, #wishlistDrawer { height: 100vh; height: 100dvh; max-width: 100vw; }

/* Very small phones (<= 360px) */
@media (max-width: 360px) {
  html { font-size: 15px; }
  .flt-btn { padding: .4rem .65rem; }
}
/* Large desktops / TVs scale up gracefully */
@media (min-width: 1920px) { html { font-size: 17px; } }
@media (min-width: 2560px) { html { font-size: 20px; } }
/* Short landscape phones: keep sticky chrome from eating the screen */
@media (max-height: 480px) and (orientation: landscape) { #mobileStoreSearchWrap { display: none; } }

/* ===== Horizontal scroll rows (sub-nav, tabs): never squash items =====
   The global ".flex > * { min-width: 0 }" + "overflow-wrap: anywhere" rules let
   these items shrink below their text width, so labels spilled over each
   other. Keep every item at its natural width and let the row scroll instead. */
.no-scrollbar { -webkit-overflow-scrolling: touch; }
.no-scrollbar > *,
.no-scrollbar > * > * { flex-shrink: 0; min-width: auto; }
.no-scrollbar button,
.no-scrollbar a,
.no-scrollbar span { white-space: nowrap; overflow-wrap: normal; }
#storeSubnavBar button { flex-shrink: 0; }

/* =====================================================================
   Marketplace alignment layer (Amazon-style rhythm)
   One consistent height per row, shared left/right edges, bottom-aligned
   actions, and scroll rows instead of ragged wrapping on phones.
   ===================================================================== */

/* --- Department sub-nav: every item the same height, text centred --- */
#storeSubnavBar > div { padding-top: 0; padding-bottom: 0; justify-content: flex-start; }
#storeSubnavBar button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 2.25rem; padding: 0 .7rem; line-height: 1; border-radius: .5rem;
}
#storeSubnavBar button i, #storeSubnavBar button svg { flex-shrink: 0; }
#storeSubnavBar > div > div:first-child { gap: .125rem; }
@media (min-width: 640px) { #storeSubnavBar > div > div:first-child { gap: .25rem; } }

/* --- Hero: one left edge, full-width stacked controls on phones --- */
.hero-pill { max-width: 100%; line-height: 1.25; }
@media (max-width: 639px) {
  .hero-cta > * { width: 100%; }
  .hero-fx h1 { line-height: 1.12; }
}

/* --- Department quad cards: heading on top, image + link pinned to the
       bottom so they line up across the row regardless of heading length --- */
.quad-card > div:first-child { flex: 1 1 auto; }
.quad-card > div.my-3 { flex: none; }
.quad-card > span, .quad-card > button { flex: none; }

/* --- Filter chips: single scrollable row on phones (no ragged wrapping) --- */
@media (max-width: 639px) {
  #filterBar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  #filterBar::-webkit-scrollbar { display: none; }
  #filterBar > * { flex-shrink: 0; }
}

/* --- Product cards: equal-height rows, content top / buttons bottom --- */
#productGrid { align-items: stretch; }
#productGrid > .card { height: 100%; }
#productGrid .line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* --- Mobile bottom tab bar: four equal columns, icon over label --- */
.mob-tabbar > button {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .125rem; padding: .125rem 0;
}
.mob-tabbar > button > span { white-space: nowrap; overflow-wrap: normal; }

/* ===== Product detail page ===== */
.pdp-zoom { overflow: hidden; }
.pdp-zoom img { transition: transform .18s var(--ease); will-change: transform; }
@media (hover: hover) and (pointer: fine) {
  .pdp-zoom { cursor: zoom-in; }
  .pdp-zoom:hover img { transform: scale(1.9); }
}
.pdp-enter { animation: rise .35s var(--ease) both; }
@media (prefers-reduced-motion: reduce) {
  .pdp-enter { animation: none; }
  .pdp-zoom img { transition: none; }
}
