/* ============================================
   Sain — Extrait de Parfum
   Design System & Styles
   ============================================ */

/* ---------- CSS VARIABLES ---------- */
:root {
  --deep-umber: #3B2117;
  --dark-bg: #FFFFFF;
  --gold: #C9A96E;
  --gold-light: #E2C992;
  --gold-glow: rgba(201, 169, 110, 0.25);
  --cream: #FAF3E8;
  --cream-muted: #E8DDD0;
  --white: #FFFFFF;
  --black: #0A0604;
  --text-dark: #3B2117;
  --text-muted: #6B5545;

  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --nav-height: 72px;
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- RESET ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--white);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

/* ---------- NAVIGATION ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(59, 33, 23, 0.08);
  transition: background var(--transition-smooth), box-shadow var(--transition-smooth);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 20px rgba(59, 33, 23, 0.06);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 40px;
  width: auto;
  filter: brightness(1.1);
  transition: filter var(--transition-smooth);
}

.nav-logo:hover .logo-img {
  filter: brightness(1.3);
}

.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
  transition: color var(--transition-smooth);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width var(--transition-smooth);
}

.nav-link:hover {
  color: var(--deep-umber);
}

.nav-link:hover::after {
  width: 100%;
}

/* Desktop nav cart */
.nav-cart-link {
  position: relative;
}

.nav-cart-badge {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--gold);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50px;
  line-height: 18px;
  text-align: center;
  margin-left: 4px;
  vertical-align: middle;
  animation: badgePop 0.3s ease;
}

.nav-cart-badge:empty {
  display: none;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  z-index: 1001;
}

.bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  padding: 16px 24px 24px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(59, 33, 23, 0.08);
}

.mobile-menu.active {
  display: block;
}

.mobile-menu-link {
  display: block;
  padding: 14px 0;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dark);
  border-bottom: 1px solid rgba(59, 33, 23, 0.06);
  transition: color var(--transition-smooth);
}

.mobile-menu-link:hover {
  color: var(--gold);
}

/* ---------- HERO ---------- */
.hero {
  width: 100%;
  padding-top: var(--nav-height);
}

.hero-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  opacity: 0;
  animation: heroFadeIn 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0) 30%,
      rgba(255, 255, 255, 0) 60%,
      rgba(255, 255, 255, 0.4) 100%);
  pointer-events: none;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: scale(1.03);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ---------- PRODUCTS SECTION ---------- */
.products {
  padding: 100px 0 120px;
  background: var(--cream);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  color: var(--deep-umber);
  text-align: center;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 64px;
  font-weight: 300;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* Product Card */
.product-card {
  background: var(--white);
  border: 1px solid rgba(59, 33, 23, 0.08);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition: all var(--transition-smooth);
  cursor: pointer;
}

.product-card:hover {
  border-color: rgba(201, 169, 110, 0.4);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(59, 33, 23, 0.1), 0 0 40px var(--gold-glow);
}

.product-card.expanded {
  border-color: var(--gold);
  box-shadow: 0 20px 60px rgba(59, 33, 23, 0.12), 0 0 50px var(--gold-glow);
}

.card-image-wrapper {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  position: relative;
}

.card-image-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.9), transparent);
  pointer-events: none;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.product-card:hover .card-image {
  transform: scale(1.05);
}

.card-info {
  padding: 20px 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--deep-umber);
  letter-spacing: 0.04em;
}

.card-volume {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.7;
}

.card-profile {
  font-size: 0.85rem;
  color: var(--gold);
  font-style: italic;
  letter-spacing: 0.02em;
}

.card-price {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--deep-umber);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* Card Notes */
.card-notes {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    padding 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.4s ease;
  opacity: 0;
  padding: 0 24px;
  border-top: 1px solid transparent;
}

.product-card.expanded .card-notes {
  max-height: 300px;
  padding: 16px 24px 20px;
  opacity: 1;
  border-top-color: rgba(201, 169, 110, 0.2);
}

.card-notes h4 {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.card-notes ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-notes li {
  font-size: 0.8rem;
  color: var(--text-dark);
  background: rgba(201, 169, 110, 0.08);
  border: 1px solid rgba(201, 169, 110, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}

.card-notes li:hover {
  background: rgba(201, 169, 110, 0.18);
  border-color: rgba(201, 169, 110, 0.4);
}

/* Card toggle chevron */
.card-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  width: 100%;
  color: var(--gold);
  opacity: 0.5;
  transition: all 0.3s ease;
}

.product-card:hover .card-toggle {
  opacity: 1;
}

.product-card.expanded .card-toggle svg {
  transform: rotate(180deg);
}

.card-toggle svg {
  transition: transform 0.3s ease;
}

/* ---------- ADD TO CART CTA ---------- */
.card-cart-actions {
  padding: 0 24px 8px;
}

.btn-add-cart {
  width: 100%;
  padding: 12px 20px;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold) 0%, #D4B87A 50%, var(--gold-light) 100%);
  background-size: 200% 200%;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.btn-add-cart::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.6s ease;
}

.btn-add-cart:hover {
  background-position: 100% 100%;
  box-shadow: 0 6px 20px rgba(201, 169, 110, 0.35);
  transform: translateY(-2px);
}

.btn-add-cart:hover::before {
  left: 100%;
}

/* Quantity Group */
.qty-group {
  display: none;
  margin-top: 10px;
  animation: qtySlideIn 0.3s ease forwards;
}

.qty-group.active {
  display: block;
}

@keyframes qtySlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.qty-input-row {
  display: flex;
  gap: 8px;
}

.qty-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(201, 169, 110, 0.3);
  border-radius: 8px;
  background: var(--cream);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.qty-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.qty-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.btn-qty-confirm {
  padding: 10px 16px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: var(--gold);
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-qty-confirm:hover {
  background: var(--gold-light);
  transform: scale(1.05);
}

.qty-mobile-note {
  margin-top: 8px;
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.7;
  font-style: italic;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* ---------- CART BADGE ---------- */
.cart-badge {
  display: none;
  position: absolute;
  top: 0;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--gold);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-sans);
  border-radius: 50px;
  line-height: 18px;
  text-align: center;
}

.cart-badge.visible {
  display: block;
  animation: badgePop 0.3s var(--transition-spring);
}

@keyframes badgePop {
  0% {
    transform: scale(0);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

.hamburger {
  position: relative;
}

/* Mobile cart count */
.mobile-cart-count {
  display: inline-block;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--gold);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50px;
  line-height: 20px;
  text-align: center;
  margin-left: 8px;
}

.mobile-cart-count:empty {
  display: none;
}

/* ---------- CART MODAL ---------- */
.cart-modal-content {
  max-width: 520px;
  text-align: left;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.cart-modal-content .modal-title,
.cart-modal-content .modal-subtitle {
  text-align: center;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  margin: 0 -8px;
  padding: 0 8px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(59, 33, 23, 0.06);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-img {
  width: 64px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(201, 169, 110, 0.15);
}

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--deep-umber);
  margin-bottom: 4px;
}

.cart-item-qty {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cart-item-subtotal {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--deep-umber);
  white-space: nowrap;
}

.cart-item-remove {
  padding: 4px 8px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.cart-item-remove:hover {
  opacity: 1;
  color: #c0392b;
}

/* Cart Footer */
.cart-footer {
  padding-top: 16px;
  border-top: 2px solid rgba(201, 169, 110, 0.25);
  margin-top: 8px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cart-total span:first-child {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--deep-umber);
}

.cart-total-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.btn-checkout {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold) 0%, #D4B87A 50%, var(--gold-light) 100%);
  background-size: 200% 200%;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.btn-checkout:hover {
  background-position: 100% 100%;
  box-shadow: 0 8px 28px rgba(201, 169, 110, 0.4);
  transform: translateY(-2px);
}

/* Empty cart message */
.cart-empty-msg {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
  padding: 32px 0;
}

/* ---------- CONTACT MODAL ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 33, 23, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--white);
  border: 1px solid rgba(201, 169, 110, 0.3);
  border-radius: 20px;
  padding: 48px 40px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  position: relative;
  transform: translateY(30px) scale(0.95);
  transition: transform var(--transition-spring);
  box-shadow: 0 30px 80px rgba(59, 33, 23, 0.15), 0 0 60px var(--gold-glow);
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.8rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
  line-height: 1;
}

.modal-close:hover {
  color: var(--deep-umber);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--deep-umber);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.modal-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-weight: 300;
}

.modal-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: all 0.3s ease;
}

.modal-link.whatsapp {
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.3);
  color: #25D366;
}

.modal-link.whatsapp:hover {
  background: rgba(37, 211, 102, 0.2);
  border-color: rgba(37, 211, 102, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.15);
}

.modal-link.instagram {
  background: rgba(225, 48, 108, 0.12);
  border: 1px solid rgba(225, 48, 108, 0.3);
  color: #E1306C;
}

.modal-link.instagram:hover {
  background: rgba(225, 48, 108, 0.2);
  border-color: rgba(225, 48, 108, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(225, 48, 108, 0.15);
}

.modal-link svg {
  flex-shrink: 0;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--deep-umber);
  border-top: 1px solid rgba(201, 169, 110, 0.2);
  padding: 52px 24px;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}

.footer-slogan {
  font-size: 0.85rem;
  color: var(--cream-muted);
  letter-spacing: 0.2em;
  font-weight: 300;
  font-style: italic;
}

/* ---------- SCROLL REVEAL ANIMATION ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(2) {
  transition-delay: 0.15s;
}

.reveal:nth-child(3) {
  transition-delay: 0.3s;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .product-grid {
    gap: 24px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .product-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
    gap: 28px;
  }

  .products {
    padding: 64px 0 80px;
  }

  .section-title {
    margin-bottom: 8px;
  }

  .section-subtitle {
    margin-bottom: 40px;
  }

  .hero-media {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 480px) {
  .modal-content {
    padding: 36px 24px;
  }

  .card-info {
    padding: 16px 20px 12px;
  }

  .card-notes {
    padding: 0 20px;
  }

  .product-card.expanded .card-notes {
    padding: 14px 20px 16px;
  }
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--cream);
}

::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 110, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 169, 110, 0.5);
}