/* =========================================================
   Golden Herbs — Shared Stylesheet
   Brand: Premium Editorial (Forest Green + Harvest Gold)
   Built on Bootstrap 5.3 (CSS variable theming)
   ========================================================= */

:root {
  /* Brand palette (see aureum_botanica/DESIGN.md) */
  --gh-primary: #00450d;
  --gh-primary-dark: #002c06;
  --gh-primary-light: #0c5216;
  --gh-gold: #C9A227;
  --gh-gold-dark: #a9871f;
  --gh-surface: #f9f9f6;
  --gh-surface-low: #f4f4f1;
  --gh-surface-container: #eeeeeb;
  --gh-surface-high: #e8e8e5;
  --gh-on-surface: #1a1c1b;
  --gh-on-surface-muted: #41493e;
  --gh-outline-variant: #c0c9bb;
  --gh-white: #ffffff;

  /* Bootstrap theme overrides */
  --bs-primary: var(--gh-primary);
  --bs-primary-rgb: 0, 69, 13;
  --bs-body-bg: var(--gh-surface);
  --bs-body-color: var(--gh-on-surface);
  --bs-link-color: var(--gh-primary);
  --bs-link-hover-color: var(--gh-gold);
  --bs-border-color: var(--gh-outline-variant);

  --gh-font-serif: "Playfair Display", Georgia, serif;
  --gh-font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gh-section-gap: 7.5rem;
}

body {
  font-family: var(--gh-font-sans);
  background-color: var(--gh-surface);
  color: var(--gh-on-surface);
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-serif {
  font-family: var(--gh-font-serif);
  color: var(--gh-primary);
}

a {
  text-decoration: none;
}

.text-muted-gh { color: var(--gh-on-surface-muted); }
.text-gold { color: var(--gh-gold) !important; }
.bg-gold { background-color: var(--gh-gold) !important; }
.bg-surface-low { background-color: var(--gh-surface-low) !important; }
.bg-surface-container { background-color: var(--gh-surface-container) !important; }
.bg-primary-dark { background-color: var(--gh-primary-dark) !important; }

.btn-primary {
  --bs-btn-bg: var(--gh-primary);
  --bs-btn-border-color: var(--gh-primary);
  --bs-btn-hover-bg: var(--gh-primary-light);
  --bs-btn-hover-border-color: var(--gh-primary-light);
  --bs-btn-active-bg: var(--gh-primary-dark);
  --bs-btn-active-border-color: var(--gh-primary-dark);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
  font-size: .85rem;
  border-radius: .5rem;
  padding: .85rem 1.75rem;
}

.btn-gold {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--gh-gold);
  --bs-btn-border-color: var(--gh-gold);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--gh-gold-dark);
  --bs-btn-hover-border-color: var(--gh-gold-dark);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
  font-size: .85rem;
  border-radius: .5rem;
  padding: .85rem 1.75rem;
}

.btn-outline-gold {
  --bs-btn-color: var(--gh-gold);
  --bs-btn-border-color: var(--gh-gold);
  --bs-btn-hover-bg: rgba(201, 162, 39, .1);
  --bs-btn-hover-color: var(--gh-gold);
  --bs-btn-hover-border-color: var(--gh-gold);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
  font-size: .85rem;
  border-radius: .5rem;
  padding: .85rem 1.75rem;
}

.btn-outline-primary {
  --bs-btn-color: var(--gh-primary);
  --bs-btn-border-color: var(--gh-outline-variant);
  --bs-btn-hover-bg: var(--gh-surface-low);
  --bs-btn-hover-color: var(--gh-primary);
  --bs-btn-hover-border-color: var(--gh-outline-variant);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
  font-size: .85rem;
  border-radius: .5rem;
  padding: .85rem 1.75rem;
}

.section-gap { padding-top: var(--gh-section-gap); padding-bottom: var(--gh-section-gap); }
.section-gap-top { padding-top: var(--gh-section-gap); }
.section-gap-bottom { padding-bottom: var(--gh-section-gap); }

@media (max-width: 767.98px) {
  :root { --gh-section-gap: 4rem; }
  .gh-hero { min-height: 88vh; }
  .gh-page-header { min-height: 300px; padding-top: 6.5rem; padding-bottom: 2.5rem; }
  .gh-navbar .navbar-brand img { height: 40px !important; }
  .gh-navbar .gh-brand-name { font-size: 1.05rem; }
}

.organic-shadow { box-shadow: 0 10px 40px rgba(27, 94, 32, .08); }

.label-caps {
  font-family: var(--gh-font-sans);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.display-headline {
  font-family: var(--gh-font-serif);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--gh-primary);
}

/* Fluid heading sizes — scale smoothly with viewport instead of jumping
   between fixed rem values, so headings never overwhelm small screens. */
h1 { font-size: clamp(1.9rem, 1.35rem + 3vw, 2.75rem); line-height: 1.2; }
.gh-hero-title { font-size: clamp(1.85rem, 1rem + 5.5vw, 3.5rem) !important; line-height: 1.15; }
.gh-page-title { font-size: clamp(1.75rem, 1.15rem + 3.5vw, 3rem) !important; line-height: 1.2; }

/* ---------- Navbar ---------- */
.gh-navbar {
  background-color: rgba(249, 249, 246, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gh-outline-variant);
  transition: box-shadow .3s ease, padding .3s ease;
  padding-top: .6rem;
  padding-bottom: .6rem;
}
.gh-navbar.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, .08);
  padding-top: .35rem;
  padding-bottom: .35rem;
}
.gh-navbar .navbar-brand {
  font-family: var(--gh-font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gh-primary);
  margin-right: 1.5rem;
}
.gh-navbar .navbar-brand img { transition: transform .3s ease; }
.gh-navbar .navbar-brand:hover img { transform: scale(1.04); }
.gh-navbar .gh-brand-name {
  font-family: var(--gh-font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--gh-primary);
  line-height: 1.2;
}
.gh-navbar .gh-brand-tagline { font-size: .6rem; }
.gh-navbar .nav-link {
  font-family: var(--gh-font-sans);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--gh-on-surface);
  padding: .5rem .9rem !important;
  position: relative;
  transition: color .2s ease;
}
.gh-navbar .nav-link:hover { color: var(--gh-gold); }
.gh-navbar .nav-link.active {
  color: var(--gh-gold);
}
.gh-navbar .nav-link.active::after {
  content: "";
  position: absolute;
  left: .9rem;
  right: .9rem;
  bottom: .1rem;
  height: 2px;
  background: var(--gh-gold);
  border-radius: 1px;
}
.gh-navbar .btn-outline-gold,
.gh-navbar .btn-primary {
  border-radius: 50rem;
  padding: .6rem 1.3rem;
  font-size: .75rem;
  white-space: nowrap;
}
.gh-navbar .btn-outline-gold i,
.gh-navbar .btn-primary i { font-size: .95rem; }
@media (min-width: 992px) {
  .gh-navbar .order-lg-3 {
    margin-inline-start: .75rem;
    padding-inline-start: 1rem;
    border-inline-start: 1px solid var(--gh-outline-variant);
  }
}

/* ---------- Hero ---------- */
.gh-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}
.gh-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: 85% center;
  z-index: 0;
}
.gh-hero-gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to right, rgba(250,250,247,.92) 30%, rgba(250,250,247,.15) 100%);
}
.gh-hero-content { position: relative; z-index: 2; }

.gh-page-header {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  padding-top: 8rem;
  padding-bottom: 4rem;
  background-color: var(--gh-surface-low);
  overflow: hidden;
}
.gh-page-header-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .35;
  z-index: 0;
}
.gh-page-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--gh-surface) 0%, rgba(249,249,246,.75) 60%, transparent 100%);
  z-index: 1;
}
.gh-page-header .container { position: relative; z-index: 2; }

/* ---------- Cards ---------- */
.gh-card {
  background-color: var(--gh-white);
  border: 1px solid rgba(192,201,187,.3);
  border-radius: 1rem;
  transition: transform .3s ease, box-shadow .3s ease;
}
.gh-card:hover { transform: translateY(-6px); }

.gh-product-card { overflow: hidden; border-radius: .75rem; }
.gh-product-card img { transition: transform .5s ease; aspect-ratio: 1/1; object-fit: cover; }
.gh-product-card:hover img { transform: scale(1.08); }
.gh-product-card .gh-card-overlay {
  position: absolute; inset: 0;
  background: rgba(0,69,13,.25);
  opacity: 0;
  transition: opacity .3s ease;
  display: flex; align-items: center; justify-content: center; gap: 1rem;
}
.gh-product-card:hover .gh-card-overlay { opacity: 1; }

.gh-category-card {
  border-radius: 1rem;
  overflow: hidden;
  background-color: var(--gh-white);
  border: 1px solid rgba(192,201,187,.3);
  box-shadow: 0 6px 20px rgba(27,94,32,.06);
  transition: transform .4s ease, box-shadow .4s ease;
}
.gh-category-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(27,94,32,.16); }
.gh-category-card-img { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.gh-category-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s cubic-bezier(.25,.8,.25,1);
}
.gh-category-card:hover .gh-category-card-img img { transform: scale(1.12) rotate(.5deg); }
.gh-category-card-img::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,69,13,.75) 0%, rgba(0,69,13,.15) 55%, transparent 80%);
  opacity: 0;
  transition: opacity .4s ease;
}
.gh-category-card:hover .gh-category-card-img::after { opacity: 1; }
.gh-category-card-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 1.1rem;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .35s ease, transform .35s ease;
}
.gh-category-card:hover .gh-category-card-overlay { opacity: 1; transform: translateY(0); }
.gh-category-card-cta {
  display: inline-flex; align-items: center; gap: .4rem;
  color: #fff; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.gh-category-card-cta i { transition: transform .3s ease; }
.gh-category-card:hover .gh-category-card-cta i { transform: translateX(4px); }
.gh-category-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 .5rem;
  border-radius: 50rem;
  background-color: var(--gh-surface-container);
  color: var(--gh-primary);
  font-size: .8rem; font-weight: 700;
  transition: background-color .35s ease, color .35s ease, transform .35s ease;
}
.gh-category-card:hover .gh-category-count {
  background-color: var(--gh-gold);
  color: #fff;
  transform: scale(1.08);
}
.gh-category-card-body { padding: 1rem 1.15rem 1.25rem; }
.gh-category-card-body p { color: var(--gh-on-surface-muted); }

/* ---------- Stats / Counters ---------- */
.gh-stat { font-family: var(--gh-font-serif); font-size: 3rem; font-weight: 700; color: var(--gh-gold); }

/* ---------- Forms ---------- */
.form-label.label-caps { color: var(--gh-on-surface-muted); }
.form-control, .form-select {
  background-color: var(--gh-surface-low);
  border: 1px solid var(--gh-outline-variant);
  border-radius: .375rem;
  padding: .75rem 1rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--gh-gold);
  box-shadow: 0 0 0 .2rem rgba(201,162,39,.15);
  background-color: var(--gh-white);
}

/* ---------- Accordion (FAQ) ---------- */
.gh-accordion .accordion-item {
  border: 1px solid var(--gh-surface-high);
  border-radius: .5rem !important;
  margin-bottom: .75rem;
  overflow: hidden;
}
.gh-accordion .accordion-button {
  font-family: var(--gh-font-sans);
  font-weight: 600;
  color: var(--gh-primary);
  background-color: var(--gh-white);
}
.gh-accordion .accordion-button:not(.collapsed) {
  color: var(--gh-primary);
  background-color: var(--gh-surface-low);
  box-shadow: none;
}
.gh-accordion .accordion-button:focus { box-shadow: none; border-color: var(--gh-gold); }

/* ---------- Footer ---------- */
.gh-footer {
  position: relative;
  background: linear-gradient(180deg, var(--gh-primary-dark) 0%, #001c04 100%);
  color: rgba(255, 255, 255, .7);
}
.gh-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gh-gold), var(--gh-primary-light) 50%, var(--gh-gold));
}
.gh-footer h5 { color: var(--gh-gold); }
.gh-footer p, .gh-footer li { color: rgba(255, 255, 255, .7); }
.gh-footer a { color: rgba(255, 255, 255, .78); transition: color .2s ease, transform .2s ease; }
.gh-footer a:hover { color: var(--gh-gold); transform: translateX(3px); display: inline-block; }
.gh-footer-divider { border-color: rgba(255, 255, 255, .12) !important; }
.gh-footer-input {
  background-color: rgba(255, 255, 255, .08) !important;
  border-color: rgba(255, 255, 255, .2) !important;
  color: #fff !important;
}
.gh-footer-input::placeholder { color: rgba(255, 255, 255, .5); }
.gh-credit-badge {
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50rem;
  padding: .4rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .85) !important;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.gh-credit-badge:hover {
  border-color: var(--gh-gold);
  color: var(--gh-gold) !important;
  transform: translateY(-2px);
}
.gh-credit-badge i { color: var(--gh-gold); }
.gh-social-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background-color: rgba(255, 255, 255, .08);
  color: #fff !important;
  font-size: 1rem;
  transition: background-color .25s ease, color .25s ease, transform .25s ease;
}
.gh-social-btn:hover {
  background-color: var(--gh-gold);
  color: var(--gh-primary-dark) !important;
  transform: translateY(-3px);
}

.gh-whatsapp-float {
  position: fixed;
  right: 1.5rem; bottom: 1.5rem;
  width: 56px; height: 56px;
  border-radius: 50%;
  background-color: #25d366;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  transition: transform .25s ease, box-shadow .25s ease;
  z-index: 1000;
}
.gh-whatsapp-float:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 12px 30px rgba(0, 0, 0, .3); color: #fff; }

.gh-back-to-top {
  position: fixed;
  right: 1.5rem; bottom: 5.5rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  background-color: var(--gh-primary);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease, background-color .25s ease;
  z-index: 999;
}
.gh-back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.gh-back-to-top:hover { background-color: var(--gh-gold); color: var(--gh-primary-dark); }

/* ---------- Misc ---------- */
.gh-badge-pill {
  background-color: #90d689;
  color: #002203;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .35rem .85rem;
  border-radius: 50rem;
}
.gh-outline-badge {
  border: 1px solid var(--gh-gold);
  color: var(--gh-gold);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  padding: .2rem .6rem;
  border-radius: .375rem;
}
.gh-icon-circle {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background-color: var(--gh-surface-container);
  color: var(--gh-primary);
  font-size: 1.5rem;
}
.gh-cert-logo {
  width: 84px; height: 84px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background-color: var(--gh-white);
  border: 1px solid var(--gh-outline-variant);
  overflow: hidden;
  padding: 10px;
}
.gh-cert-logo img { width: 100%; height: 100%; object-fit: contain; }
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.gh-sticky-panel { position: sticky; top: 6.5rem; }

@media (min-width: 768px) {
  .border-start-md { border-left: 1px solid rgba(255,255,255,.2) !important; }
}

.gh-cert-badge {
  width: 92px; height: 92px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background-color: var(--gh-surface-low);
  border: 1px solid var(--gh-outline-variant);
  color: var(--gh-primary);
  font-size: 2rem;
  cursor: default;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.gh-cert-badge:hover {
  background-color: var(--gh-primary);
  border-color: var(--gh-primary);
  color: #fff;
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(0, 69, 13, .18);
}
.gh-cert-badge img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
}

/* =========================================================
   Language switcher
   ========================================================= */
.gh-lang-toggle {
  display: flex;
  align-items: center;
  gap: .55rem;
  background-color: var(--gh-white);
  border: 1px solid var(--gh-outline-variant);
  border-radius: 50rem;
  padding: .3rem 1rem .3rem .3rem;
  box-shadow: 0 1px 2px rgba(0, 69, 13, .04);
  transition: border-color .25s ease, box-shadow .25s ease, transform .2s ease, background-color .25s ease;
}
[dir="rtl"] .gh-lang-toggle { padding: .3rem .3rem .3rem 1rem; }
.gh-lang-toggle:hover {
  border-color: var(--gh-gold);
  background-color: var(--gh-surface-low);
  box-shadow: 0 6px 18px rgba(201, 162, 39, .2);
  transform: translateY(-1px);
}
.gh-lang-toggle .gh-lang-opt { display: flex; align-items: center; gap: .55rem; }
.gh-lang-toggle .gh-lang-opt b {
  font-family: var(--gh-font-sans);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--gh-primary);
}
.gh-flag-wrap {
  width: 25px; height: 25px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .1), inset 0 0 0 1.5px var(--gh-white);
  transition: transform .3s ease;
}
.gh-lang-toggle:hover .gh-flag-wrap { transform: rotate(-8deg) scale(1.06); }
.gh-flag {
  display: block;
  width: 38px; height: 25px;
  flex-shrink: 0;
}

/* =========================================================
   Arabic (RTL) support
   ========================================================= */
:root[lang="ar"], .lang-ar {
  --gh-font-sans: "Cairo", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gh-font-serif: "Cairo", "Playfair Display", Georgia, serif;
}
.lang-ar .label-caps { letter-spacing: 0; text-transform: none; }
.lang-ar .display-headline { letter-spacing: 0; }

[dir="rtl"] .gh-navbar .navbar-brand { margin-right: 0; margin-left: 1.5rem; }
@media (min-width: 992px) {
  [dir="rtl"] .gh-hero-gradient {
    background: linear-gradient(to left, rgba(250,250,247,.92) 30%, rgba(250,250,247,.15) 100%);
  }
  [dir="rtl"] .gh-hero-bg { background-position: 15% center; }
}
/* Below `lg` the hero text stacks full-width over the image instead of
   sharing it with a clear side, so the left/right gradient no longer tracks
   where the text sits — use a uniform scrim that stays readable at any
   width, in either language. Placed after the RTL rules above so it wins
   the cascade tie on mobile + Arabic. */
@media (max-width: 991.98px) {
  .gh-hero {
    display: block;
    min-height: 0;
  }
  .gh-hero-bg {
    position: relative;
    inset: auto;
    height: 46vh;
    min-height: 280px;
    max-height: 420px;
    background-position: 78% center;
  }
  .gh-hero-gradient {
    position: absolute;
    inset: 0 0 auto 0;
    height: 46vh;
    min-height: 280px;
    max-height: 420px;
    background: linear-gradient(180deg, rgba(250,250,247,0) 55%, rgba(250,250,247,.95) 100%);
  }
  .gh-hero-content {
    padding-top: 2.25rem;
    padding-bottom: 3rem;
    background-color: var(--gh-surface);
  }
}
[dir="rtl"] .gh-footer a:hover { transform: translateX(-3px); }
[dir="rtl"] .bi-arrow-right,
[dir="rtl"] .bi-chevron-right,
[dir="rtl"] .bi-box-arrow-up-right { display: inline-block; transform: scaleX(-1); }
@media (min-width: 768px) {
  [dir="rtl"] .border-start-md {
    border-left: none !important;
    border-right: 1px solid rgba(255, 255, 255, .2) !important;
  }
}
[dir="rtl"] .gh-back-to-top { right: auto; left: 1.5rem; bottom: 1.5rem; }
