/* ========================================================
   HOMIEST LIVING — Dark Luxury E-Commerce Theme
   Minimalist Scandinavian High-End Aesthetics
   ======================================================== */

:root {
  --color-text-main: #F4F4F5;
  --color-text-muted: #A1A1AA;
  --color-text-light: #71717A;
  --color-bg-main: #0C0C0E;
  --color-bg-surface: #141418;
  --color-bg-card: #18181D;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-subtle: rgba(255, 255, 255, 0.04);
  --color-border-hover: rgba(255, 255, 255, 0.3);
  --color-accent-gold: #E5C392;
  --color-sale: #E11D48;
  --font-main: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
  background-color: var(--color-bg-main);
  color-scheme: dark;
}

body {
  font-family: var(--font-main);
  color: var(--color-text-main);
  background-color: var(--color-bg-main);
  margin: 0;
  padding: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ========================================================
   FULL WIDTH LAYOUT (HOMIESTLIVING.MY THEME)
   ======================================================== */
.container-full,
.hdt-container-full {
  width: 100%;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) {
  .container-full,
  .hdt-container-full {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 1024px) {
  .container-full,
  .hdt-container-full {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

@media (min-width: 1440px) {
  .container-full,
  .hdt-container-full {
    padding-left: 4.5rem;
    padding-right: 4.5rem;
  }
}

@media (min-width: 1650px) {
  .container-full,
  .hdt-container-full {
    padding-left: 5.5rem;
    padding-right: 5.5rem;
  }
}

@media (min-width: 1280px) {
  .grid-cols-shopify-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

/* ========================================================
   ANNOUNCEMENT MARQUEE BAR
   ======================================================== */
.announcement-bar {
  background-color: #060608;
  color: #D4D4D8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 8px 0;
  position: relative;
  z-index: 50;
  overflow: hidden;
}

.announcement-ticker-track {
  display: inline-flex;
  white-space: nowrap;
  will-change: transform;
  animation: announcementTicker 32s linear infinite;
}

@keyframes announcementTicker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.announcement-bar a {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ========================================================
   HEADER & NAVIGATION (Transparent Frosted Glassmorphism)
   ======================================================== */
.site-header {
  background-color: rgba(14, 14, 18, 0.45);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Subtle glass shadow when scrolling */
.site-header.scrolled,
.site-header:hover {
  background-color: rgba(12, 12, 15, 0.65);
  border-bottom-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}

.nav-link {
  font-size: 11px;
  font-weight: 600;
  color: #D4D4D8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 0;
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #FFFFFF;
}

.nav-link.active {
  color: #FFFFFF;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #FFFFFF;
}

/* ========================================================
   AUTO-MOVING BRAND TICKER RIBBON (Matching Screenshot)
   ======================================================== */
.brand-ticker-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 28px 0;
}

.brand-ticker-wrap {
  position: relative;
  width: 106%;
  margin-left: -3%;
  overflow: hidden;
  background-color: #FFFFFF;
  color: #000000;
  padding: 14px 0;
  transform: rotate(-1.5deg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.15);
  user-select: none;
  z-index: 10;
  display: flex;
}

.brand-ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
  will-change: transform;
  animation: infiniteBrandTicker 24s linear infinite;
}

@keyframes infiniteBrandTicker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.brand-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000000;
}

.brand-ticker-item .ticker-light {
  font-weight: 400;
  letter-spacing: 0.16em;
  color: #18181B;
}

.brand-ticker-item .ticker-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #52525B;
  font-size: 16px;
  margin-left: 14px;
}

/* Dark Craftsman & Materials Logo Auto-Moving Ticker */
.craft-ticker-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #0E0E12;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
  display: flex;
}

.craft-ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
  will-change: transform;
  animation: infiniteBrandTicker 28s linear infinite;
}

.craft-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 40px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #A1A1AA;
  transition: color 0.2s ease;
}

.craft-ticker-item:hover {
  color: #FFFFFF;
}

.craft-ticker-item svg {
  width: 16px;
  height: 16px;
  color: #FDE047;
}

/* ========================================================
   CIRCLE CATEGORY BUBBLES (Story Highlight Pattern)
   ======================================================== */
.category-bubble-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: transform 0.25s ease;
}

.category-bubble-item:hover {
  transform: translateY(-3px);
}

.category-bubble-img {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 2px;
  background-color: #16161B;
  transition: all 0.25s ease;
}

.category-bubble-item:hover .category-bubble-img {
  border-color: #FFFFFF;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.category-bubble-title {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 500;
  color: #D4D4D8;
  text-align: center;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.category-bubble-item:hover .category-bubble-title {
  color: #FFFFFF;
}

/* ========================================================
   HOMIEST LIVING PRODUCT CARDS (Multi-Slide Stage + Dynamic Effects)
   ======================================================== */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #141418;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease;
  overflow: hidden;
}

.product-card:hover {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.9), 0 0 24px rgba(253, 224, 71, 0.08);
  transform: translateY(-4px);
}

/* 5-Column Staggered Scroll Reveal: Cards Cascade in Waves */
.product-card.scroll-reveal {
  opacity: 0;
  transform: translateY(34px) scale(0.96);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s ease,
              box-shadow 0.4s ease;
  transition-delay: calc(var(--col-idx, 0) * 135ms);
  will-change: transform, opacity;
}

.product-card.scroll-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.product-card.scroll-reveal.is-revealed:hover {
  transform: translateY(-4px) scale(1);
}

/* Light Beam Sheen on Card Hover */
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
  transition: left 0.75s ease;
  z-index: 5;
}

.product-card:hover::before {
  left: 150%;
}

/* Card Media / Slider Stage */
.product-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #0D0D10;
  border-radius: 8px;
  overflow: hidden;
}

/* Individual Slides */
.card-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.card-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

/* Cinematic Slow Zoom-In (High-End Luxury Furniture Presentation) */
@keyframes luxurySlowZoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.085);
  }
}

/* Staggered Column Zoom: Columns start slow zoom with a wave delay so they NEVER all move together */
.product-card.scroll-reveal .card-slide.active .slide-img {
  animation: none;
}

.product-card.scroll-reveal.is-revealed .card-slide.active .slide-img {
  animation: luxurySlowZoom 8.5s cubic-bezier(0.2, 0, 0.3, 1) forwards;
  animation-delay: calc(var(--col-idx, 0) * 1.5s);
}

/* Fallback when scroll-reveal is not used */
.product-card:not(.scroll-reveal) .card-slide.active .slide-img {
  animation: luxurySlowZoom 8.5s cubic-bezier(0.2, 0, 0.3, 1) forwards;
}

/* Slide image base */
.slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transform-origin: center center;
  will-change: transform;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover: Deepens into an intimate, silky luxury inspection zoom */
.product-card:hover .card-slide.active .slide-img {
  animation-play-state: paused;
  transform: scale(1.12);
}

/* Slider Navigation Arrows (Appear on Card Hover) */
.card-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(12, 12, 14, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  z-index: 6;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  user-select: none;
}

.card-slider-arrow:hover {
  background-color: #FFFFFF;
  color: #0C0C0E;
  border-color: #FFFFFF;
  transform: translateY(-50%) scale(1.1);
}

.card-slider-arrow.prev-arrow {
  left: 8px;
}

.card-slider-arrow.next-arrow {
  right: 8px;
}

.product-card:hover .card-slider-arrow {
  opacity: 1;
  visibility: visible;
}

/* Slider Pagination Dots / Dash Bars */
.card-slider-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  z-index: 6;
  pointer-events: auto;
}

.card-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.3s ease;
}

.card-dot:hover {
  background-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.card-dot.active {
  width: 18px;
  border-radius: 9999px;
  background-color: #FFFFFF;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* Quick View Overlay Pill */
.card-quick-pill {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background-color: rgba(12, 12, 14, 0.85);
  backdrop-filter: blur(12px);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 6;
  pointer-events: none;
}

.product-card:hover .card-quick-pill {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Pulsing Discount Badge */
@keyframes badgePulseGlow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(225, 29, 72, 0.5);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 16px rgba(225, 29, 72, 0.85);
  }
}

.product-badge-sale {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #E11D48 0%, #9F1239 100%);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  z-index: 6;
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: badgePulseGlow 3s ease-in-out infinite;
}

/* Product Info */
.product-card-info {
  display: flex;
  flex-direction: column;
}

.product-card-category {
  font-size: 10px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.product-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #F4F4F5;
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.25s ease;
}

.product-card:hover .product-card-title {
  color: #FEF08A;
  transform: translateX(2px);
}

/* Dynamic Glowing Price */
.special-price-glow {
  color: #FDE047;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 0 14px rgba(253, 224, 71, 0.38), 0 0 28px rgba(253, 224, 71, 0.15);
  display: inline-flex;
  align-items: baseline;
  transition: all 0.25s ease;
}

.product-card:hover .special-price-glow {
  color: #FFFFFF;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.6);
  transform: scale(1.02);
}

.compare-price-strike {
  font-size: 11px;
  color: #71717A;
  text-decoration: line-through;
  text-decoration-color: #EF4444;
  margin-left: 6px;
  font-weight: 400;
}

/* ========================================================
   PRESTIGE BUTTONS (High-Contrast Clean White & Glass)
   ======================================================== */
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #FFFFFF;
  color: #0C0C0E;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: 9999px;
  border: 1px solid #FFFFFF;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-dark:hover {
  background-color: #E4E4E7;
  color: #000000;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-outline:hover {
  background-color: #FFFFFF;
  color: #0C0C0E;
  border-color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-loadmore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 36px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #F4F4F5;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.25s ease;
  background-color: rgba(255, 255, 255, 0.04);
}

.btn-loadmore:hover {
  background-color: #FFFFFF;
  color: #0C0C0E;
  border-color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.12);
}

/* ========================================================
   SECTION HEADINGS & STAGED SCROLL REVEALS
   ======================================================== */
.section-title-wrap {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: #FFFFFF;
  margin: 0;
  text-transform: capitalize;
}

.section-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 6px;
}

/* Staged 2-Phase Reveal for Section Headings */
.section-title-wrap.scroll-reveal .section-title {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-title-wrap.scroll-reveal .section-subtitle {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.16s, transform 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.16s;
}

.section-title-wrap.scroll-reveal.is-revealed .section-title,
.section-title-wrap.scroll-reveal.is-revealed .section-subtitle {
  opacity: 1;
  transform: translateY(0);
}

/* Category Story Bubbles Domino Reveal */
.category-bubble-item.scroll-reveal {
  opacity: 0;
  transform: translateY(20px) scale(0.92);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--bubble-idx, 0) * 55ms);
}

.category-bubble-item.scroll-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Editorial Lifestyle Banner: Cinematic Scale Down & Staged Typography */
.editorial-banner.scroll-reveal .banner-bg-img {
  transform: scale(1.14);
  transition: transform 2.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.editorial-banner.scroll-reveal.is-revealed .banner-bg-img {
  transform: scale(1.0);
}

.editorial-banner.scroll-reveal .banner-tag {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.25s, transform 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.25s;
}

.editorial-banner.scroll-reveal .banner-heading {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.4s, transform 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
}

.editorial-banner.scroll-reveal .banner-cta {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.58s, transform 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.58s;
}

.editorial-banner.scroll-reveal.is-revealed .banner-tag,
.editorial-banner.scroll-reveal.is-revealed .banner-heading,
.editorial-banner.scroll-reveal.is-revealed .banner-cta {
  opacity: 1;
  transform: translateY(0);
}

/* Brand Heritage Editorial: 4-Step Staged Entrance */
.brand-editorial.scroll-reveal > div > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-editorial.scroll-reveal.is-revealed > div > *:nth-child(1) {
  opacity: 1; transform: translateY(0); transition-delay: 0.1s;
}
.brand-editorial.scroll-reveal.is-revealed > div > *:nth-child(2) {
  opacity: 1; transform: translateY(0); transition-delay: 0.22s;
}
.brand-editorial.scroll-reveal.is-revealed > div > *:nth-child(3) {
  opacity: 1; transform: translateY(0); transition-delay: 0.36s;
}
.brand-editorial.scroll-reveal.is-revealed > div > *:nth-child(4) {
  opacity: 1; transform: translateY(0); transition-delay: 0.5s;
}

/* Social Grid: 6-Tile Staggered Entrance */
.social-tile.scroll-reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.94);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--social-idx, 0) * 80ms);
}

.social-tile.scroll-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Loadmore Button Staged Fade-in */
.btn-reveal.scroll-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.3s, transform 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.btn-reveal.scroll-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================================
   PDP & GALLERY STYLES
   ======================================================== */
.pdp-gallery-main {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #141418;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pdp-gallery-thumb {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: #141418;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pdp-gallery-thumb.active, .pdp-gallery-thumb:hover {
  border-color: #FFFFFF;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.pdp-price {
  font-size: 26px;
  font-weight: 600;
  color: #FFFFFF;
}

.variant-pill {
  padding: 8px 18px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background-color: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: 500;
  color: #F4F4F5;
  cursor: pointer;
  transition: all 0.2s ease;
}

.variant-pill:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background-color: rgba(255, 255, 255, 0.08);
}

.variant-pill.active {
  border-color: #FFFFFF;
  background-color: #FFFFFF;
  color: #0C0C0E;
}

/* ========================================================
   CART DRAWER & BACKDROP
   ======================================================== */
.cart-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background-color: #111115;
  color: #FFFFFF;
  z-index: 101;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -6px 0 32px rgba(0, 0, 0, 0.6);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
}

.cart-drawer-panel.open {
  transform: translateX(0);
}

/* ========================================================
   SEARCH MODAL
   ======================================================== */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.search-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.search-modal-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #111115;
  color: #FFFFFF;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 91;
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 36px 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.search-modal-panel.open {
  transform: translateY(0);
}

/* ========================================================
   WHATSAPP FLOATING BADGE
   ======================================================== */
.wa-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: #25D366;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  z-index: 45;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
}

.wa-floating-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.6);
}

/* ========================================================
   SUBCATEGORY CARDS & MULTI-TYPE LAYOUT DISPLAY ENGINE
   ======================================================== */
.subcat-carousel-wrap {
  position: relative;
  width: 100%;
}

.subcat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  width: 220px;
  flex-shrink: 0;
  transition: all 0.3s ease;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  text-decoration: none;
}

@media (min-width: 640px) {
  .subcat-card {
    width: 270px;
  }
}

@media (min-width: 1024px) {
  .subcat-card {
    width: 320px;
  }
}

@media (min-width: 1440px) {
  .subcat-card {
    width: 360px;
  }
}

.subcat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.2);
  border-color: #FFFFFF;
}

.subcat-card.active {
  border: 2.5px solid #2DD4BF;
  box-shadow: 0 0 24px rgba(45, 212, 191, 0.45);
}

.subcat-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1.5rem;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.subcat-card:hover .subcat-card-img {
  transform: scale(1.08);
}

.subcat-pill {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(14, 14, 18, 0.92);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
  transition: all 0.25s ease;
}

.subcat-card:hover .subcat-pill,
.subcat-card.active .subcat-pill {
  background-color: #000000;
  border-color: #FFFFFF;
  color: #FFFFFF;
  transform: translate(-50%, -50%) scale(1.05);
}

/* Multi-Layout Switcher Toolbar */
.layout-switcher-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #A1A1AA;
  cursor: pointer;
  transition: all 0.2s ease;
}

.layout-switcher-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
}

.layout-switcher-btn.active {
  background-color: #FFFFFF;
  color: #0C0C0E;
  border-color: #FFFFFF;
}

/* Dynamic Grid Classes on #products-display-container (Huge Display Sizing Matching Screenshots) */
#products-display-container.grid-layout-2 {
  display: grid !important;
  grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  gap: 1.5rem !important;
}
@media (min-width: 640px) {
  #products-display-container.grid-layout-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

#products-display-container.grid-layout-3 {
  display: grid !important;
  grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  gap: 1.5rem !important;
}
@media (min-width: 640px) {
  #products-display-container.grid-layout-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (min-width: 1024px) {
  #products-display-container.grid-layout-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

#products-display-container.grid-layout-4 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1.25rem !important;
}
@media (min-width: 768px) {
  #products-display-container.grid-layout-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (min-width: 1100px) {
  #products-display-container.grid-layout-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

#products-display-container.grid-layout-5 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1rem !important;
}
@media (min-width: 640px) {
  #products-display-container.grid-layout-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (min-width: 768px) {
  #products-display-container.grid-layout-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (min-width: 1024px) {
  #products-display-container.grid-layout-5 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}
@media (min-width: 1280px) {
  #products-display-container.grid-layout-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

#products-display-container.grid-layout-6 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.75rem !important;
}
@media (min-width: 640px) {
  #products-display-container.grid-layout-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (min-width: 1024px) {
  #products-display-container.grid-layout-6 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}
@media (min-width: 1380px) {
  #products-display-container.grid-layout-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}

/* List Layout (Matching Screenshot 1: Bordered Dark Container with Rows) */
#products-display-container.grid-layout-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  background-color: #141418;
}

#products-display-container.grid-layout-list .product-item-wrapper {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#products-display-container.grid-layout-list .product-item-wrapper:last-child {
  border-bottom: none;
}

#products-display-container.grid-layout-list .product-card-list-view {
  display: flex !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
}

#products-display-container.grid-layout-list .product-card-grid-view {
  display: none !important;
}

/* Grid Layouts Hide List View */
#products-display-container:not(.grid-layout-list) .product-card-list-view {
  display: none !important;
}

#products-display-container:not(.grid-layout-list) .product-card-grid-view {
  display: flex !important;
}

/* ==========================================================================
   Product Detail Page (PDP) - Clean Luxury Minimalist Layout
   Matching homiestliving.my & User Reference Concepts
   ========================================================================== */

.pdp-stage-canvas {
  background-color: #ffffff !important;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.pdp-stage-canvas img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pdp-stage-canvas:hover img {
  transform: scale(1.05);
}

.pdp-thumb-btn {
  width: 4rem;
  height: 4rem;
  background-color: #ffffff;
  padding: 4px;
  border-radius: 4px;
  border: 1px solid #374151;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

@media (min-width: 640px) {
  .pdp-thumb-btn {
    width: 5rem;
    height: 5rem;
  }
}

.pdp-thumb-btn:hover {
  border-color: #9ca3af;
}

.pdp-thumb-btn.active {
  border-color: #17a2b8;
  box-shadow: 0 0 0 1px #17a2b8;
}

.pdp-thumb-btn img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Rich Description & Specs Styling */
.pdp-structured-content {
  color: #cbd5e1;
  font-size: 0.8125rem;
  line-height: 1.7;
}

.pdp-structured-content p {
  margin-bottom: 1.25rem;
  color: #cbd5e1;
  font-size: 0.8125rem;
  line-height: 1.7;
}

.pdp-structured-content strong,
.pdp-structured-content b {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 1.25rem;
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

.pdp-structured-content p:first-child strong:first-child,
.pdp-structured-content strong:first-child {
  margin-top: 0;
}

/* Sticky Bottom Purchase Bar */
.pdp-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: #ffffff !important;
  color: #111827 !important;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.18);
  padding: 0.75rem 1rem;
}

@media (min-width: 640px) {
  .pdp-sticky-bar {
    padding: 0.75rem 2.5rem;
  }
}

.pdp-sticky-btn-add {
  background-color: #17a2b8 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.8125rem !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  border-radius: 4px !important;
  height: 2.5rem !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
  border: none !important;
}

.pdp-sticky-btn-add:hover {
  background-color: #138496 !important;
  filter: brightness(1.08);
}

.pdp-sticky-btn-add:active {
  transform: scale(0.98);
}

/* ==========================================================================
   AI Chatbot Floating Widget (Homiest Living Chatbot Integration)
   ========================================================================== */

.ai-chat-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 48;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #1FB2A6 0%, #0d9488 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(31, 178, 166, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.ai-chat-floating-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 30px rgba(31, 178, 166, 0.65);
}

.ai-chat-floating-btn .pulse-ring {
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  border: 2px solid rgba(31, 178, 166, 0.6);
  animation: chatPulse 2.5s infinite;
  pointer-events: none;
}

@keyframes chatPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

.homiest-chat-modal {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 420px;
  max-width: calc(100vw - 32px);
  height: 640px;
  max-height: calc(100vh - 120px);
  background: #141418;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  z-index: 55;
  display: none;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s ease;
}

.homiest-chat-modal.is-open {
  display: flex !important;
  animation: chatSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes chatSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Push floating button up when sticky purchase bar is present on PDP */
body.has-pdp-sticky-bar .ai-chat-floating-btn {
  bottom: 80px;
}
body.has-pdp-sticky-bar .homiest-chat-modal {
  bottom: 148px;
}


