/* ==========================================================================
   MASATUZAMZAM FLOWERS — LIQUID GLASS EDITORIAL DESIGN SYSTEM
   Visual Identity: Nocturnal Botanical Emerald & Obsidian Forest
   ========================================================================== */

:root {
  --canvas-obsidian-1: #040D08;
  --canvas-obsidian-2: #07160E;
  --canvas-obsidian-deep: #020704;
  --surface-jungle: #08140E;
  --surface-jungle-card: rgba(11, 28, 20, 0.85);
  
  --liquid-glass-bg: rgba(9, 24, 17, 0.65);
  --liquid-glass-border: rgba(16, 185, 129, 0.16);
  --liquid-glass-highlight: rgba(52, 211, 153, 0.12);
  --liquid-glass-blur: blur(20px);
  
  --text-alabaster: #F4F7F5;
  --text-cream: #FFFFFF;
  --text-sage: #8FA89B;
  --text-muted: rgba(143, 168, 155, 0.8);
  
  --accent-emerald: #00C875;
  --accent-emerald-mint: #10B981;
  --accent-emerald-glow: rgba(0, 200, 117, 0.4);
  --accent-terracotta: #D98A46;
  --accent-terracotta-glow: rgba(217, 138, 70, 0.35);

  --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Canvas */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--canvas-obsidian-1);
  background-image: 
    radial-gradient(ellipse 90% 80% at 50% -10%, rgba(16, 185, 129, 0.12) 0%, transparent 70%),
    radial-gradient(circle 800px at 90% 40%, rgba(5, 150, 105, 0.1) 0%, transparent 60%),
    radial-gradient(circle 900px at 10% 80%, rgba(7, 22, 14, 0.95) 0%, transparent 70%),
    linear-gradient(180deg, #040D08 0%, #07160E 45%, #020704 100%);
  background-attachment: fixed;
  color: var(--text-alabaster);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* Language & Currency High-Contrast Layered Toggles (WCAG AAA) */
.mz-toggle-track {
  background: rgba(6, 28, 18, 0.9);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 9999px;
  padding: 3px;
  display: inline-flex;
  align-items: center;
  position: relative;
  flex-shrink: 0;
  gap: 2px;
}

.mz-toggle-btn {
  position: relative;
  z-index: 2;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  line-height: 1;
  border-radius: 9999px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #e6f9ef;
  opacity: 0.9;
  text-decoration: none;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mz-toggle-btn.active {
  z-index: 2;
  background: #10b981;
  color: #03150c !important;
  opacity: 1 !important;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.mz-toggle-btn:hover:not(.active) {
  color: #ffffff;
  opacity: 1;
}

/* Typography Classes */
.font-editorial-serif {
  font-family: var(--font-serif);
}

.font-editorial-sans {
  font-family: var(--font-sans);
}

.eyebrow-label {
  font-family: var(--font-sans);
  font-size: 0.6875rem; /* 11px */
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent-emerald-mint);
}

.editorial-headline {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--text-cream);
}

/* Liquid Glass Components */
.liquid-glass-nav {
  background: rgba(4, 13, 8, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(16, 185, 129, 0.15);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  will-change: transform, opacity;
}

.liquid-glass-nav.scrolled {
  background: rgba(7, 22, 14, 0.92);
  border-bottom: 1px solid rgba(16, 185, 129, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
}

.liquid-glass-nav.header-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.liquid-glass-portal {
  position: relative;
  overflow: hidden;
}

.liquid-glass-portal::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    60deg, 
    transparent 20%, 
    rgba(52, 211, 153, 0.06) 45%, 
    rgba(16, 185, 129, 0.12) 50%, 
    transparent 55%
  );
  transform: translateX(-100%);
  animation: glassSheen 9s infinite ease-in-out;
  pointer-events: none;
}

@keyframes glassSheen {
  0% { transform: translateX(-100%); }
  35% { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

.liquid-glass-card {
  background: var(--surface-jungle-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--liquid-glass-border);
  transition: transform 0.5s var(--ease-editorial), border-color 0.4s ease, box-shadow 0.4s ease;
  position: relative;
}

.liquid-glass-card:hover {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 25px 60px -15px rgba(16, 185, 129, 0.18);
  transform: translateY(-4px);
}

/* Glass Pill Buttons */
.btn-liquid-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  background: #00C875;
  color: #031109;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.4s var(--ease-editorial);
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

.btn-liquid-pill:hover {
  background: #10B981;
  color: #031109;
  box-shadow: 0 0 25px rgba(0, 200, 117, 0.4);
  transform: translateY(-2px);
}

.btn-liquid-pill .arrow-icon {
  transition: transform 0.3s var(--ease-editorial);
}

.btn-liquid-pill:hover .arrow-icon {
  transform: translateX(4px);
}

.btn-outline-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  background: rgba(8, 22, 16, 0.6);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--text-alabaster);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.35s var(--ease-editorial);
}

.btn-outline-pill:hover {
  border-color: var(--accent-emerald-mint);
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald-mint);
  transform: translateY(-2px);
}

.btn-outline-pill .arrow-icon {
  transition: transform 0.3s var(--ease-editorial);
}

.btn-outline-pill:hover .arrow-icon {
  transform: translateX(4px);
}

/* Product Card Component */
.product-image-container {
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  background-color: #040D08;
}

.product-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
  filter: contrast(102%) brightness(98%);
}

.product-card:hover .product-image-container img {
  transform: scale(1.04);
}

/* Vignette treatment */
.product-image-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(4, 13, 8, 0.45) 100%),
              linear-gradient(180deg, transparent 75%, rgba(4, 13, 8, 0.7) 100%);
  pointer-events: none;
}

/* Floating Wishlist Heart */
.btn-wishlist {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: rgba(8, 20, 14, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--text-sage);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: all 0.3s ease;
}

.btn-wishlist:hover,
.btn-wishlist.active {
  background: #00C875;
  color: #031109;
  border-color: #00C875;
  transform: scale(1.08);
}

/* Slide-Up Quick Add Bar */
.quick-add-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.85rem;
  background: #00C875;
  color: #031109;
  border-top: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.35s var(--ease-editorial);
  z-index: 4;
}

.product-card:hover .quick-add-bar {
  transform: translateY(0);
  opacity: 1;
}

.quick-add-bar:hover {
  background: #10B981;
  color: #031109;
}

/* Feature Banner - Zamzam Privé */
.prive-banner {
  position: relative;
  height: auto;
  min-height: fit-content;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(16, 185, 129, 0.25);
  background-color: #040D08;
}

.prive-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.4) contrast(1.15);
  transition: transform 1.2s var(--ease-editorial);
  pointer-events: none;
}

.prive-banner:hover img {
  transform: scale(1.03);
}

.prive-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  min-height: fit-content;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
  overflow: visible;
  background: linear-gradient(
    90deg, 
    rgba(4, 13, 8, 0.94) 0%, 
    rgba(7, 22, 14, 0.85) 55%, 
    rgba(4, 13, 8, 0.5) 100%
  );
}

@media (max-width: 768px) {
  .prive-overlay {
    padding: clamp(1.25rem, 3.5vw, 1.75rem);
    background: linear-gradient(
      180deg, 
      rgba(4, 13, 8, 0.9) 0%, 
      rgba(7, 22, 14, 0.96) 100%
    );
  }
}

/* Slide-Over Cart Drawer */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 7, 4, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-editorial);
}

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

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  background: rgba(7, 22, 14, 0.96);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-left: 1px solid rgba(16, 185, 129, 0.2);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.85);
  z-index: 101;
  transform: translateX(100%);
  transition: transform 0.5s var(--ease-editorial);
  display: flex;
  flex-direction: column;
}

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

/* Modal Windows (Plant Care Quick View & Collections) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 7, 4, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 110;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-editorial);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

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

.modal-content {
  width: 100%;
  max-width: 820px;
  max-height: 90svh;
  max-height: 90dvh;
  overflow-y: auto;
  background: rgba(7, 22, 14, 0.96);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 12px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9);
  transform: scale(0.95) translateY(15px);
  transition: transform 0.4s var(--ease-editorial);
}

.modal-overlay.open .modal-content {
  transform: scale(1) translateY(0);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #040D08;
}

::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.35);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #00C875;
}

/* Developer Credit Style (subtle liquid glass) */
.dev-credit {
  font-size: 0.75rem;
  color: #8FA89B;
  text-align: center;
  letter-spacing: 0.04em;
  margin-top: 1rem;
}

.dev-credit a {
  color: #8FA89B;
  text-decoration: none;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.dev-credit a:hover {
  color: #10B981;
  text-decoration: underline;
}

/* Pulse badge */
.badge-live-pulse {
  position: relative;
  display: inline-flex;
}

.badge-live-pulse::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 9999px;
  border: 1px solid var(--accent-emerald-mint);
  animation: pulseRings 2.2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

@keyframes pulseRings {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Section Rule Label */
.section-rule-label {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-emerald-mint);
}

.section-rule-label::before {
  content: '';
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-emerald-mint) 0%, rgba(16, 185, 129, 0.2) 100%);
}

/* ==========================================================================
   iOS 27 WEBKIT & LIGHTHOUSE CORE WEB VITALS OPTIMIZATIONS
   ========================================================================== */
#floating-cart-btn {
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  right: calc(1rem + env(safe-area-inset-right, 0px));
  z-index: 50;
  min-height: 48px;
  min-width: 48px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.site-footer {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)) !important;
}

/* Touch Targets & WebKit Acceleration */
button, a, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Minimum 48px Touch Targets for Interactive Action Controls */
.curated-tab-btn,
.btn-quick-add,
.btn-quick-add-kit,
#floating-cart-btn,
#checkout-whatsapp-btn,
#hero-explore-btn,
#open-review-modal-btn,
#submit-review-btn {
  min-height: 48px;
}

/* CLS = 0 Guarantees */
.product-image-container {
  aspect-ratio: 1 / 1;
  width: 100%;
}

.product-image-container img {
  aspect-ratio: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Prevent auto-zoom on mobile form inputs */
@media screen and (max-width: 767px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* ==========================================================================
   PRODUCT CARDS RESPONSIVE GRID ARCHITECTURE
   ========================================================================== */
.curated-product-grid,
.botanical-product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  width: 100%;
}

@media (min-width: 640px) and (max-width: 1023px) {
  .curated-product-grid,
  .botanical-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .curated-product-grid,
  .botanical-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
  }
}

/* ==========================================================================
   UDONGO NA COCOCHIPS (NURSERY SUBSTRATE) RESPONSIVE ARCHITECTURE
   ========================================================================== */
.growing-media-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.growing-media-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .growing-media-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
  .growing-media-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .growing-media-layout {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.25fr);
    gap: 2.5rem;
    align-items: start;
  }
  .growing-media-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
}

