/* =========================================
   HERBY — Global Design System
   Editorial botanical luxury, modern 2026
   ========================================= */

:root {
  /* Greens */
  --forest-900: #0f2d1f;
  --forest-800: #143d2a;
  --forest-700: #1f4d34;
  --forest-600: #2a6344;
  --forest-500: #3a8257;
  --forest-400: #5ba877;
  --forest: #1f4d34;
  --moss: #4a6b4c;
  --sage-700: #6b8959;
  --sage: #87a96b;
  --sage-300: #b5cd9e;
  --sage-100: #e6eedd;
  --sage-50:  #f1f5ea;
  --herby-green: #2ed87a;
  --herby-green-dark: #1ca85f;

  /* Warm neutrals */
  --cream: #faf7f0;
  --cream-200: #f4efe3;
  --cream-300: #ebe3d0;
  --paper: #fffdf7;
  --white: #ffffff;

  /* Text & charcoal */
  --ink: #1a1a1a;
  --ink-700: #2b2b2b;
  --ink-500: #4a4a4a;
  --mute-500: #7a7569;
  --mute-400: #9b9588;
  --mute-300: #bfb8a8;
  --mute-200: #e0dbce;
  --mute-100: #efeadd;

  /* Accent */
  --bronze: #b8935a;
  --bronze-dark: #8a6b3b;
  --blush: #e8d4c1;
  --blush-200: #f2e3d5;
  --clay: #c98a6b;

  /* Feedback */
  --success: #3a8257;
  --error: #b3493a;
  --warning: #c9892e;
  --info: #446b82;

  /* Primary alias */
  --primary: var(--herby-green);
  --primary-dark: var(--herby-green-dark);
  --primary-light: var(--sage);

  /* Radii */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 34px;
  --r-full: 9999px;

  /* Shadows (soft, paper-like) */
  --sh-sm: 0 1px 2px rgba(31,77,52,0.05), 0 1px 1px rgba(31,77,52,0.04);
  --sh-md: 0 6px 22px rgba(31,77,52,0.08), 0 2px 6px rgba(31,77,52,0.05);
  --sh-lg: 0 18px 48px rgba(31,77,52,0.12), 0 6px 14px rgba(31,77,52,0.06);
  --sh-xl: 0 30px 80px rgba(15,45,31,0.18);
  --sh-green: 0 14px 40px rgba(46,216,122,0.28);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0.05, 0.36, 1);
  --t-fast: 160ms var(--ease);
  --t: 280ms var(--ease);
  --t-slow: 520ms var(--ease);

  /* Fonts */
  --font-serif: "Fraunces", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", "Söhne", -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --nav-h: 80px;
  --topbar-h: 40px;
  --container: 1440px;
  --gutter: 28px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color var(--t-fast), opacity var(--t-fast); }
a:hover { color: var(--herby-green-dark); }
img, svg, video { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: 0; background: none; font-family: inherit; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* ============== Typography ============== */

h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.018em;
  color: var(--forest-900);
  line-height: 1.08;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.6rem); font-weight: 300; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.9rem); font-weight: 300; }
h3 { font-size: clamp(1.3rem, 2vw, 1.75rem); font-weight: 400; }
h4 { font-size: 1.15rem; font-weight: 500; }
h5 { font-size: 1rem; font-weight: 600; }

p { color: var(--ink-500); font-size: 1rem; }
.lead { font-family: var(--font-serif); font-size: clamp(1.125rem, 1.6vw, 1.4rem); font-weight: 300; color: var(--ink-700); line-height: 1.5; letter-spacing: -0.005em; }
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--herby-green-dark);
}
.eyebrow--bronze { color: var(--bronze); }
.eyebrow--cream  { color: var(--cream); }

/* ============== Layout helpers ============== */

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-sm { max-width: 960px; margin: 0 auto; padding: 0 var(--gutter); }
.container-xs { max-width: 620px; margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: 100px 0; }
.section-sm { padding: 56px 0; }
.section-lg { padding: 140px 0; }

.section--cream { background: var(--cream); }
.section--paper { background: var(--paper); }
.section--sage { background: var(--sage-50); }
.section--dark { background: var(--forest-800); color: var(--cream); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--cream); }
.section--dark p { color: rgba(250,247,240,0.75); }

.divider-leaf {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  color: var(--sage-700); opacity: 0.75; margin: 26px auto;
}
.divider-leaf::before, .divider-leaf::after { content: ""; flex: 0 0 60px; border-top: 1px solid var(--sage-300); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
.grid-8 { grid-template-columns: repeat(8, 1fr); }
.grid--gap-lg { gap: 40px; }
.grid--gap-sm { gap: 12px; }

@media (max-width: 1100px) {
  .grid-5, .grid-6 { grid-template-columns: repeat(4, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
  .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 68px 0; }
  .section-lg { padding: 88px 0; }
}

.stack { display: flex; flex-direction: column; }
.row { display: flex; }
.row-center { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gap-6 { gap: 6px; } .gap-10 { gap: 10px; } .gap-14 { gap: 14px; } .gap-20 { gap: 20px; } .gap-28 { gap: 28px; }
.mt-4{margin-top:16px}.mt-6{margin-top:24px}.mt-8{margin-top:32px}.mt-12{margin-top:48px}.mt-16{margin-top:64px}
.mb-4{margin-bottom:16px}.mb-6{margin-bottom:24px}.mb-8{margin-bottom:32px}.mb-12{margin-bottom:48px}

.text-center { text-align: center; }
.text-right { text-align: right; }
.w-100 { width: 100%; }
.hidden { display: none !important; }

/* ============== Buttons ============== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  border-radius: var(--r-full);
  transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--herby-green); color: var(--ink); box-shadow: var(--sh-green); }
.btn-primary:hover { background: var(--herby-green-dark); color: var(--white); box-shadow: 0 18px 44px rgba(46,216,122,0.38); }

.btn-dark { background: var(--ink); color: var(--cream); }
.btn-dark:hover { background: var(--ink-700); color: var(--cream); }

.btn-cream { background: var(--cream); color: var(--forest-800); }
.btn-cream:hover { background: var(--white); color: var(--forest-900); }

.btn-bronze { background: var(--bronze); color: var(--white); }
.btn-bronze:hover { background: var(--bronze-dark); }

.btn-outline { background: transparent; color: var(--herby-green-dark); border: 1px solid var(--herby-green); }
.btn-outline:hover { background: var(--herby-green); color: var(--ink); }

.btn-outline-cream { background: transparent; color: var(--cream); border: 1px solid rgba(250,247,240,0.45); }
.btn-outline-cream:hover { background: var(--cream); color: var(--forest-800); }

.btn-ghost { background: transparent; color: var(--ink-700); padding: 10px 18px; }
.btn-ghost:hover { background: var(--mute-100); color: var(--forest-800); }

.btn-link { padding: 6px 0; border-radius: 0; border-bottom: 1px solid currentColor; color: var(--forest-800); }
.btn-link:hover { color: var(--bronze); border-color: var(--bronze); }

.btn-sm { padding: 10px 18px; font-size: 0.84rem; }
.btn-lg { padding: 18px 38px; font-size: 1rem; }
.btn-xl { padding: 22px 48px; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: var(--r-full); }

/* ============== Pill / Tag / Badge ============== */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}
.badge-forest { background: var(--forest-700); color: var(--cream); }
.badge-sage   { background: var(--sage-100); color: var(--forest-700); }
.badge-bronze { background: var(--bronze); color: var(--white); }
.badge-cream  { background: var(--cream); color: var(--forest-800); }
.badge-outline{ background: transparent; color: var(--forest-700); border:1px solid var(--sage-300); }
.badge-new    { background: var(--forest-700); color: var(--cream); }
.badge-best   { background: var(--bronze); color: var(--white); }
.badge-limited{ background: var(--clay); color: var(--white); }
.badge-sale   { background: var(--error); color: var(--cream); }
.badge-dot { width:8px;height:8px;border-radius:50%;background:currentColor;display:inline-block; }

.tag {
  display:inline-flex;align-items:center;gap:6px;
  padding: 8px 14px; border-radius: var(--r-full);
  background: var(--cream-200); color: var(--ink-700);
  font-size: 0.82rem; font-weight: 500;
  border: 1px solid transparent;
  transition: var(--t-fast);
}
.tag:hover { background: var(--sage-100); border-color: var(--sage-300); color: var(--forest-700); }
.tag.active { background: var(--herby-green); color: var(--ink); border-color: var(--herby-green); }

/* ============== Star rating ============== */

.stars { display: inline-flex; gap: 2px; color: var(--bronze); font-size: 0.82rem; }
.star { letter-spacing: 1px; }
.star.empty { color: var(--mute-300); }

/* ============== Product card ============== */

.product-card {
  background: var(--paper);
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  transition: transform var(--t), box-shadow var(--t);
  border: 1px solid transparent;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: var(--mute-200); }

.product-card__img-wrap {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--cream-200);
  overflow: hidden;
}
.product-card__img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 700ms var(--ease);
}
.product-card:hover .product-card__img { transform: scale(1.06); }

.product-card__badges { position: absolute; top: 14px; left: 14px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.product-card__fav {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 38px; height: 38px;
  background: rgba(255,253,247,0.9);
  backdrop-filter: blur(6px);
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  transition: var(--t-fast);
  color: var(--ink-700);
}
.product-card__fav:hover { background: var(--white); color: var(--forest-700); }
.product-card__fav.active { color: var(--clay); }

.product-card__quick {
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  background: var(--forest-700);
  color: var(--cream);
  padding: 12px;
  border-radius: var(--r-full);
  font-weight: 500;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0; transform: translateY(6px);
  transition: var(--t);
  text-align: center;
}
.product-card:hover .product-card__quick { opacity: 1; transform: translateY(0); }

.product-card__body { padding: 18px 4px 4px; }
.product-card__brand {
  font-size: 0.7rem; color: var(--mute-500);
  text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 6px;
}
.product-card__name {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.075rem;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.product-card__desc {
  font-size: 0.82rem; color: var(--mute-500);
  margin-bottom: 10px;
}
.product-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.product-card__price { font-size: 1rem; font-weight: 600; color: var(--forest-900); }
.product-card__price del { color: var(--mute-400); font-weight: 400; margin-right: 6px; font-size: 0.85rem; }
.product-card__rating { font-size: 0.78rem; color: var(--mute-500); display: inline-flex; gap: 6px; align-items: center; }

/* ============== Section header ============== */
.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 48px; flex-wrap: wrap;
}
.sec-head h2 { max-width: 640px; }
.sec-head .eyebrow { margin-bottom: 14px; display:block; }
.sec-head__text p { max-width: 560px; margin-top: 14px; }

/* ============== Skeleton ============== */
.skeleton {
  background: linear-gradient(90deg, var(--cream-200) 0%, var(--cream-300) 50%, var(--cream-200) 100%);
  background-size: 200% 100%;
  animation: sk 1.4s infinite linear;
  border-radius: var(--r-md);
}
@keyframes sk { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ============== Toast ============== */
#toast-container {
  position: fixed; bottom: 28px; right: 28px; z-index: 10000;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--forest-800);
  color: var(--cream);
  padding: 14px 20px;
  border-radius: var(--r-full);
  box-shadow: var(--sh-lg);
  display: flex; align-items: center; gap: 12px;
  font-size: 0.92rem;
  animation: t-in 0.35s var(--ease) forwards;
  max-width: 380px;
}
.toast.success { background: var(--forest-700); }
.toast.error   { background: var(--error); }
.toast.info    { background: var(--ink-700); }
.toast.removing { animation: t-out 0.25s var(--ease) forwards; }
@keyframes t-in  { from { opacity:0; transform: translateY(10px) } to { opacity:1; transform:none } }
@keyframes t-out { from { opacity:1 } to { opacity:0; transform: translateY(-6px) } }

/* ============== Scroll reveal ============== */
.animate-in { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.animate-in.visible { opacity: 1; transform: none; }

/* ============== Forms ============== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-size: 0.78rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-500); }
.field input, .field select, .field textarea {
  background: var(--paper);
  border: 1px solid var(--mute-200);
  padding: 14px 18px;
  border-radius: var(--r-md);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--forest-700);
  box-shadow: 0 0 0 3px rgba(31,77,52,0.12);
  background: var(--white);
}
.field textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

.checkbox { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--ink-500); }
.checkbox input { accent-color: var(--forest-700); }

/* ============== Trust marks row ============== */
.trust-row {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--mute-200);
  border-bottom: 1px solid var(--mute-200);
}
.trust-row__item {
  text-align: center; padding: 22px 14px;
  border-right: 1px solid var(--mute-200);
  font-size: 0.86rem;
  color: var(--ink-500);
  letter-spacing: 0.05em;
}
.trust-row__item:last-child { border-right: 0; }
.trust-row__item strong { display: block; color: var(--forest-800); font-weight: 600; margin-bottom: 2px; font-family: var(--font-serif); font-size: 1rem; letter-spacing: 0; }
@media (max-width: 800px) {
  .trust-row { grid-template-columns: repeat(2, 1fr); }
  .trust-row__item:nth-child(even) { border-right: 0; }
}

/* ============== Breadcrumbs ============== */
.crumbs {
  display: flex; align-items: center; gap: 8px;
  color: var(--mute-500); font-size: 0.82rem;
  margin: 18px 0 10px;
}
.crumbs a:hover { color: var(--forest-700); }
.crumbs .sep { color: var(--mute-400); }

/* ============== Misc ============== */
.grain {
  position: relative;
}
.grain::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(31,77,52,0.045) 1px, transparent 1px);
  background-size: 3px 3px;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.4;
}
