@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* ====================================================
   IMPERIAL ARCHITECTURE — JR ESSENCE LUXURY PLATFORM
   Mobile-First, Scentido-Inspired, Taj Mahal Aesthetic
   ==================================================== */
:root {
  --bg-sand: #FAF8F5;
  --bg-card: #FFFFFF;
  --text-primary: #191715;
  --text-muted: #6B6560;
  --border-light: #EAE5DC;
  --accent-gold: #C29B38;
  --accent-gold-dark: #A07C22;
  --accent-gold-soft: #F9F5EC;
  --accent-gold-bright: #E5C365;
  --accent-charcoal: #191715;
  --taj-ivory: #FAF8F5;
  --taj-obsidian: #12100E;
  /* Safe touch target size */
  --min-touch: 44px;
  /* Bottom safe area for iOS */
  --safe-bottom: env(safe-area-inset-bottom, 16px);
  --safe-top: env(safe-area-inset-top, 0px);
}

/* ====================================================
   BASE RESETS — MOBILE SAFE
   ==================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: #FFFFFF !important;
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Prevent zoom on input focus in iOS Safari */
  font-size: 16px;
}

/* Prevent horizontal overflow from any child */
main, section, header, footer, div {
  max-width: 100vw;
}

/* Inputs must be at least 16px to prevent iOS auto-zoom */
input, textarea, select {
  font-size: 16px !important;
  border-radius: 0;
  -webkit-appearance: none;
}

/* Remove select arrow on iOS */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23191715' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.font-serif {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

/* ====================================================
   MOBILE BOTTOM NAV BAR — SCENTIDO INSPIRED
   ==================================================== */
#mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid #EAE5DC;
  padding-bottom: var(--safe-bottom);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
}

.mobile-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 4px;
  min-height: 60px;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8C827A;
  font-weight: 600;
  transition: color 0.2s ease;
  border: none;
  background: transparent;
  cursor: pointer;
}
.mobile-nav-btn.active,
.mobile-nav-btn:active {
  color: #C29B38;
}
.mobile-nav-btn svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.5;
}
.mobile-nav-btn.active svg {
  stroke: #C29B38;
}

/* On desktop, hide mobile bottom nav */
@media (min-width: 768px) {
  #mobile-bottom-nav {
    display: none;
  }
}

/* Body padding to prevent bottom nav overlap on mobile */
@media (max-width: 767px) {
  body {
    padding-bottom: calc(60px + var(--safe-bottom));
  }
}

/* ====================================================
   COLLAPSIBLE LUXURY STICKY HEADER (ON SCROLL)
   ==================================================== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: #ffffff;
  padding-top: var(--safe-top);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

#header-default-tier {
  max-height: 240px;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.22s ease, 
              transform 0.28s ease, 
              visibility 0.35s ease;
  overflow: hidden;
}

#header-collapsed-tier {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.22s ease, 
              transform 0.28s ease, 
              visibility 0.35s ease;
  overflow: hidden;
}

/* Collapsed state when scrolling down */
#site-header.header-collapsed {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 0 0 #2B2520;
}

#site-header.header-collapsed #header-default-tier {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
}

#site-header.header-collapsed #header-collapsed-tier {
  max-height: 75px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* Sticky category ribbon offset adjustment when header collapses */
#site-header.header-collapsed ~ main .sticky[class*="top-"] {
  top: 56px !important;
}

/* Announcement bar - compact on mobile */
@media (max-width: 640px) {
  aside[aria-label="Announcement"] {
    font-size: 9px !important;
    letter-spacing: 0.1em;
    padding: 8px 12px;
  }
}

/* Nav bar row 2: category scroll on mobile */
header nav.flex.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

/* ====================================================
   LUXURY BACK TO TOP BUTTON
   ==================================================== */
#back-to-top-btn {
  position: fixed;
  bottom: 76px; /* Positioned safely above mobile bottom nav */
  right: 16px;
  z-index: 44;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background-color: #191715;
  color: #C29B38;
  border: 1px solid rgba(194, 155, 56, 0.4);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.2s ease, 
              color 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease;
}

#back-to-top-btn:hover {
  background-color: #C29B38;
  color: #191715;
  border-color: #C29B38;
  transform: translateY(0) scale(1.08);
  box-shadow: 0 6px 24px rgba(194, 155, 56, 0.45);
}

#back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

@media (min-width: 768px) {
  #back-to-top-btn {
    bottom: 28px;
    right: 28px;
    width: 48px;
    height: 48px;
  }
}

/* ====================================================
   LUXURY BUTTON STYLING
   ==================================================== */
.btn-luxury-primary {
  background-color: var(--accent-charcoal);
  color: #FFFFFF;
  transition: all 0.25s ease;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: none !important;
  min-height: var(--min-touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-luxury-primary:hover {
  background-color: #000000;
  box-shadow: none !important;
}
.btn-luxury-primary:active {
  background-color: #000000;
  transform: scale(0.98);
}

.btn-luxury-secondary {
  border: 1px solid #191715;
  background: transparent;
  color: var(--text-primary);
  transition: all 0.25s ease;
  letter-spacing: 0.08em;
  min-height: var(--min-touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
}
.btn-luxury-secondary:hover {
  border-color: #000000;
  background-color: #FAF8F5;
}

.btn-whatsapp {
  background: #25D366;
  color: #FFFFFF;
  transition: all 0.25s ease;
  box-shadow: none !important;
  min-height: var(--min-touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-whatsapp:hover {
  background: #1EBE5D;
}
.btn-whatsapp:active {
  background: #18A84F;
  transform: scale(0.98);
}

/* ====================================================
   PRODUCT CARD — MOBILE OPTIMIZED
   ==================================================== */
.product-card,
.product-item,
.new-launch-card {
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  background-color: #FFFFFF !important;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.product-card:hover,
.product-item:hover,
.new-launch-card:hover {
  box-shadow: none !important;
}
.product-card:active,
.product-item:active,
.new-launch-card:active {
  transform: scale(0.985);
  opacity: 0.94;
}

.product-img-wrapper img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover .product-img-wrapper img {
  transform: scale(1.02);
}

/* Mobile: larger tap target on wishlist buttons */
.wishlist-btn {
  min-width: var(--min-touch);
  min-height: var(--min-touch);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ====================================================
   MOBILE PRODUCT GRID — COMPACT, READABLE
   ==================================================== */
@media (max-width: 480px) {
  /* Product name: no truncation on very small screens, slightly smaller font */
  .product-card h3,
  .new-launch-card h3 {
    font-size: 12px !important;
    line-height: 1.3;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  /* Price: slightly smaller */
  .product-card .font-bold,
  .new-launch-card .font-bold {
    font-size: 13px;
  }
}

/* ====================================================
   HERO CAROUSEL — MOBILE OPTIMIZED
   ==================================================== */
.hero-carousel-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #141210;
  /* Prevent aspect ratio issues on very small screens */
  min-height: 400px;
}

@media (max-width: 480px) {
  /* Shorter hero on small phones */
  .hero-carousel-wrapper {
    min-height: 380px;
    height: 82vw !important;
  }
  /* Hero text: scale down */
  .hero-carousel-wrapper h1 {
    font-size: 1.75rem !important;
    line-height: 1.15;
  }
  .hero-carousel-wrapper h2 {
    font-size: 1.6rem !important;
  }
  /* Hero buttons: full width stacked on tiny screens */
  .hero-carousel-wrapper .flex.flex-wrap {
    flex-direction: column;
    gap: 10px;
  }
  .hero-carousel-wrapper .flex.flex-wrap a,
  .hero-carousel-wrapper .flex.flex-wrap button {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
}
.hero-slide .slide-bg {
  transform: scale(1);
  transition: transform 7s cubic-bezier(0.25, 1, 0.5, 1);
}
.hero-slide.active .slide-bg {
  transform: scale(1.045);
}

/* Carousel indicators — larger tap target on mobile */
.carousel-indicator {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  min-width: 24px;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-indicator.active {
  width: 2.25rem !important;
  background-color: #C29B38 !important;
}

/* ====================================================
   MOBILE STICKY ADD TO CART BAR
   ==================================================== */
#mobile-sticky-cart {
  position: fixed;
  bottom: calc(60px + var(--safe-bottom));
  left: 0;
  right: 0;
  z-index: 44;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #EAE5DC;
  padding: 10px 16px;
  display: none;
  gap: 10px;
  align-items: center;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.10);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
#mobile-sticky-cart.visible {
  display: flex;
  transform: translateY(0);
}
#mobile-sticky-cart .sticky-product-name {
  font-size: 12px;
  font-weight: 600;
  color: #191715;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#mobile-sticky-cart .sticky-price {
  font-size: 13px;
  font-weight: 700;
  color: #191715;
  white-space: nowrap;
}
#mobile-sticky-cart .sticky-add-btn {
  background: #191715;
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 16px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

@media (min-width: 768px) {
  #mobile-sticky-cart {
    display: none !important;
  }
}

/* ====================================================
   PRODUCT MODAL — MOBILE FULL SCREEN
   ==================================================== */
@media (max-width: 767px) {
  /* Modal should be nearly full screen on mobile */
  #product-modal .modal-content,
  #product-modal > div > div {
    max-height: 96vh !important;
    height: 96vh;
    border-radius: 16px 16px 0 0 !important;
    margin: auto 0 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Product modal: stack image above details on mobile */
  #product-modal .modal-layout {
    flex-direction: column !important;
    overflow-y: auto;
  }

  /* Product image: 40vh on mobile */
  #product-modal .modal-image-col {
    width: 100% !important;
    height: 42vw !important;
    min-height: 200px;
    max-height: 280px;
    position: relative !important;
    overflow: hidden;
  }
  #product-modal .modal-image-col img {
    object-fit: contain;
    width: 100%;
    height: 100%;
    padding: 12px;
  }

  /* Product details: scrollable right column */
  #product-modal .modal-detail-col {
    width: 100% !important;
    overflow-y: auto;
    padding: 16px !important;
    padding-bottom: calc(80px + var(--safe-bottom)) !important;
  }

  /* Sticky "Add to Cart" in product modal on mobile */
  #product-modal .modal-sticky-actions {
    position: sticky;
    bottom: 0;
    background: white;
    border-top: 1px solid #EAE5DC;
    padding: 12px 16px;
    padding-bottom: calc(12px + var(--safe-bottom));
    z-index: 10;
    margin: 0 -16px;
  }
}

/* ====================================================
   SEARCH DRAWER — MOBILE OPTIMIZED
   ==================================================== */
#search-drawer input {
  font-size: 16px !important;
  padding: 14px 16px 14px 44px;
}

/* ====================================================
   CART DRAWER — MOBILE SAFE
   ==================================================== */
@media (max-width: 480px) {
  #cart-drawer .drawer-right-panel,
  #wishlist-drawer .drawer-right-panel {
    width: 95vw !important;
    max-width: 95vw !important;
  }
}

/* ====================================================
   DRAWER TRANSITIONS
   ==================================================== */
.drawer-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer-left-panel {
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.drawer-backdrop.active .drawer-left-panel,
.drawer-left-panel.active {
  transform: translateX(0);
}

.drawer-right-panel {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.drawer-backdrop.active .drawer-right-panel,
.drawer-right-panel.active {
  transform: translateX(0);
}

/* ====================================================
   MODAL TRANSITIONS (SUBTLE & RESPONSIVE)
   ==================================================== */
.modal-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  opacity: 0;
  transform: scale(0.985) translateY(6px);
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}
.modal-backdrop.active .modal-content {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* ====================================================
   AI SOMMELIER MODAL — MOBILE OPTIMIZED
   ==================================================== */
@media (max-width: 767px) {
  #ai-sommelier-modal .modal-content {
    max-height: 94vh !important;
    height: 94vh;
    border-radius: 24px 24px 0 0;
    margin-bottom: 0 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  /* Ensure active AI panes scroll smoothly on mobile */
  #ai-sommelier-modal .ai-pane {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 3.5rem;
    overscroll-behavior: contain;
  }

  /* Tab bar: fit all tabs */
  #ai-sommelier-modal .sommelier-tab-btn {
    font-size: 10px !important;
    padding: 8px 6px !important;
    letter-spacing: 0.04em;
    flex: 1;
    text-align: center;
    white-space: nowrap;
  }
}

/* ====================================================
   SCENT QUIZ MODAL — MOBILE OPTIMIZED
   ==================================================== */
@media (max-width: 640px) {
  #scent-quiz-modal .quiz-chip {
    padding: 10px 12px;
    font-size: 12px;
  }
  #scent-quiz-modal .modal-content {
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 20px 20px 0 0;
    margin-bottom: 0;
  }
}

/* ====================================================
   CUSTOM SCROLLBARS
   ==================================================== */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: #FAF8F5;
}
::-webkit-scrollbar-thumb {
  background: #D8D2C7;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #B6AEA2;
}

/* ====================================================
   LUXURY DISCOVERY BOX BUILDER
   ==================================================== */
.discovery-box-container {
  background: linear-gradient(145deg, #1C1A17 0%, #12100E 100%);
  border: 1px solid #332D27;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
}

.discovery-slot {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px dashed #4A423A;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  min-height: 100px;
}
.discovery-slot:hover {
  border-color: #C29B38;
  background: rgba(194, 155, 56, 0.08);
  transform: translateY(-2px);
}
.discovery-slot.filled {
  border-style: solid;
  border-color: #C29B38;
  background: rgba(194, 155, 56, 0.12);
  box-shadow: 0 8px 20px -6px rgba(194, 155, 56, 0.25);
}

/* ====================================================
   OLFACTORY PYRAMID
   ==================================================== */
.pyramid-tier {
  position: relative;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  transition: all 0.25s ease;
}
.pyramid-top {
  background: #F7FAF6;
  border-left: 3px solid #6E9B7B;
}
.pyramid-heart {
  background: #FDF8F5;
  border-left: 3px solid #C28B62;
}
.pyramid-base {
  background: #F8F6F4;
  border-left: 3px solid #826E5F;
}

/* ====================================================
   PERFORMANCE METERS
   ==================================================== */
.perf-meter-track {
  height: 5px;
  background-color: #EFEAE2;
  border-radius: 9999px;
  overflow: hidden;
}
.perf-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #A07C22 0%, #C29B38 100%);
  border-radius: 9999px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ====================================================
   SCENT FINDER QUIZ PILLS
   ==================================================== */
.quiz-chip {
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.quiz-chip:hover {
  border-color: #C29B38;
  transform: translateY(-1px);
}
.quiz-chip.active {
  background-color: #191715;
  color: #FFFFFF;
  border-color: #191715;
}

/* ====================================================
   NEW LAUNCHES CAROUSEL
   ==================================================== */
.scrollbar-none::-webkit-scrollbar { display: none; }
.scrollbar-none { -ms-overflow-style: none; scrollbar-width: none; }

.new-launch-card {
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  background-color: #FFFFFF !important;
  transition: opacity 0.3s ease;
}
.new-launch-card:hover { transform: none !important; }
.new-launch-card:hover .new-launch-img { transform: scale(1.02); }

.new-launch-dot {
  width: 16px;
  height: 2px;
  background-color: #D6D3D1;
  transition: all 0.3s ease;
  cursor: pointer;
  /* Larger tap target */
  position: relative;
}
.new-launch-dot::before {
  content: '';
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: -4px;
  right: -4px;
}
.new-launch-dot.active {
  width: 24px;
  background-color: #191715;
}

/* ====================================================
   WISHLIST ACTIVE STATE
   ==================================================== */
.wishlist-btn.active svg {
  fill: #EF4444;
  stroke: #EF4444;
}

/* ====================================================
   DUAL-IMAGE HOVER EFFECT
   ==================================================== */
.product-dual-img-container {
  position: relative;
  overflow: hidden;
  background-color: #FFFFFF !important;
  border: none !important;
}

.img-internals {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.img-packaging {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  will-change: opacity, transform;
}

.group:hover .img-internals { opacity: 0; transform: scale(1.03); }
.group:hover .img-packaging { opacity: 1; transform: scale(1); }

.packaging-reveal-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(25, 23, 21, 0.85);
  color: #FFFFFF;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 6px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px);
  transition: all 0.25s ease;
  z-index: 10;
}
.group:hover .packaging-reveal-badge { opacity: 1; transform: translateY(0); }

/* Touch device: tap to toggle packaging view */
.show-packaging .img-internals { opacity: 0 !important; }
.show-packaging .img-packaging { opacity: 1 !important; transform: scale(1) !important; }

/* ====================================================
   EDITORIAL BRAND STATEMENT
   ==================================================== */
.editorial-statement-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-transform: uppercase;
}

@media (max-width: 480px) {
  .editorial-statement-title {
    font-size: 1.5rem !important;
    letter-spacing: -0.015em;
  }
}

.editorial-nav-link {
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  min-height: var(--min-touch);
}
.editorial-nav-link:hover {
  color: #C29B38;
  transform: translateX(6px);
}

.editorial-portal-card {
  position: relative;
  overflow: hidden;
  background-color: #111111;
}
.editorial-portal-card img {
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
  will-change: transform;
}
.editorial-portal-card:hover img { transform: scale(1.05); }

/* ====================================================
   SCENTIDO LUXURY NAV CATEGORY LINKS
   ==================================================== */
.nav-category-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 4px 0;
  transition: color 0.25s ease;
  letter-spacing: 0.18em;
  white-space: nowrap;
  min-height: var(--min-touch);
}
.nav-category-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0%;
  height: 1.5px;
  background-color: #C29B38;
  transition: width 0.25s ease;
}
.nav-category-link:hover::after,
.nav-category-link.active::after { width: 100%; }
.nav-category-link.active { color: #C29B38 !important; }

/* Hide scrollbar for smooth horizontal scroll */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ====================================================
   NOTE BADGE
   ==================================================== */
.note-badge {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.6rem;
  background-color: #F8F8F8;
  color: #4A4540;
  display: inline-block;
  margin: 0.15rem;
  border: none;
}

/* ====================================================
   TAJ MAHAL LUXURY ARCHITECTURE — AI SOMMELIER
   ==================================================== */
.taj-gold-border {
  border: 1px solid rgba(194, 155, 56, 0.35);
  transition: all 0.3s ease;
}
.taj-gold-border:hover {
  border-color: #C29B38;
  box-shadow: 0 0 20px -3px rgba(194, 155, 56, 0.25);
}
.taj-halo { box-shadow: 0 10px 40px -10px rgba(194, 155, 56, 0.28); }
.taj-gold-glow { text-shadow: 0 0 16px rgba(194, 155, 56, 0.5); }

.taj-glass-dark {
  background: rgba(18, 16, 14, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(194, 155, 56, 0.25);
}
.taj-glass-light {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid #EAE5DC;
}

/* Floating AI Button */
@keyframes taj-pulse {
  0% { box-shadow: 0 0 0 0 rgba(194, 155, 56, 0.7); }
  70% { box-shadow: 0 0 0 14px rgba(194, 155, 56, 0); }
  100% { box-shadow: 0 0 0 0 rgba(194, 155, 56, 0); }
}
.taj-floating-pulse {
  animation: taj-pulse 2.6s infinite cubic-bezier(0.16, 1, 0.3, 1);
}

/* Floating AI button: move up above mobile bottom nav */
@media (max-width: 767px) {
  .taj-floating-btn,
  [onclick*="openAiSommelierModal"].fixed,
  button.fixed.bottom-6 {
    bottom: calc(76px + var(--safe-bottom)) !important;
  }
}

/* ====================================================
   SOCIAL PROOF TICKER TOAST
   ==================================================== */
.luxury-ticker-toast { display: none !important; opacity: 0 !important; pointer-events: none !important; visibility: hidden !important;
  position: fixed;
  bottom: calc(24px + 60px + var(--safe-bottom));
  left: 16px;
  z-index: 45;
  max-width: 320px;
  background: rgba(25, 23, 21, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(194, 155, 56, 0.32);
  color: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.55);
  transform: translateY(140%);
  opacity: 0;
  transition: all 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}
.luxury-ticker-toast.active {
  transform: translateY(0);
  opacity: 1;
}

@media (min-width: 768px) {
  .luxury-ticker-toast { display: none !important; opacity: 0 !important; pointer-events: none !important; visibility: hidden !important;
    bottom: 24px;
    left: 24px;
    max-width: 360px;
    border-radius: 16px;
  }
}

/* ====================================================
   SOMMELIER CHIPS & TABS
   ==================================================== */
.sommelier-chip {
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: 1px solid #EAE5DC;
  background: #FAF8F5;
  color: #4A4540;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.sommelier-chip:hover {
  border-color: #C29B38;
  background: #FFFBF2;
  color: #191715;
  transform: translateY(-2px);
}
.sommelier-chip.selected {
  border-color: #C29B38;
  background: #191715;
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(194, 155, 56, 0.28);
}

.sommelier-tab-btn {
  transition: all 0.3s ease;
  position: relative;
  color: #8C827A;
  border-bottom: 2px solid transparent;
  min-height: var(--min-touch);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sommelier-tab-btn.active {
  color: #C29B38;
  border-bottom-color: #C29B38;
  font-weight: 600;
}

/* ====================================================
   ACCORD SCORE BARS
   ==================================================== */
.accord-bar-fill {
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ====================================================
   FRAGRANCE PYRAMID STYLING
   ==================================================== */
@keyframes subtle-shimmer {
  0% { opacity: 0.8; }
  50% { opacity: 1; }
  100% { opacity: 0.8; }
}
.shimmer-badge {
  animation: subtle-shimmer 3s infinite ease-in-out;
}

/* ====================================================
   MOBILE COLLECTIONS PAGE
   ==================================================== */
@media (max-width: 640px) {
  /* Collections: category tab ribbon */
  #collection-main .cat-tab-btn,
  #collection-main .type-tab {
    font-size: 10px !important;
    letter-spacing: 0.1em;
    padding-bottom: 8px;
    min-height: 40px;
  }

  /* Filter + sort bar: more compact */
  #collection-main select {
    font-size: 12px !important;
    padding: 8px 28px 8px 10px;
  }

  /* Breadcrumb: shorter */
  nav.flex.items-center.gap-2 {
    font-size: 9px;
  }
}

/* ====================================================
   FOOTER — MOBILE STACKED
   ==================================================== */
@media (max-width: 640px) {
  footer .grid-cols-1 {
    gap: 24px;
  }
  footer {
    padding-bottom: calc(80px + var(--safe-bottom));
  }
}

/* ====================================================
   FOCUS STATES — ACCESSIBILITY
   ==================================================== */
:focus-visible {
  outline: 2px solid #C29B38;
  outline-offset: 2px;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* ====================================================
   iOS MOMENTUM SCROLLING
   ==================================================== */
.overflow-y-auto,
.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
}

/* ====================================================
   TOUCH DEVICE HOVER SUPPRESSION
   ==================================================== */
@media (hover: none) {
  .group:hover .img-internals { opacity: 1; transform: scale(1); }
  .group:hover .img-packaging { opacity: 0; }
  .group:hover .packaging-reveal-badge { opacity: 0; }
  .product-card:hover .product-img-wrapper img { transform: none; }
  .editorial-portal-card:hover img { transform: none; }
}

/* ====================================================
   COLLECTIONS STICKY TOP CATEGORY BAR OFFSET
   ==================================================== */
/* The category ribbon sits below a 64px (mobile) or 80px (desktop) header */
@media (max-width: 767px) {
  .sticky.top-16 { top: 64px !important; }
  .sticky.top-20 { top: 64px !important; }
  #collection-main .sticky[class*="top-"] {
    top: 64px !important;
  }

  /* Disable quick view modal on mobile viewports - redirect directly to product page */
  #product-modal {
    display: none !important;
  }
}

/* ====================================================
   UTILITY: PREVENT TEXT SELECT ON INTERACTIVE CARDS
   ==================================================== */
.select-none {
  -webkit-user-select: none;
  user-select: none;
}

/* ====================================================
   LUXURY STICKY FOOTER MARQUEE BANNER (ALWAYS ON VIEWPORT)
   ==================================================== */
.footer-marquee-strip {
  position: fixed;
  bottom: calc(60px + var(--safe-bottom)); /* Sits above mobile bottom nav */
  left: 0;
  right: 0;
  z-index: 43; /* Above page content, beneath drawers & modal dialogs */
  overflow: hidden;
  background: #C29B38;
  border-top: 1px solid #A07C22;
  border-bottom: 1px solid #A07C22;
  padding: 7px 0;
  width: 100%;
  box-shadow: none !important;
  pointer-events: auto;
}

@media (min-width: 768px) {
  .footer-marquee-strip {
    bottom: 0; /* Anchored to bottom on desktop & web viewports */
    padding: 7.5px 0;
    z-index: 38;
  }
}

.footer-marquee-strip::before,
.footer-marquee-strip::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}

.footer-marquee-strip::before {
  left: 0;
  background: linear-gradient(to right, #C29B38 0%, rgba(194, 155, 56, 0) 100%);
}

.footer-marquee-strip::after {
  right: 0;
  background: linear-gradient(to left, #C29B38 0%, rgba(194, 155, 56, 0) 100%);
}

.footer-marquee-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: max-content;
  will-change: transform;
  animation: footerMarquee 32s linear infinite;
}

/* Continuous playing: marquee glides without pausing on hover */

@keyframes footerMarquee {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-marquee-track {
    animation-duration: 75s;
  }
}

.marquee-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-shrink: 0;
  flex-grow: 0;
  flex-wrap: nowrap;
  width: max-content;
  min-width: max-content;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  flex-grow: 0;
  gap: 8px;
  padding: 0 18px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2.5px 7.5px;
  font-family: inherit;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 9999px;
  line-height: 1.2;
}

/* Tag 1: NEW — Dark Black Pill */
.tag-badge-new {
  background: #141311;
  color: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.35);
}

/* Tag 2: TRENDING — Dark Black Pill with Gold Accent Text */
.tag-badge-trending {
  background: #141311;
  color: #F8E5B8;
  border: 1px solid rgba(0, 0, 0, 0.35);
}

/* Tag 3: LIMITED STOCK — Urgent Crimson Pill */
.tag-badge-limited {
  background: #6E1212;
  color: #FFFFFF;
  border: 1px solid rgba(110, 18, 18, 0.6);
}

.marquee-prod-name {
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #141311;
  font-weight: 700;
  transition: opacity 0.2s ease;
}

.marquee-item:hover .marquee-prod-name {
  opacity: 0.75;
}

.marquee-sparkle {
  color: #141311;
  font-size: 9px;
  opacity: 0.45;
  padding-left: 8px;
}

/* Adjusted positions for floating elements so they don't collide with sticky marquee */
#back-to-top-btn {
  bottom: calc(104px + var(--safe-bottom)) !important;
}

@media (min-width: 768px) {
  #back-to-top-btn {
    bottom: 50px !important;
    right: 28px !important;
  }
}

#floating-ai-sommelier-btn {
  bottom: calc(104px + var(--safe-bottom)) !important;
}

@media (min-width: 768px) {
  #floating-ai-sommelier-btn {
    bottom: 50px !important;
    left: 24px !important;
  }
}

/* Prevent body content from being obscured by sticky footer elements */
@media (max-width: 767px) {
  body {
    padding-bottom: calc(100px + var(--safe-bottom)) !important;
  }
}

@media (min-width: 768px) {
  body {
    padding-bottom: 44px !important;
  }
}
