/* Botánica — Bohemian crystal design system */

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

:root {
  --ink: #141210;
  --paper: #f6f3ec;
  --paper-2: #efe9dc;
  --red: #c4291c;
  --red-deep: #8f1d13;
  --gold: #b78a3a;
  --jewel: #2b4a43;
  --line: rgba(20, 18, 16, 0.14);
  --shadow: 0 20px 50px -20px rgba(20, 18, 16, 0.35);
  --radius: 18px;
  --font-display: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-body: "Avenir Next", "Segoe UI", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", Consolas, monospace;
  --measure: 66ch;
  --header-h: 76px;
  --gap: clamp(1rem, 2vw, 2rem);
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; margin: 0; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; z-index: 200;
}
.skip-link:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

/* ===== layout helpers ===== */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 2.5rem); }
.grid { display: grid; gap: var(--gap); }
.u-mt-s { margin-top: 1rem; } .u-mt-m { margin-top: 2rem; } .u-mt-l { margin-top: 4rem; }
.u-center { text-align: center; }

/* ===== reveal ===== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in-view { opacity: 1; transform: none; }
.reveal[data-stagger] { transition-delay: calc(var(--i, 0) * 90ms); }
@media (prefers-reduced-motion: reduce) { .reveal { transition: none; } }

/* ===== header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 243, 236, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: 1240px; margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 2.5rem);
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.logo { display: flex; align-items: center; gap: .55rem; color: var(--ink); }
.logo__mark { color: var(--red); width: 30px; height: 30px; aspect-ratio: 1; }
.logo__word { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: .01em; }
.nav { display: flex; gap: clamp(1rem, 2vw, 1.8rem); }
.nav a { font-size: .95rem; position: relative; padding: .3rem 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1.5px;
  background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 1rem; }
.cart-link { position: relative; display: flex; }
.cart-count {
  position: absolute; top: -8px; right: -10px; background: var(--red); color: var(--paper);
  font-size: .68rem; min-width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.cart-count.bump { animation: bump .35s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }
.nav-toggle {
  display: none; background: none; border: none; color: var(--ink); padding: .4rem;
  width: 44px; height: 44px; align-items: center; justify-content: center;
}
.icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    background: var(--paper); flex-direction: column; padding: 2rem clamp(1.2rem,4vw,2.5rem);
    gap: 1.4rem; font-size: 1.1rem;
    transform: translateY(-12px); visibility: hidden; opacity: 0;
    transition: transform .3s ease, opacity .3s ease, visibility .3s;
    z-index: 90;
  }
  .nav.is-open { transform: translateY(0); visibility: visible; opacity: 1; }
}

/* ===== buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 999px; padding: .85rem 1.7rem; font-size: .95rem; font-weight: 600;
  border: 1px solid transparent; position: relative; overflow: hidden; isolation: isolate;
  min-height: 44px; transition: color .25s ease, border-color .25s ease, transform .2s ease;
}
.btn::before {
  content: ""; position: absolute; inset: 0; left: -100%; width: 100%; z-index: -1;
  transition: left .35s ease;
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary::before { background: var(--red); }
.btn--primary:hover::before { left: 0; }
.btn--primary:active { transform: scale(.97); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline::before { background: var(--ink); }
.btn--outline:hover { color: var(--paper); }
.btn--outline:hover::before { left: 0; }
.btn--ghost { background: transparent; color: var(--paper); border-color: rgba(246,243,236,.5); }
.btn--ghost:hover { border-color: var(--paper); }
.btn--sm { padding: .55rem 1.2rem; font-size: .85rem; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ===== cookie banner ===== */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 300;
  background: var(--ink); color: var(--paper); border-radius: var(--radius);
  padding: 1.2rem 1.4rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
  justify-content: space-between; box-shadow: var(--shadow); max-width: 680px; margin: 0 auto;
}
.cookie-banner p { font-size: .9rem; max-width: 46ch; }
.cookie-banner a { text-decoration: underline; color: var(--paper); }
.cookie-banner__actions { display: flex; gap: .7rem; }

/* ===== toast ===== */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translate(-50%, 20px);
  background: var(--ink); color: var(--paper); padding: .85rem 1.4rem; border-radius: 999px;
  font-size: .9rem; z-index: 400; opacity: 0; transition: opacity .3s ease, transform .3s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ===== hero / home ===== */
.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
  position: relative;
}
.hero-parallax { position: relative; }
.hero-shape { position: absolute; pointer-events: none; transition: transform .1s ease-out; }
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 5.2rem); letter-spacing: -.01em;
}
.hero .eyebrow {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .14em; font-size: .78rem;
  color: var(--red-deep); display: flex; align-items: center; gap: .5rem;
}
.hero p.lede { font-size: clamp(1.05rem, 1.4vw, 1.25rem); max-width: 42ch; margin-top: 1.2rem; }
.hero-actions { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-visual { position: relative; aspect-ratio: 1/1; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); filter: saturate(1.05) contrast(1.03); }

/* sticky narrative / scroll columns */
.split-scroll {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: var(--gap);
  padding: clamp(3rem, 6vw, 6rem) 0;
}
.split-scroll__sticky { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; height: fit-content; }
.split-scroll__scroll { display: flex; flex-direction: column; gap: clamp(2.5rem, 5vw, 4rem); }
@media (max-width: 900px) {
  .split-scroll { grid-template-columns: 1fr; }
  .split-scroll__sticky { position: static; }
}

/* section framing */
.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.section--dark { background: var(--ink); color: var(--paper); }
.section-head { max-width: 56ch; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.section-head .eyebrow { color: var(--red); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-top: .6rem; }

/* divider svg */
.divider { width: 100%; height: auto; display: block; color: var(--line); }

/* product strip / cards */
.product-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr);
  gap: 1.4rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem;
}
.product-strip .product-card { scroll-snap-align: start; }
@media (min-width: 760px) {
  .product-strip { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); overflow: visible; }
}
.product-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .3s ease, box-shadow .3s ease;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.product-card__media { aspect-ratio: 4/5; overflow: hidden; background: var(--paper-2); }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover .product-card__media img { transform: scale(1.07); }
.product-card__body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.product-card__cat { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--red-deep); }
.product-card__name { font-size: 1.1rem; }
.product-card__price { margin-top: auto; display: flex; align-items: baseline; gap: .5rem; font-weight: 700; }
.product-card__price .old { font-weight: 400; text-decoration: line-through; opacity: .5; font-size: .85rem; }
.product-card__cta { margin-top: .6rem; }

/* ===== ritual / signature feature ===== */
.ritual {
  background: var(--jewel); color: var(--paper); border-radius: var(--radius);
  padding: clamp(1.8rem, 4vw, 3rem); position: relative; overflow: hidden;
}
.ritual__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); }
@media (max-width: 860px) { .ritual__grid { grid-template-columns: 1fr; } }
.ritual__facets { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.facet-btn {
  border: 1px solid rgba(246,243,236,.35); background: transparent; color: var(--paper);
  border-radius: 999px; padding: .55rem 1.1rem; font-size: .85rem; min-height: 44px;
  transition: background .25s ease, border-color .25s ease;
}
.facet-btn[aria-pressed="true"] { background: var(--red); border-color: var(--red); }
.ritual__time { display: flex; gap: .6rem; margin-top: 1rem; }
.ritual__result { background: rgba(246,243,236,.06); border: 1px solid rgba(246,243,236,.18); border-radius: 14px; padding: 1.2rem; min-height: 160px; }
.ritual__step { display: flex; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid rgba(246,243,236,.14); align-items: center; }
.ritual__step:last-child { border-bottom: none; }
.ritual__step-num { font-family: var(--font-mono); color: var(--red); font-weight: 700; width: 1.6rem; }
.ritual__empty { opacity: .7; font-size: .92rem; }

/* ===== reusable components for inner pages ===== */
.page-hero {
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
.page-hero p { margin-top: .8rem; max-width: 60ch; font-size: 1.05rem; }

.breadcrumbs { font-size: .85rem; display: flex; gap: .4rem; flex-wrap: wrap; color: rgba(20,18,16,.65); margin-bottom: 1rem; }
.breadcrumbs a { text-decoration: underline; }
.breadcrumbs span[aria-current] { color: var(--ink); font-weight: 600; }

.prose { max-width: var(--measure); font-size: 1.02rem; line-height: 1.7; }
.prose h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.prose h3 { font-size: 1.15rem; margin-top: 1.6rem; }
.prose p, .prose ul, .prose ol { margin-top: .9rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose a { text-decoration: underline; }

.legal-toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-bottom: 2rem; max-width: var(--measure); }
.legal-toc h2 { font-size: 1.05rem; }
.legal-toc ol { margin: .8rem 0 0; padding-left: 1.3rem; }
.legal-toc a { text-decoration: underline; }

.notice { border-radius: 14px; padding: 1rem 1.2rem; font-size: .92rem; border: 1px solid var(--line); background: var(--paper-2); }
.notice--info { border-color: var(--jewel); }
.notice--warn { border-color: var(--red); background: #fbe9e6; }
.notice--success { border-color: var(--jewel); background: #e7eeea; }

.form-grid { display: grid; gap: 1.1rem; max-width: 640px; }
.form-grid--2col { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-grid--2col { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field--inline { flex-direction: row; gap: .6rem; }
.field label { font-size: .85rem; font-weight: 600; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: .75rem .9rem; font: inherit;
  background: var(--paper); min-height: 44px; accent-color: var(--red);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--red); }
.field-error { color: var(--red-deep); font-size: .85rem; min-height: 1.2em; }
.form-success { color: var(--jewel); font-weight: 600; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.faq-item { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq-item summary {
  cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--red); transition: transform .25s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: .8rem; max-width: var(--measure); color: rgba(20,18,16,.8); }

.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,4vw,3.5rem); }
@media (max-width: 860px) { .product-detail { grid-template-columns: 1fr; } }
.product-detail__gallery { aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.product-detail__gallery img { width: 100%; height: 100%; object-fit: cover; }
.product-detail__price { font-size: 1.8rem; font-weight: 700; display: flex; gap: .7rem; align-items: baseline; }
.product-detail__notes { list-style: none; padding: 0; margin: 1.2rem 0; display: flex; flex-direction: column; gap: .5rem; }
.product-detail__notes li { display: flex; gap: .6rem; align-items: center; }
.product-detail__notes svg { color: var(--jewel); flex-shrink: 0; }

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: .9rem .6rem; border-bottom: 1px solid var(--line); text-align: left; }
.cart-table img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.cart-summary { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; max-width: 380px; margin-left: auto; }
.cart-summary__row { display: flex; justify-content: space-between; padding: .5rem 0; }
.cart-summary__row--total { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--line); margin-top: .5rem; padding-top: .9rem; }

.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,4vw,3.5rem); }
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-info { display: flex; flex-direction: column; gap: 1.2rem; }
.contact-info__item { display: flex; gap: .8rem; align-items: flex-start; }
.contact-info__item svg { color: var(--red); flex-shrink: 0; margin-top: .15rem; }

.badge-seal { color: var(--jewel); }

/* ===== grain texture overlay ===== */
.grain-overlay { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; opacity: .035; z-index: 1; mix-blend-mode: multiply; }

/* ===== footer ===== */
.site-footer { background: var(--ink); color: var(--paper); position: relative; overflow: hidden; padding-top: 3rem; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__inner {
  max-width: 1240px; margin: 0 auto; padding: 0 clamp(1.2rem,4vw,2.5rem) 2.5rem;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 2rem;
}
@media (max-width: 860px) { .site-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer__inner { grid-template-columns: 1fr; } }
.footer-brand .logo { color: var(--paper); }
.footer-tagline { margin-top: 1rem; max-width: 30ch; opacity: .8; font-size: .92rem; }
.footer-mail { display: inline-flex; gap: .5rem; align-items: center; margin-top: 1rem; font-size: .9rem; }
.footer-col h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; opacity: .7; margin-bottom: .9rem; }
.footer-col { display: flex; flex-direction: column; gap: .6rem; font-size: .92rem; }
.footer-newsletter .field--inline input { flex: 1; min-width: 0; }
.footer-newsletter .field--inline { background: rgba(246,243,236,.08); border-radius: 10px; padding: .25rem; }
.footer-newsletter input { background: transparent; border: none; color: var(--paper); }
.footer-newsletter .btn { white-space: nowrap; }
.site-footer__bottom { border-top: 1px solid rgba(246,243,236,.15); padding: 1.2rem clamp(1.2rem,4vw,2.5rem); font-size: .82rem; opacity: .75; }

/* ===== 404 ===== */
.page-404 { min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1rem; padding: 4rem 1rem; }
.page-404 h1 { font-size: clamp(3rem, 10vw, 6rem); color: var(--red); }

/* COMPONENTS:
.wrap - centered max-width content container
.grid - generic grid wrapper (pair with inline grid-template)
.reveal / .in-view - scroll-reveal animation hook (IntersectionObserver)
.site-header / .site-header__inner - sticky top navigation bar
.logo / .logo__mark / .logo__word - brand logo lockup
.nav / .nav a - primary navigation + active link underline
.header-actions / .cart-link / .cart-count - header cart icon + badge
.nav-toggle - mobile menu hamburger/close button
.btn / .btn--primary / .btn--outline / .btn--ghost / .btn--sm - button variants with fill-sweep hover
.cookie-banner / .cookie-banner__actions - cookie consent banner
.toast - floating confirmation message
.hero / .hero-parallax / .hero-shape / .hero-grid / .hero-visual - home hero with parallax shapes
.split-scroll / .split-scroll__sticky / .split-scroll__scroll - sticky narrative + scrolling content layout
.section / .section--dark / .section-head - generic content section wrapper
.divider - decorative inline SVG section divider
.product-strip / .product-card - catalog grid / horizontal scroll-snap strip
.ritual / .ritual__grid / .ritual__facets / .facet-btn / .ritual__time / .ritual__result / .ritual__step - "Ritual en Facetas" signature feature
.page-hero - inner page hero/title band
.breadcrumbs - breadcrumb trail
.prose - long-form readable text column (legal pages, articles)
.legal-toc - table of contents box for legal pages
.notice / .notice--info / .notice--warn / .notice--success - callout boxes
.form-grid / .form-grid--2col / .field / .field--inline / .field-error / .form-success / .hp-field - form layout + validation states
.faq / .faq-item - FAQ accordion (details/summary)
.product-detail / .product-detail__gallery / .product-detail__price / .product-detail__notes - product page layout
.cart-table / .cart-summary - cart/checkout tables and totals box
.contact-layout / .contact-info / .contact-info__item - contact page split layout
.badge-seal - inline decorative seal/badge icon color
.grain-overlay - fixed full-viewport grain texture
.site-footer / .site-footer__inner / .footer-brand / .footer-col / .footer-newsletter / .site-footer__bottom - footer layout
.page-404 - 404 page centered layout
*/

/* ===== footer grain & footer-specific styles ===== */
.site-footer__grain { position: absolute; inset: 0; pointer-events: none; opacity: 0.04; mix-blend-mode: multiply; }
.logo--footer { color: var(--paper); }

/* ===== inline icons ===== */
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; flex-shrink: 0; }

/* ===== newsletter form ===== */
.newsletter-form { display: flex; flex-direction: column; gap: 0.8rem; }

/* ===== cart quantity input ===== */
.qty-input { border: 1px solid var(--line); border-radius: 8px; padding: 0.4rem 0.6rem; font: inherit; text-align: center; width: 50px; min-height: 44px; background: var(--paper); color: var(--ink); accent-color: var(--red); transition: border-color 0.2s ease; }
.qty-input:focus { border-color: var(--red); outline: none; }
