/* =========================================================================
   Storefront shared styles â€” theme-driven components.
   All colors below inherit the central store theme primary color via
   `--primary-brand` (defined once in helpers.php::storefront_brand_css()).
   ========================================================================= */

/* ---------- Quantity +/- buttons (dynamic theme primary color) ---------- */
.qty-btn-inc,
.qty-btn-dec {
  background-color: var(--primary-brand) !important;
  color: #ffffff !important;
  border: none;
  transition: opacity 0.2s ease;
}
.qty-btn-inc:hover,
.qty-btn-dec:hover {
  opacity: 0.9;
}

/* Scroll-to-top stays visually ABOVE the floating summary bar at all times */
#scrollTopBtn { z-index: 100; }

/* =========================================================================
   Quantity input â€” hide native number spinners & center the value
   ========================================================================= */

/* Hide HTML5 Number Input Spinners (Chrome, Safari, Edge, Opera) */
input[type="number"].qty-input::-webkit-outer-spin-button,
input[type="number"].qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

/* Hide Spinners in Firefox */
input[type="number"].qty-input {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

/* Perfect Center Alignment & Padding Fix */
input[type="number"].qty-input {
  text-align: center !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  font-weight: 700;
  width: 3rem; /* 48px standard width */
  border: none;
  outline: none;
}

/* =========================================================================
   Add-to-cart micro-interactions (replaces the old stacked toast popups)
   ========================================================================= */

/* Quantity controller pops in where the Add button was */
.qty-pop {
  animation: qtyPop .35s cubic-bezier(.34, 1.56, .64, 1) both;
}
@keyframes qtyPop {
  0%   { opacity: 0; transform: scale(.6); }
  100% { opacity: 1; transform: scale(1); }
}

/* Mobile bottom bar: gentle amber ring pulse on cart updates */
.bottom-bar-pulse {
  animation: bottomBarPulse .55s ease-out both;
}
@keyframes bottomBarPulse {
  0%   { box-shadow: 0 0 0 0 rgba(245, 158, 11, .45); }
  100% { box-shadow: 0 0 0 16px rgba(245, 158, 11, 0); }
}

/* =========================================================================
   Sticky glassmorphism header (app-like UI) + sticky category chip bar.
   ========================================================================= */
.sticky-glass-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.75) !important; /* Semi-transparent dark background */
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Header text must stay readable on the dark glass surface in BOTH themes. */
#siteHeader.sticky-glass-header .brand-name { color: #fff !important; }
#siteHeader.sticky-glass-header .brand-tagline { color: rgba(253, 186, 116, .92) !important; }

/* Desktop nav pills â€” inactive pills flip to light-on-glass. */
#siteHeader.sticky-glass-header .nav-link:not([class*="bg-amber-100"]) {
  color: rgba(255, 255, 255, .85) !important;
}
#siteHeader.sticky-glass-header .nav-link:hover {
  color: #fcd34d !important;
  background: rgba(255, 255, 255, .12) !important;
}

/* Icon buttons (hamburger / theme / cart) become glassy pills. */
#siteHeader.sticky-glass-header #mobileMenuBtn,
#siteHeader.sticky-glass-header #theme-toggle,
#siteHeader.sticky-glass-header #cartBtn {
  background: rgba(255, 255, 255, .12) !important;
  border-color: rgba(255, 255, 255, .18) !important;
  color: #fff !important;
}
#siteHeader.sticky-glass-header #mobileMenuBtn:hover,
#siteHeader.sticky-glass-header #theme-toggle:hover,
#siteHeader.sticky-glass-header #cartBtn:hover {
  background: rgba(255, 255, 255, .22) !important;
  border-color: rgba(255, 255, 255, .28) !important;
}

/* Mobile dropdown menu â€” solid-ish dark sheet under the glass header. */
#siteHeader.sticky-glass-header #mobileMenu {
  background: rgba(9, 13, 22, .95) !important;
  border-color: rgba(255, 255, 255, .1) !important;
}
#siteHeader.sticky-glass-header #mobileMenu a { color: rgba(255, 255, 255, .9) !important; }
#siteHeader.sticky-glass-header #mobileMenu a:hover { background: rgba(255, 255, 255, .1) !important; }
#siteHeader.sticky-glass-header #mobileMenu .text-amber-700 { color: #fcd34d !important; }

/* Sticky category chips bar (horizontally scrollable, no scrollbar). */
.header-cat-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.header-cat-scroll::-webkit-scrollbar { display: none; }

#siteHeader.sticky-glass-header .cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .88);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}
#siteHeader.sticky-glass-header .cat-chip:hover {
  background: rgba(255, 255, 255, .22);
  color: #fff;
}
#siteHeader.sticky-glass-header .cat-chip:active { transform: scale(.95); }
#siteHeader.sticky-glass-header .cat-chip .cat-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 0 8px rgba(251, 191, 36, .7);
}

/* =========================================================================
   Fixed bottom cart summary bar â€” light glassmorphism (all viewports).
   ========================================================================= */
.bottom-bar-glass {
  background: rgba(255, 255, 255, .85) !important;
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  border-top: 1px solid rgba(226, 232, 240, .85);
  border-radius: 1.1rem 1.1rem 0 0;
  box-shadow: 0 -10px 26px -16px rgba(15, 23, 42, .25);
  padding-bottom: calc(.75rem + env(safe-area-inset-bottom)) !important;
}
.bottom-bar-glass .bar-track { background: rgba(226, 232, 240, .7) !important; }

/* Floating action stack (call + scroll-to-top): anchored bottom-right; lifted
   above the glass cart bar when it is visible so the two never overlap. */
#fabStack { bottom: 1.25rem; }
@media (min-width: 768px) { #fabStack { bottom: 1.25rem; } }
body.has-cart-bar #fabStack { bottom: calc(8.5rem + env(safe-area-inset-bottom)); }

/* =========================================================================
   Order Now page â€” App Pill-Style Category Slider.
   ========================================================================= */
#category-pill-container {
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-x;
}
#category-pill-container::-webkit-scrollbar { display: none; }

/* Desktop/Laptop arrow buttons (hidden on Mobile â€” strictly desktop only). */
.cat-slide-btn,
#cat-slide-left,
#cat-slide-right {
  display: none !important;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: rgba(15, 23, 42, .82);
  color: #fff;
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, .35);
  flex: none;
  transition: background .2s ease, color .2s ease, transform .15s ease, opacity .2s ease;
}
.cat-slide-btn:hover { background: #f59e0b; color: #0f172a; }
.cat-slide-btn:active { transform: scale(.9); }
.cat-slide-btn:disabled { opacity: .35; pointer-events: none; }
@media (min-width: 768px) {
  .cat-slide-btn,
  #cat-slide-left,
  #cat-slide-right { display: inline-flex !important; }
}

/* Rounded capsule pills â€” light surface in light mode, slate glass in dark. */
/* Single-line layout is mandatory: pills never break text into multiple lines. */
.category-pill,
.category-item,
.cat-chip {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.category-pill {
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  background: rgba(255, 255, 255, .9);
  color: #334155;
  border: 1px solid rgba(203, 213, 225, .9);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  scroll-snap-align: start;
  transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.category-pill:hover { background: var(--primary-light); border-color: var(--primary-border); }
.category-pill:active { transform: scale(.94); }
.category-pill.active {
  background: var(--primary-brand);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 18px -6px rgba(var(--primary-brand-rgb), .55);
}
.dark .category-pill {
  background: rgba(30, 41, 59, .6);
  color: #e2e8f0;
  border-color: rgba(51, 65, 85, .55);
}
.dark .category-pill:hover { background: rgba(var(--primary-brand-rgb), .15); border-color: rgba(var(--primary-border-rgb), .4); }
.dark .category-pill.active {
  background: var(--primary-brand);
  color: #ffffff;
}
.dark .cat-slide-btn { background: rgba(226, 232, 240, .1); color: #e2e8f0; }
.dark .cat-slide-btn:hover { background: #f59e0b; color: #0f172a; }

/* Hide scrollbars on scrollable rows, strictly no wrapping children. */
.no-scrollbar::-webkit-scrollbar { display: none !important; }
.no-scrollbar { -ms-overflow-style: none !important; scrollbar-width: none !important; }

/* =========================================================================
   Mobile List View product titles â€” 2-line wrapping (no single-line cut).
   ========================================================================= */
.product-title,
.product-card-title,
.product-card-list h3 {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: normal !important; /* Allow multi-line text wrapping */
  line-height: 1.25 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  word-break: break-word !important;
}

/* Tamil subtitle (1 Line Max) */
.product-subtitle,
.product-card-subtitle,
.product-card-list p {
  display: -webkit-box !important;
  -webkit-line-clamp: 1 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: normal !important;
  line-height: 1.2 !important;
  font-size: 11px !important;
  color: #64748b;
}

/* =========================================================================
   Cosmos hero â€” pure CSS logo glow, glittering stars, shooting stars and
   sky-shot bursts (GPU friendly: only transform & opacity animate, so there
   is ZERO JS and ZERO layout lag).
   ========================================================================= *//* ---- Logo glow (amber â‡„ purple breathing) ---- */
@keyframes logoGlow {
  0%, 100% { opacity: .55; transform: scale(.97); }
  50%      { opacity: 1;    transform: scale(1.05); }
}
.animate-logo-glow { animation: logoGlow 3.5s ease-in-out infinite; }

/* ---- Logo gentle floating (GPU: transform only) ---- */
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.animate-logo-float { animation: logoFloat 4.5s ease-in-out infinite; will-change: transform; }

/* ---- Light sweep shine across the logo (GPU: transform only) ---- */
.logo-shine-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-130%);
  animation: shineSweep 3.4s ease-in-out infinite;
  will-change: transform;
}
@keyframes shineSweep {
  0%   { transform: translateX(-130%); }
  55%  { transform: translateX(130%); }
  100% { transform: translateX(130%); }
}

/* ---- Glittering / twinkling background stars ---- */
.glitter-container { position: absolute; inset: 0; overflow: hidden; }

.glitter-star {
  position: absolute;
  line-height: 1;
  opacity: 0;
  animation: twinkle 3.4s ease-in-out infinite;
  will-change: transform, opacity;
}
.glitter-star.star-1 { top: 12%; left: 12%; font-size: 12px; animation-delay: .1s;  animation-duration: 3.4s; color: #fbbf24; }
.glitter-star.star-2 { top: 24%; left: 82%; font-size: 10px; animation-delay: .8s;  animation-duration: 4s;   color: #c4b5fd; }
.glitter-star.star-3 { top: 45%; left: 8%;  font-size: 14px; animation-delay: 1.4s; animation-duration: 3.6s; color: #fde68a; }
.glitter-star.star-4 { top: 64%; left: 88%; font-size: 12px; animation-delay: 2s;   animation-duration: 4.4s; color: #fff; }
.glitter-star.star-5 { top: 78%; left: 20%; font-size: 9px;  animation-delay: 2.6s; animation-duration: 3.2s; color: #fecaca; }
.glitter-star.star-6 { top: 85%; left: 72%; font-size: 13px; animation-delay: 3s;   animation-duration: 3.8s; color: #fde68a; }
.glitter-star.star-7 { top: 8%;  left: 48%; font-size: 8px;  animation-delay: 3.4s; animation-duration: 3s;   color: #e9d5ff; }

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(.6) rotate(0deg); }
  50%      { opacity: 1; transform: scale(1.15) rotate(45deg); }
}

/* ---- Shooting stars ---- */
.stars-container { position: absolute; inset: 0; overflow: hidden; }

.shooting-star {
  position: absolute;
  width: 90px;
  height: 2px;
  border-radius: 9999px;
  background: linear-gradient(90deg, rgba(255,255,255,.95), rgba(255,255,255,0));
  opacity: 0;
  animation: starfall 7s linear infinite;
  will-change: transform, opacity;
}
.shooting-star::after {
  content: '';
  position: absolute;
  top: -1.5px;
  left: -1px;
  width: 5px;
  height: 5px;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 0 10px 2px rgba(255,255,255,.9);
}
.shooting-star:nth-child(1) { top: 14%; left: 60%; animation-delay: 0s;   animation-duration: 6.5s; }
.shooting-star:nth-child(2) { top: 34%; left: 85%; animation-delay: 2.4s; animation-duration: 8s; }
.shooting-star:nth-child(3) { top: 8%;  left: 22%; animation-delay: 4.6s; animation-duration: 7s; }

@keyframes starfall {
  0%   { transform: translate3d(80px, 0, 0) rotate(-35deg); opacity: 0; }
  8%   { opacity: 1; }
  32%  { transform: translate3d(-180px, 110px, 0) rotate(-35deg); opacity: .95; }
  58%  { transform: translate3d(-420px, 250px, 0) rotate(-35deg); opacity: 0; }
  100% { transform: translate3d(-420px, 250px, 0) rotate(-35deg); opacity: 0; }
}

/* ---- Sky-shot rocket bursts (left & right flanks) ---- */
.skyshot-wrapper {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 140px;
  height: 200px;
  pointer-events: none;
  will-change: transform;
}
.skyshot-left  { left: 5%; }
.skyshot-right { right: 5%; }

.skyshot-rocket {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 3px;
  height: 3px;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 0 8px 2px rgba(255,255,255,.9);
  opacity: 0;
  animation: rocketLaunch 6s ease-in infinite;
  will-change: transform, opacity;
}
.skyshot-right .skyshot-rocket { animation-delay: 3s; }

@keyframes rocketLaunch {
  0%   { transform: translate(0, 0); opacity: 0; }
  10%  { opacity: 1; }
  52%  { transform: translate(-12px, -160px); opacity: 1; }
  56%  { transform: translate(-12px, -166px); opacity: 0; }
  100% { transform: translate(-12px, -166px); opacity: 0; }
}

.skyshot-burst {
  position: absolute;
  left: 50%;
  top: 16%;
  width: 0;
  height: 0;
  opacity: 0;
  animation: burst 6s ease-in infinite;
  will-change: transform, opacity;
}
.skyshot-right .skyshot-burst { animation-delay: 3s; }

.skyshot-burst .spark {
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 4px;
  border-radius: 9999px;
  background: #fbbf24;
  box-shadow: 0 0 6px 1px rgba(251, 191, 36, .85);
}
.skyshot-burst .spark.s1 { background: #fbbf24; transform: rotate(0deg)   translate(0, -30px); }
.skyshot-burst .spark.s2 { background: #f97316; transform: rotate(60deg)  translate(0, -30px); }
.skyshot-burst .spark.s3 { background: #fde68a; transform: rotate(120deg) translate(0, -30px); }
.skyshot-burst .spark.s4 { background: #fbbf24; transform: rotate(180deg) translate(0, -30px); }
.skyshot-burst .spark.s5 { background: #f97316; transform: rotate(240deg) translate(0, -30px); }
.skyshot-burst .spark.s6 { background: #fde68a; transform: rotate(300deg) translate(0, -30px); }

@keyframes burst {
  0%   { opacity: 0; transform: scale(.1); }
  54%  { opacity: 0; transform: scale(.1); }
  60%  { opacity: 1; transform: scale(1); }
  82%  { opacity: .95; transform: scale(1.4); }
  100% { opacity: 0; transform: scale(1.8); }
}

@media (prefers-reduced-motion: reduce) {
  .shooting-star, .animate-pulse-glow, .animate-logo-glow, .logo-shine-overlay,
  .glitter-star, .skyshot-rocket, .skyshot-burst { animation: none !important; opacity: 0 !important; }
  .animate-logo-float { animation: none !important; transform: none !important; }
  .animate-pulse-subtle { animation: none !important; transform: none !important; }
}

/* =========================================================================
   Mobile full-screen navigation drawer â€” subtle fade/slide-in.
   ========================================================================= */
#mobile-menu-drawer { animation: drawerIn .22s ease-out both; }
@keyframes drawerIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Highlighted thumbnail play button â€” subtle glowing pulse (transform/opacity only). */
@keyframes pulseSubtle {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 8px 1px rgba(139, 92, 246, .55); }
  50%      { opacity: .85; transform: scale(1.07); box-shadow: 0 0 14px 3px rgba(139, 92, 246, .75); }
}
.animate-pulse-subtle { animation: pulseSubtle 2.2s ease-in-out infinite; will-change: transform, opacity; }

/* =========================================================================
   Firecracker sparkle burst on "Add to Cart" â€” pure CSS particle explode.
   ========================================================================= */
.sparkle-global-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none !important;
  z-index: 99999 !important;
}

.sparkle-particle {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  pointer-events: none !important;
  box-shadow: 0 0 6px currentColor;
  animation: sparkle-explode .65s cubic-bezier(.1, .8, .3, 1) forwards;
}

@keyframes sparkle-explode {
  0%   { transform: translate(0, 0) scale(1.2); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(.1); opacity: 0; }
}

/* =========================================================================
   Responsive Tweaks for Small Mobile Screens (320px to 375px).
   Grants max width to the middle text column so product titles wrap on
   2 lines without getting cut off.
   ========================================================================= */
@media (max-width: 380px) {
  /* 1. Reduce outer product card padding */
  .product-card-list {
    padding: .5rem !important; /* 8px padding */
    gap: .5rem !important;     /* 8px gap */
  }

  /* 2. Compact Left Image Thumbnail */
  .product-card-list .product-thumb-container {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
  }

  /* 3. Compact Stepper Control Width */
  .product-card-list .qty-stepper-box {
    min-width: 65px !important;
  }
  .product-card-list .qty-stepper-box button {
    width: 22px !important;
    height: 22px !important;
    font-size: 11px !important;
  }
  .product-card-list .qty-stepper-box span,
  .product-card-list .qty-stepper-box input {
    width: 20px !important;
    font-size: 10px !important;
  }

  /* 4. Font Size & Title Line Clamp Guard */
  .product-card-list .product-title {
    font-size: 11px !important;
    line-height: 1.2 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
  }
  .product-card-list .product-subtitle {
    font-size: 9.5px !important;
  }
}

/* =========================================================================
   STRICT FIX ONLY FOR SMALL MOBILE SCREENS (360px AND BELOW).
   Removes the white-space gap between the '-' and '+' quantity stepper
   buttons. This does NOT affect larger mobile screens (>360px).
   ========================================================================= */
@media screen and (max-width: 360px) {
  /* 1. Wrapper: seaml bullet single solid-purple pill, zero gaps */
  .qty-stepper-box,
  div[class*="qty-stepper"],
  .product-card-list .flex.items-center.border {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    background-color: var(--primary-brand) !important; /* purple-600 */
    border: 1px solid var(--primary-brand) !important;
  }

  /* 2. Minus and Plus Buttons â€” same solid purple, no margins */
  .qty-stepper-box button,
  .product-card-list button[data-dec],
  .product-card-list button[data-inc] {
    width: 24px !important;
    height: 28px !important;
    min-width: 24px !important;
    padding: 0 !important;
    margin: 0 !important;
    background-color: var(--primary-brand) !important;
    color: #ffffff !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 800 !important;
  }

  /* 3. Middle Number (input/span) â€” SAME purple, NO white gap */
  .qty-stepper-box span,
  .qty-stepper-box input,
  .qty-stepper-box input.qty-input,
  .product-card-list .qty-count {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    background-color: var(--primary-brand) !important; /* seamless purple */
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* 4. Compact + ADD button for 360px */
  .product-card-list button[data-add] {
    padding: 6px 10px !important;
    font-size: 10.5px !important;
    letter-spacing: 0 !important;
  }
}

/* =========================================================================
   GLASSMORPHISM UI STYLES
   ========================================================================= */
.glass-header-top {
  background: rgba(30, 41, 59, 0.82) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.glass-bar-sub {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6) !important;
}

/* Dark mode adjustment for sub-bar */
.dark .glass-bar-sub {
  background: rgba(15, 23, 42, 0.8) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Glass Pills / Buttons Styling */
.glass-pill {
  background: rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
}

.dark .glass-pill {
  background: rgba(30, 41, 59, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Keep the brand active highlight on category pills even with .glass-pill applied. */
.category-pill.glass-pill.active {
  background: var(--primary-brand) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 6px 18px -6px rgba(var(--primary-brand-rgb), 0.55) !important;
}
.dark .category-pill.glass-pill.active {
  background: var(--primary-brand) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

/* =========================================================================
   SMOOTH LAG-FREE RENDERING & HARDWARE ACCELERATION
   ========================================================================= */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* GPU acceleration for the interactive/card surfaces (avoids layer churn
   by targeting only the animated elements â€” a global `will-change` on every
   button would create too many compositor layers and *hurt* performance). */
.card-hover,
.modal-container,
.glass-pill {
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
