@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=Outfit:wght@300;400;500&display=swap');

:root {
  /* Typography */
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Outfit', sans-serif;
  
  /* Colors */
  --bg-color: #F8F7F4;       /* Soft porcelain/cream */
  --text-color: #1A1C19;     /* Deep rich black */
  --accent-green: #2B4533;   /* Matcha green */
  --accent-gold: #C8A97E;    /* Subtle brushed gold */
  --accent-amber: #9E4A22;   /* Black tea amber */
  --glass-bg: rgba(248, 247, 244, 0.85);

  /* Spacing & Layout */
  --max-width: 1400px;
  --section-padding: 8rem 2rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Typography Classes */
h1, h2, h3, h4, h5, h6, .serif {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.1;
}

h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  margin-bottom: 2rem;
}

p {
  font-size: 1.125rem;
  font-weight: 300;
  max-width: 60ch;
}

.text-gold { color: var(--accent-gold); }
.text-green { color: var(--accent-green); }

/* Navigation */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200, 169, 126, 0.2);
  transition: all 0.4s ease;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--text-color);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 3rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--accent-gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 5%;
  position: relative;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  mix-blend-mode: difference;
  color: #fff;
}

.hero-content h1 {
  margin-bottom: 1.5rem;
  color: #fff;
  opacity: 0;
  animation: slideUp 1s 0.2s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: slideUp 1s 0.4s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  position: relative;
  overflow: hidden;
  transition: color 0.4s;
  opacity: 0;
  animation: slideUp 1s 0.6s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent-gold);
  z-index: -1;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}

.btn:hover {
  color: var(--bg-color);
}

.btn:hover::before {
  transform: scaleY(1);
  transform-origin: top;
}

.hero-image {
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  clip-path: inset(0 0 0 100%);
  animation: revealRight 1.5s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

/* Featured Section */
.featured {
  padding: var(--section-padding);
  background-color: var(--bg-color);
}

.featured-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4rem;
  padding: 0 5%;
}

.tea-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 4rem;
  padding: 0 5%;
}

.tea-card {
  position: relative;
  cursor: pointer;
  group: tea-card;
}

.tea-image-container {
  overflow: hidden;
  aspect-ratio: 4/5;
  margin-bottom: 1.5rem;
}

.tea-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tea-card:hover .tea-image-container img {
  transform: scale(1.05);
}

.tea-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.tea-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.tea-origin {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-green);
}

.tea-price {
  font-size: 1.125rem;
  font-family: var(--font-serif);
}

/* History / Editorial Section */
.editorial {
  padding: var(--section-padding);
  background-color: var(--accent-green);
  color: var(--bg-color);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 6rem;
}

.editorial-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
}

.editorial-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1/1;
  background: rgba(26, 28, 25, 0.2);
}

.editorial-media .editorial-img {
  display: block;
  height: 100%;
}

.editorial-content h2 {
  color: var(--accent-gold);
}

.editorial-content p {
  color: rgba(248, 247, 244, 0.8);
  margin-bottom: 2rem;
}

/* Animation Review */
.animation-review {
  min-height: 100vh;
  padding: 8rem 5% 5rem;
  background: var(--accent-green);
  color: var(--bg-color);
}

.animation-review-header {
  max-width: 980px;
  margin: 0 auto 3rem;
  text-align: center;
}

.animation-review-header h1 {
  color: var(--accent-gold);
  margin-bottom: 1rem;
}

.animation-review-header p {
  margin: 0 auto;
  color: rgba(248, 247, 244, 0.82);
}

.animation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 920px;
  margin: 0 auto;
}

.animation-card {
  border: 1px solid rgba(200, 169, 126, 0.26);
  background: rgba(248, 247, 244, 0.06);
}

.animation-card video {
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: rgba(26, 28, 25, 0.25);
}

.animation-card-info {
  padding: 1.15rem;
}

.animation-card-info h2 {
  margin-bottom: 0.5rem;
  color: var(--accent-gold);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
}

.animation-card-info p {
  color: rgba(248, 247, 244, 0.82);
  font-size: 1rem;
}

/* Footer */
footer {
  padding: 6rem 5% 2rem;
  background-color: var(--text-color);
  color: var(--bg-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-col h4 {
  font-size: 1.25rem;
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links a {
  color: rgba(248, 247, 244, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--bg-color);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(248, 247, 244, 0.1);
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(248, 247, 244, 0.5);
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes revealRight {
  from {
    clip-path: inset(0 0 0 100%);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* Utilities for Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  h1 { font-size: 3.5rem; }
  .hero-image { width: 100%; opacity: 0.6; }
  .editorial { grid-template-columns: 1fr; }
  .animation-grid { grid-template-columns: 1fr; max-width: 560px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

}

@media (max-width: 600px) {
  .nav-links { display: none; } /* Mobile menu needed in reality */
  .footer-grid { grid-template-columns: 1fr; }
}

/* Cart Drawer */
#cart-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(26,28,25,0.4);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}
#cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

#cart-drawer {
  position: fixed;
  top: 0; right: -450px; width: 100%; max-width: 450px; height: 100%;
  background: var(--bg-color);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: right 0.5s cubic-bezier(0.86, 0, 0.07, 1);
  box-shadow: -10px 0 30px rgba(0,0,0,0.1);
}
#cart-drawer.active {
  right: 0;
}

.cart-drawer-header {
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(26,28,25,0.1);
}
.cart-drawer-header h2 { margin-bottom: 0; font-size: 2rem; }
.cart-close-btn { background: none; border: none; font-size: 2rem; cursor: pointer; color: var(--text-color); }

.cart-drawer-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.cart-drawer-item {
  display: flex;
  gap: 1.5rem;
}

.cart-drawer-img {
  width: 80px;
  height: 100px;
  object-fit: cover;
}

.cart-drawer-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cart-drawer-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.25rem;
}

.cart-drawer-title { 
  font-family: var(--font-serif); 
  font-size: 1.1rem; 
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.cart-drawer-remove { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: rgba(26,28,25,0.4); line-height: 1; }
.cart-drawer-remove:hover { color: var(--accent-amber); }
.cart-drawer-variant { font-size: 0.8rem; color: rgba(26,28,25,0.6); margin-bottom: 1rem; }

.cart-drawer-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-drawer-price { font-family: var(--font-serif); font-size: 1.1rem; }

.small-qty { transform: scale(0.8); transform-origin: left; }
.small-qty .qty-input { width: 30px; display: inline-block; }

.cart-drawer-footer {
  padding: 2rem;
  border-top: 1px solid rgba(26,28,25,0.1);
  background: var(--bg-color);
}
.cart-drawer-subtotal-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
}
.btn-checkout {
  display: block; width: 100%; text-decoration: none;
}

/* Product Detail Page */
.product-page {
  padding: 10rem 5% 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.product-gallery {
  position: sticky;
  top: 8rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.product-gallery-main {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.product-details {
  display: flex;
  flex-direction: column;
}

.product-meta-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(26, 28, 25, 0.1);
}

.product-origin-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-green);
  margin-bottom: 0.5rem;
  display: inline-block;
}

.product-title-large {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
}

.product-price-large {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--accent-amber);
}

.product-description {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 3rem;
  color: rgba(26, 28, 25, 0.8);
}

.add-to-cart-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid rgba(26, 28, 25, 0.2);
  width: max-content;
}

.qty-btn {
  background: transparent;
  border: none;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-color);
}

.qty-input {
  width: 50px;
  text-align: center;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 1rem;
}

.btn-large {
  background-color: var(--accent-green);
  color: var(--bg-color);
  text-align: center;
  padding: 1.25rem;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.btn-large:hover {
  background-color: var(--text-color);
  color: var(--bg-color);
}

.btn-large::before {
  display: none; /* Override general btn behavior */
}

/* Accordion */
.accordion {
  border-top: 1px solid rgba(26, 28, 25, 0.1);
}

.accordion-item {
  border-bottom: 1px solid rgba(26, 28, 25, 0.1);
  padding: 1.5rem 0;
}

.accordion-header {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-content {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: rgba(26, 28, 25, 0.7);
  display: none;
}

.accordion-item.active .accordion-content {
  display: block;
}

@media (max-width: 900px) {
  .product-page {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .product-gallery {
    position: relative;
    top: 0;
  }
}
