/* =============================================================================
   Yúna Tea — shared store styles
   Built on the existing site's design tokens (see index.html / contact.html).
   ========================================================================== */

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

:root {
  --sand:  #f5f0e8;
  --linen: #ede5d5;
  --bark:  #7a5c42;
  --earth: #4a3728;
  --warm:  #c8a882;
  --goji:  #b85c3a;
  --mist:  rgba(245,240,232,0.7);

  --line:  rgba(200,168,130,0.30);   /* hairline / borders */
  --header-h: 64px;
}

html { scroll-behavior: smooth; }

html, body {
  min-height: 100%;
  background: var(--sand);
  color: var(--earth);
  font-family: 'Jost', sans-serif;
  font-weight: 400;
}

/* — Textured background (identical to the landing page) — */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(122,92,66,0.13) 0%, transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* — Decorative mountain silhouette — */
.mountains {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 34%;
  z-index: 0;
  opacity: 0.13;
  pointer-events: none;
}
.mountain-back  { fill: var(--bark); }
.mountain-front { fill: var(--earth); opacity: 0.5; }

a { color: inherit; }

/* — Layout container — */
.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(245,240,232,0.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .brand {
  display: inline-flex;
  align-items: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1.7rem;
  letter-spacing: 0.06em;
  color: var(--earth);
  text-decoration: none;
}
.site-header .brand img { height: 36px; width: auto; display: block; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.site-nav a {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bark);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.3s ease;
}
.site-nav a:hover { border-bottom-color: var(--warm); }

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--bark);
  cursor: pointer;
  padding: 6px;
  line-height: 0;
  transition: color 0.3s ease;
}
.cart-btn:hover { color: var(--earth); }
.cart-btn svg { width: 22px; height: 22px; }
.cart-count {
  position: absolute;
  top: -4px; right: -6px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--goji);
  color: var(--sand);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-count[hidden] { display: none; }

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border: 1px solid var(--warm);
  border-radius: 2px;
  background: rgba(245,240,232,0.6);
  backdrop-filter: blur(4px);
  font-family: 'Jost', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--bark);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn:hover { background: var(--bark); color: var(--sand); border-color: var(--bark); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.solid { background: var(--bark); color: var(--sand); border-color: var(--bark); }
.btn.solid:hover { background: var(--earth); border-color: var(--earth); }
.btn.block { display: block; width: 100%; }

/* =========================================================================
   Shared decorative divider (from the landing page)
   ========================================================================= */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 16px 0 4px;
}
.divider-line {
  width: 60px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--warm));
}
.divider-line.right { background: linear-gradient(90deg, var(--warm), transparent); }
.divider-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--goji); opacity: 0.7; }

.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--bark);
}

/* =========================================================================
   Home hero
   ========================================================================= */
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.4rem 2rem 1rem;
}
.hero .logo {
  height: 52px; width: auto;
  filter: brightness(0) saturate(100%) invert(27%) sepia(18%) saturate(700%) hue-rotate(340deg) brightness(80%);
  opacity: 0; transform: translateY(18px);
  animation: rise 1.1s cubic-bezier(.22,1,.36,1) 0.1s forwards;
}
.hero .headline {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  letter-spacing: 0.03em;
  line-height: 1.12;
  color: var(--earth);
  margin-top: 0;
  opacity: 0; animation: rise 1.1s cubic-bezier(.22,1,.36,1) 0.3s forwards;
}
.hero .headline em { font-style: italic; color: var(--bark); }
.hero .lede {
  max-width: 30rem;
  margin: 14px auto 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--bark);
  opacity: 0; animation: rise 1s ease 0.5s forwards;
}

/* =========================================================================
   Section heading
   ========================================================================= */
.section { position: relative; z-index: 1; padding: 0 0 3rem; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  color: var(--earth);
  letter-spacing: 0.02em;
}

/* =========================================================================
   Product grid (home / shop)
   ========================================================================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  max-width: 760px;
  margin: 0 auto;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.35);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(74,55,40,0.10); }
.product-card .thumb {
  display: block;
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: cover;
  background: var(--linen);
}
.product-card .card-body { padding: 22px 22px 26px; text-align: center; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .card-cat { font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--warm); }
.product-card .card-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--earth);
  text-decoration: none;
  line-height: 1.2;
}
.product-card .card-name:hover { color: var(--bark); }
.product-card .card-price { font-size: 1rem; color: var(--bark); margin-top: 2px; }
.product-card .card-actions { margin-top: 16px; display: flex; gap: 10px; justify-content: center; }

/* =========================================================================
   Single product page
   ========================================================================= */
.product {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
  padding: 3rem 0 3.5rem;
}
.breadcrumb { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bark); margin-bottom: 22px; }
.breadcrumb a { text-decoration: none; opacity: 0.8; }
.breadcrumb a:hover { opacity: 1; border-bottom: 1px solid var(--warm); }
.breadcrumb .sep { margin: 0 8px; opacity: 0.5; }

/* Gallery */
.gallery-main {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--linen);
  border: 1px solid var(--line);
  border-radius: 3px;
}
.thumbs { display: flex; gap: 12px; margin-top: 14px; }
.thumbs img {
  width: 68px; height: 68px;
  object-fit: cover;
  background: var(--linen);
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.25s ease, border-color 0.25s ease;
}
.thumbs img:hover, .thumbs img.active { opacity: 1; border-color: var(--warm); }

/* Buy box */
.buybox .cat { font-size: 0.66rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--warm); }
.buybox h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  color: var(--earth);
  margin: 8px 0 14px;
}
.buybox .price { font-size: 1.4rem; color: var(--bark); margin-bottom: 20px; }
.buybox .short { font-size: 1rem; line-height: 1.7; color: var(--earth); margin-bottom: 12px; }
.buybox .netweight { font-size: 0.9rem; color: var(--earth); margin: 0 0 24px; }
.buybox .netweight strong { color: var(--bark); font-weight: 400; letter-spacing: 0.02em; }

/* Health benefits block */
.health .rule { height: 1px; background: var(--line); margin: 24px 0 20px; }
.health .benefits-title { font-family: 'Jost', sans-serif; font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--bark); margin-bottom: 14px; }
.health .benefits { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.health .benefits li { position: relative; padding-left: 20px; font-size: 0.92rem; line-height: 1.6; color: var(--earth); }
.health .benefits li::before { content: ''; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--goji); opacity: 0.7; }

/* Size selector (Single / Set of 3) */
.variant-select { display: flex; gap: 12px; margin-bottom: 26px; flex-wrap: wrap; }
.variant-opt {
  flex: 1 1 130px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 16px;
  border: 1px solid var(--warm);
  border-radius: 3px;
  background: rgba(245,240,232,0.5);
  cursor: pointer;
  text-align: left;
  font-family: 'Jost', sans-serif;
  color: var(--earth);
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.variant-opt:hover { border-color: var(--bark); }
.variant-opt.active { border-color: var(--bark); background: rgba(122,92,66,0.10); box-shadow: inset 0 0 0 1px var(--bark); }
.variant-opt .vo-label { font-size: 0.95rem; letter-spacing: 0.04em; }
.variant-opt .vo-sub { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bark); }
.variant-opt .vo-price { font-size: 1rem; color: var(--bark); margin-top: 4px; }

.buy-row { display: flex; align-items: stretch; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }

/* Quantity stepper */
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--warm);
  border-radius: 2px;
  background: rgba(245,240,232,0.6);
}
.qty button {
  width: 42px; height: 46px;
  background: transparent;
  border: none;
  color: var(--bark);
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.2s ease;
}
.qty button:hover { color: var(--earth); }
.qty input {
  width: 46px; height: 46px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: transparent;
  font-family: 'Jost', sans-serif;
  font-size: 1rem;
  color: var(--earth);
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.buybox .meta { border-top: 1px solid var(--line); padding-top: 18px; font-size: 0.8rem; color: var(--bark); line-height: 1.8; }
.buybox .meta span { color: var(--warm); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.66rem; margin-right: 8px; }

/* Tabs */
.tabs { position: relative; z-index: 1; padding: 1rem 0 4rem; max-width: 820px; margin: 0 auto; }
.tab-btns { display: flex; gap: 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tab-btns button {
  background: transparent;
  border: none;
  padding: 14px 18px;
  font-family: 'Jost', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bark);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.tab-btns button:hover { color: var(--earth); }
.tab-btns button.active { color: var(--earth); border-bottom-color: var(--goji); }
.tab-panel { display: none; padding: 28px 4px; font-size: 1rem; line-height: 1.8; color: var(--earth); }
.tab-panel.active { display: block; animation: rise 0.5s ease forwards; }
.tab-panel table { width: 100%; border-collapse: collapse; }
.tab-panel td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tab-panel td:first-child { color: var(--bark); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; width: 34%; }

/* You may also like */
.related { position: relative; z-index: 1; text-align: center; padding: 2rem 0 5rem; }

/* =========================================================================
   Cart drawer (slide-in) + overlay
   ========================================================================= */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(74,55,40,0.35);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  z-index: 40;
}
.cart-overlay.open { opacity: 1; visibility: visible; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: 380px;
  max-width: 88vw;
  background: var(--sand);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 40px rgba(74,55,40,0.14);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(.22,1,.36,1);
  z-index: 50;
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer .drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}
.cart-drawer .drawer-head h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1.5rem;
  color: var(--earth);
  letter-spacing: 0.04em;
}
.drawer-close { background: transparent; border: none; color: var(--bark); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 4px 6px; }
.drawer-close:hover { color: var(--earth); }

.cart-lines { flex: 1; overflow-y: auto; padding: 8px 24px; }
.cart-empty { text-align: center; color: var(--bark); padding: 48px 12px; font-size: 0.95rem; line-height: 1.7; }

.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.cart-line img { width: 64px; height: 64px; object-fit: cover; background: var(--linen); border: 1px solid var(--line); border-radius: 2px; }
.cart-line .cl-name { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; color: var(--earth); line-height: 1.2; text-decoration: none; }
.cart-line .cl-name:hover { color: var(--bark); }
.cart-line .cl-price { font-size: 0.82rem; color: var(--bark); margin-top: 4px; }
.cart-line .cl-variant { font-size: 0.82rem; color: var(--bark); margin-top: 4px; }
.cart-line .cl-controls { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.cart-line .cl-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 2px; }
.cart-line .cl-qty button { width: 26px; height: 26px; background: transparent; border: none; color: var(--bark); cursor: pointer; font-size: 0.9rem; }
.cart-line .cl-qty span { min-width: 26px; text-align: center; font-size: 0.85rem; }
.cart-line .cl-remove { background: transparent; border: none; color: var(--bark); opacity: 0.6; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }
.cart-line .cl-remove:hover { opacity: 1; color: var(--goji); }
.cart-line .cl-linetotal { text-align: right; font-size: 0.9rem; color: var(--earth); white-space: nowrap; }

.cart-foot { border-top: 1px solid var(--line); padding: 20px 24px 24px; }
.cart-subtotal { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.cart-subtotal .lbl { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--bark); }
.cart-subtotal .amt { font-size: 1.2rem; color: var(--earth); }
.cart-note { font-size: 0.72rem; color: var(--bark); opacity: 0.8; margin-bottom: 16px; line-height: 1.5; }
.checkout-error { display: none; color: var(--goji); font-size: 0.78rem; margin-top: 12px; text-align: center; line-height: 1.5; }
.checkout-error.visible { display: block; }

/* =========================================================================
   Cart page
   ========================================================================= */
.cart-page { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; padding: 3rem 0 5rem; }
.cart-page h1 { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: clamp(2rem,4vw,2.8rem); color: var(--earth); text-align: center; margin-bottom: 32px; }
.cart-page .cart-line { grid-template-columns: 84px 1fr auto; }
.cart-page .cart-line img { width: 84px; height: 84px; }
.cart-page .cart-foot { border: 1px solid var(--line); border-radius: 3px; margin-top: 24px; background: rgba(255,255,255,0.35); }
.cart-page-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 22px; flex-wrap: wrap; }

/* =========================================================================
   Simple centered message pages (order confirmed / cancelled)
   ========================================================================= */
.message-page { position: relative; z-index: 1; min-height: calc(100vh - var(--header-h)); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4rem 2rem; }
.message-page .mark { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 300; font-size: clamp(2.2rem,5vw,3.2rem); color: var(--bark); margin-bottom: 8px; }
.message-page .text { font-size: 1.05rem; line-height: 1.7; color: var(--earth); max-width: 30rem; margin: 10px auto 28px; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { position: relative; z-index: 1; text-align: center; padding: 2.5rem 2rem 3rem; border-top: 1px solid var(--line); }
.site-footer .foot-brand { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 1.4rem; letter-spacing: 0.06em; color: var(--earth); }
.site-footer .foot-links { margin-top: 12px; font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bark); }
.site-footer .foot-links a { text-decoration: none; padding: 0 8px; }
.site-footer .foot-links a:hover { color: var(--earth); }
.site-footer .foot-sep { opacity: 0.4; }

/* =========================================================================
   Animation + motion preferences
   ========================================================================= */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero .logo, .hero .headline, .hero .lede { opacity: 1; transform: none; }
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 820px) {
  .product { grid-template-columns: 1fr; gap: 32px; }
  .wrap { padding: 0 1.4rem; }
  .site-header { padding: 0 1.4rem; }
}
@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; gap: 28px; max-width: 380px; }
  .site-nav { gap: 16px; }
  .site-nav a { font-size: 0.64rem; letter-spacing: 0.16em; }
  .hero { padding: 3.5rem 1.4rem 2.5rem; }
}
