/* Linaje shop F1 — cacao-demo + marca · mobile-first */

:root {
  --peach: #f1c7bb;
  --mist: #c1e7ed;
  --sand: #f6deb5;
  --white: #ffffff;
  --black: #000000;
  --gray: #4a4542;
  --paper: #f7f1ea;
  --ink: #1a1512;
  --font: "Le Jour Script", "Segoe Script", "Apple Chancery", cursive;
  --bar: 3.25rem;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.cart-open { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--peach); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -999px; top: .5rem; z-index: 100;
  padding: .5rem .8rem; background: var(--black); color: var(--sand); text-decoration: none;
}
.skip-link:focus { left: .5rem; }

/* Top bar */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 40;
  min-height: var(--bar);
  height: auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  padding: 0.35rem clamp(.85rem, 3vw, 2rem);
  padding-top: calc(0.35rem + env(safe-area-inset-top, 0));
  background: rgba(247, 241, 234, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,.06);
  transition: background .25s ease, color .25s ease;
}
.topbar.is-over-dark {
  background: rgba(26, 21, 18, 0.55);
  color: var(--sand);
  border-bottom-color: transparent;
}
.topbar.menu-open {
  background: rgba(247, 241, 234, 0.98);
  color: var(--ink);
  border-bottom-color: rgba(0,0,0,.06);
}
.brand { line-height: 0; text-decoration: none; flex-shrink: 0; }
.brand img { height: 2.15rem; width: auto; }

.topbar-actions {
  display: flex; align-items: center; gap: .55rem; margin-left: auto;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.05rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 0; transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 0; transform: rotate(-45deg);
}

.cart-btn {
  background: none; border: 1px solid currentColor; cursor: pointer;
  text-decoration: none; font-size: .9rem; color: inherit;
  font-weight: 600;
  padding: .35rem .55rem;
  border-radius: 2px;
  -webkit-tap-highlight-color: transparent;
}
.cart-btn:hover { background: rgba(246,222,181,.25); }
.cart-count {
  display: inline-flex; min-width: 1.15rem; justify-content: center;
  margin-left: .15rem; font-size: .88rem;
}

/* Móvil: carrito solo flotante · desktop: carrito en header */
@media (max-width: 860px) {
  .cart-btn--desktop { display: none !important; }
}

/* Menú: desktop inline / móvil panel bajo header */
.site-menu {
  display: none;
}
.site-menu a {
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid transparent;
  -webkit-tap-highlight-color: transparent;
}
.site-menu a:hover { border-bottom-color: var(--peach); }

@media (max-width: 860px) {
  .site-menu {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: .35rem 0 .75rem;
    background: rgba(247, 241, 234, 0.98);
    color: var(--ink);
    border-bottom: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 12px 28px rgba(0,0,0,.12);
  }
  .site-menu[hidden] { display: none !important; }
  .site-menu a {
    padding: .85rem clamp(.85rem, 3vw, 2rem);
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(0,0,0,.06);
  }
  .site-menu a:last-child { border-bottom: 0; }
  .site-menu a:hover { border-bottom-color: rgba(0,0,0,.06); background: rgba(241,199,187,.25); }
}

@media (min-width: 861px) {
  .nav-toggle { display: none; }
  .topbar-actions { order: 3; }
  .site-menu {
    display: flex !important;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: clamp(.7rem, 1.5vw, 1.25rem);
    margin-left: auto;
    margin-right: .85rem;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: inherit;
  }
  .site-menu[hidden] { display: flex !important; }
  .site-menu a { font-size: .95rem; padding: .2rem 0; }
}

/* Main scroll */
main {
  height: 100svh;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
@media (min-width: 861px) {
  main { scroll-snap-type: y proximity; }
}

.panel {
  min-height: auto;
  display: grid;
  align-items: center;
  scroll-snap-align: start;
}
@media (min-width: 861px) {
  .panel { min-height: 100svh; min-height: 100dvh; }
}

/* Hero */
.hero {
  position: relative;
  color: #f7f3ea;
  align-items: end;
  overflow: hidden;
  min-height: 100svh;
  min-height: 100dvh;
}
.hero-bg { position: absolute; inset: 0; background: #1a1512; }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 40%;
  transform: scale(1.04);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-bg img { animation: drift 22s ease-in-out infinite alternate; }
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(26,21,18,.15), rgba(26,21,18,.9) 72%);
}
@keyframes drift {
  from { transform: scale(1.04); }
  to { transform: scale(1.1) translate(-1%, -.5%); }
}
.hero-copy {
  position: relative; z-index: 1;
  padding: 2rem clamp(1rem, 4vw, 3rem) 4.5rem;
  max-width: 28rem;
}
.hero-logo {
  height: clamp(4.2rem, 18vw, 7.5rem); width: auto; margin-bottom: .85rem;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.35));
}
.hero h1 {
  margin: 0 0 .65rem; font-weight: 400;
  font-size: clamp(1.75rem, 7vw, 2.7rem); line-height: 1.12; color: var(--sand);
}
.hero p { margin: 0 0 1.1rem; color: rgba(247,243,234,.9); max-width: 28ch; font-size: clamp(1rem, 3.5vw, 1.15rem); }
.hero-cta {
  margin-top: .25rem;
  min-width: 10rem;
}
@media (max-width: 860px) {
  .hero-copy { padding-bottom: 5.5rem; }
  .hero-cta { width: 100%; max-width: 16rem; }
}
.scroll-cue {
  position: absolute; left: 50%; bottom: calc(1rem + var(--safe-b)); z-index: 2;
  transform: translateX(-50%); color: rgba(247,243,234,.85);
  text-decoration: none; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem;
}
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue { animation: bounce 2.2s ease-in-out infinite; }
}
.scroll-cue::after {
  content: ""; display: block; width: 1px; height: 1.2rem; margin: .3rem auto 0;
  background: rgba(247,243,234,.5);
}
@keyframes bounce {
  0%,100% { transform: translate(-50%,0); }
  50% { transform: translate(-50%,6px); }
}

/* Intro */
.intro {
  text-align: center;
  padding: calc(var(--bar) + 1.75rem) 1.15rem 2.25rem;
  background: var(--paper);
  min-height: auto;
}
@media (min-width: 861px) {
  .intro { min-height: 100svh; min-height: 100dvh; }
}
.kicker { margin: 0 0 .4rem; color: var(--gray); font-size: .95rem; }
.intro h2, .ocasiones h2, .origen h2, .cierre h2, .product-info h2 {
  margin: 0 0 .85rem; font-weight: 400;
  font-size: clamp(1.85rem, 7vw, 3.2rem); line-height: 1.05;
}
.intro-lead { margin: 0 auto; max-width: 28ch; color: var(--gray); }

/* Product */
.product {
  grid-template-columns: 1fr;
  padding: 0;
  background: var(--white);
}
.product-media {
  margin: 0; min-height: 42vh; overflow: hidden;
  background: linear-gradient(145deg, var(--peach), #2a201c);
}
.product-media img {
  width: 100%; height: 100%; min-height: 42vh; object-fit: cover;
  transition: transform .7s ease;
}
@media (hover: hover) {
  .product:hover .product-media img { transform: scale(1.03); }
}
.product-info {
  padding: 1.5rem clamp(1.1rem, 4vw, 3rem) 2rem;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
  z-index: 2;
}
.tag { margin: 0 0 .3rem; color: var(--gray); letter-spacing: .04em; font-size: .95rem; }
.pct { margin: 0 0 .65rem; color: var(--gray); }
.blurb { margin: 0 0 .9rem; color: var(--gray); max-width: 34ch; }
.sku-meta {
  margin: 0 0 1rem; padding-left: 1.1rem; color: var(--gray);
  font-size: .95rem; line-height: 1.45;
}
.sku-meta li { margin: .15rem 0; }
.price { margin: 0 0 1.1rem; font-size: 1.3rem; color: var(--ink); }
.price--second { margin-top: 1.25rem; }

@media (min-width: 861px) {
  .product { grid-template-columns: 1.05fr .95fr; min-height: 100svh; }
  .product--flip .product-media { order: 2; }
  .product--flip .product-info { order: 1; }
  .product-media, .product-media img {
    min-height: 100svh; min-height: 100dvh;
  }
  .product-info {
    padding: calc(var(--bar) + .5rem) clamp(1.25rem, 4vw, 3rem) 2rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem;
  padding: .85rem 1.25rem; border: 0; cursor: pointer;
  text-decoration: none; text-align: center;
  position: relative;
  z-index: 2;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
  -webkit-tap-highlight-color: rgba(241, 199, 187, 0.35);
}
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
}
.btn-cart { background: var(--sand); color: var(--black); }
@media (hover: hover) {
  .btn-cart:hover { background: var(--peach); }
}
.btn-ghost {
  background: transparent; border: 1px solid rgba(0,0,0,.28); color: var(--ink);
}
@media (hover: hover) {
  .btn-ghost:hover { background: var(--mist); border-color: transparent; }
}
.btn-block { width: 100%; margin-top: .5rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.product-info .btn,
.cierre-actions .btn { width: 100%; }
.product-info .btn + .price--second { margin-top: 1.35rem; }
.product-info .btn + .btn-cart,
.product-info .btn-cart + .btn-cart { margin-top: .55rem; }
@media (min-width: 480px) {
  .product-info .btn { width: auto; max-width: 100%; }
  .cierre-actions .btn { width: auto; min-width: 10rem; }
}

/* Ocasiones */
.ocasiones {
  grid-template-columns: 1fr;
  background: linear-gradient(180deg, var(--mist), var(--paper));
  padding: calc(var(--bar) + .75rem) clamp(1.1rem, 4vw, 3rem) 2rem;
  gap: 1.25rem;
}
.ocasiones-copy {
  position: relative;
  z-index: 2;
}
.ocasiones-copy p:not(.kicker):not(.price) { color: var(--gray); max-width: 30ch; }
.ocasiones-media { margin: 0; overflow: hidden; }
.ocasiones-media img {
  width: 100%; height: min(52vh, 22rem); object-fit: cover;
}
@media (min-width: 861px) {
  .ocasiones {
    grid-template-columns: 1fr 1fr; align-items: center;
    min-height: 100svh;
  }
  .ocasiones-media img { height: min(70vh, 32rem); }
}

/* Próximamente */
.soon {
  text-align: center;
  padding: calc(var(--bar) + 2rem) 1.25rem 2.5rem;
  background: linear-gradient(180deg, var(--paper), var(--mist));
  min-height: auto;
}
.soon h2 {
  margin: 0 0 .75rem; font-weight: 400;
  font-size: clamp(1.85rem, 7vw, 3rem); line-height: 1.05;
}
.soon p:not(.kicker) { margin: 0 auto; max-width: 28ch; color: var(--gray); }

/* Origen */
.origen {
  grid-template-columns: 1fr;
  background: #1a1512; color: #f7f3ea;
  padding: calc(var(--bar) + .75rem) clamp(1.1rem, 4vw, 3rem) 2rem;
  gap: 1.25rem;
}
.origen .kicker, .origen p { color: rgba(247,243,234,.78); }
.origen h2 { color: var(--sand); }
.origen-meta { font-size: .92rem; }
.origen-media { margin: 0; opacity: .92; }
.origen-media img {
  width: 100%; max-height: 48vh; object-fit: cover; object-position: top;
}
@media (min-width: 861px) {
  .origen { grid-template-columns: 1.1fr .9fr; min-height: 100svh; }
  .origen-media img { max-height: 70vh; }
}

/* Cierre */
.cierre {
  text-align: center;
  padding: calc(var(--bar) + 1.5rem) 1.15rem 2.5rem;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(246,222,181,.55), transparent 60%), var(--paper);
  min-height: auto;
}
.cierre-logo { height: 3.8rem; width: auto; margin: 0 auto 1rem; }
.cierre p { color: var(--gray); max-width: 28ch; margin: 0 auto 1.15rem; }
.shipping-note {
  max-width: 36ch !important;
  margin: 0 auto 1.35rem !important;
  font-size: .92rem;
  line-height: 1.4;
  color: var(--gray);
}
.cierre-actions {
  display: flex; flex-wrap: wrap; gap: .65rem; justify-content: center;
}

/* Site footer */
.site-footer {
  background: #1a1512;
  color: rgba(247, 243, 234, 0.88);
  padding: 2.25rem clamp(1.1rem, 4vw, 2.5rem) calc(1.5rem + var(--safe-b));
  scroll-snap-align: end;
}
.footer-grid {
  display: grid;
  gap: 1.75rem;
  max-width: 64rem;
  margin: 0 auto 1.75rem;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
}
.footer-brand img {
  height: 3.2rem; width: auto; margin-bottom: .75rem;
  filter: brightness(1.05);
}
.footer-brand p { margin: 0; max-width: 28ch; font-size: .95rem; color: rgba(247,243,234,.7); }
.footer-domain { margin-top: .5rem !important; color: var(--sand) !important; font-size: .9rem !important; }
.footer-label {
  margin: 0 0 .55rem; font-size: .82rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--sand);
}
.footer-links, .footer-social {
  display: flex; flex-direction: column; gap: .45rem; align-items: flex-start;
}
.footer-links a, .footer-social a {
  text-decoration: none; border-bottom: 1px solid transparent; font-size: .98rem;
}
.footer-links a:hover, .footer-social a:hover { border-bottom-color: var(--peach); color: var(--sand); }
.footer-bottom {
  max-width: 64rem; margin: 0 auto;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(247,243,234,.12);
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem;
  justify-content: space-between; align-items: center;
  font-size: .9rem; color: rgba(247,243,234,.55);
}
.footer-bottom p { margin: 0; }
.made-by a {
  color: var(--sand); text-decoration: none; border-bottom: 1px solid rgba(246,222,181,.4);
}
.made-by a:hover { border-bottom-color: var(--peach); }

/* Cart drawer — [hidden] pierde vs display:flex; usar .is-open */
[hidden] { display: none !important; }

.drawer-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(26,21,18,.5);
  opacity: 0;
  pointer-events: none !important;
  transition: opacity .2s ease;
}
.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto !important;
}
.drawer {
  position: fixed; top: 0; right: 0; z-index: 60;
  width: min(100vw, 22.5rem);
  height: 100%;
  height: 100dvh;
  background: var(--paper);
  display: flex; flex-direction: column;
  box-shadow: -12px 0 40px rgba(0,0,0,.18);
  padding-bottom: var(--safe-b);
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none !important;
  transition: transform .28s ease, visibility .28s ease;
}
.drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto !important;
}
.drawer--wide { width: min(100vw, 28rem); }
@media (max-width: 480px) {
  .drawer { width: 100vw; max-width: 100vw; }
}
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(.85rem + env(safe-area-inset-top, 0)) 1.1rem .85rem;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.drawer-head h2 { margin: 0; font-weight: 400; font-size: 1.4rem; }
.icon-close {
  border: 0; background: none; font-size: 1.85rem; cursor: pointer; line-height: 1;
  width: 2.5rem; height: 2.5rem;
}
.drawer-body { flex: 1; overflow: auto; padding: 1rem 1.1rem; -webkit-overflow-scrolling: touch; }
.drawer-foot {
  padding: 1rem 1.1rem calc(1.15rem + var(--safe-b));
  border-top: 1px solid rgba(0,0,0,.08);
  background: var(--paper);
}
.cart-hint {
  margin: .65rem 0 0; font-size: .85rem; color: var(--gray); text-align: center; line-height: 1.35;
}
.cart-line {
  display: grid; grid-template-columns: 4.25rem 1fr auto; gap: .65rem;
  padding: .75rem 0; border-bottom: 1px solid rgba(0,0,0,.06);
  align-items: center;
}
.cart-line img { width: 4.25rem; height: 4.25rem; object-fit: cover; }
.cart-line h3 { margin: 0 0 .15rem; font-weight: 400; font-size: 1rem; }
.cart-line p { margin: 0; color: var(--gray); font-size: .88rem; }
.qty {
  display: flex; align-items: center; gap: .35rem; margin-top: .35rem;
}
.qty button {
  width: 2rem; height: 2rem; border: 1px solid rgba(0,0,0,.2);
  background: var(--white); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cart-empty { color: var(--gray); text-align: center; padding: 2rem .5rem; line-height: 1.5; }
.cart-total { display: flex; justify-content: space-between; margin: 0 0 .65rem; font-size: 1.05rem; }

/* Checkout form (Wompi-ready) */
.checkout-banner {
  background: var(--mist); padding: .75rem .9rem; margin: 0 0 1rem; font-size: .92rem; line-height: 1.35;
}
.checkout-form fieldset {
  border: 1px solid rgba(0,0,0,.1); margin: 0 0 1rem; padding: .85rem;
}
.checkout-form legend { padding: 0 .35rem; }
.checkout-form label {
  display: block; margin: 0 0 .65rem; font-size: .92rem; color: var(--gray);
}
.checkout-form input, .checkout-form select {
  display: block; width: 100%; margin-top: .25rem;
  padding: .65rem .7rem; border: 1px solid rgba(0,0,0,.2); background: var(--white);
  font-size: 1rem; min-height: 2.75rem;
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
@media (max-width: 400px) {
  .row-2 { grid-template-columns: 1fr; }
}
.checkout-total {
  display: flex; justify-content: space-between; margin: 0 0 .75rem; font-size: 1.15rem;
}

/* FAB carrito — solo móvil (único carrito en responsive) */
.cart-fab {
  display: none;
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + var(--safe-b));
  z-index: 35;
  align-items: center;
  gap: .4rem;
  min-height: 3rem;
  padding: .65rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--sand);
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.cart-fab-label { font-size: .95rem; }
.cart-fab .cart-count {
  background: var(--sand);
  color: var(--ink);
  border-radius: 999px;
  min-width: 1.4rem;
  height: 1.4rem;
  align-items: center;
  font-size: .8rem;
  margin-left: 0;
  padding: 0 .3rem;
}
@media (max-width: 860px) {
  .cart-fab { display: inline-flex; }
  body.cart-open .cart-fab { opacity: 0; pointer-events: none; }
}

.toast {
  position: fixed; left: 50%; bottom: calc(1.15rem + var(--safe-b)); z-index: 80;
  max-width: min(92vw, 26rem); padding: .85rem 1.1rem;
  background: var(--black); color: var(--sand); text-align: center;
  transform: translateX(-50%);
  font-size: .95rem;
}

/* Política page */
.policy-page { min-height: 100svh; display: flex; flex-direction: column; }
.policy-page main {
  height: auto; overflow: visible; flex: 1;
  padding: calc(var(--bar) + 1.5rem) clamp(1.1rem, 4vw, 2rem) 2rem;
  max-width: 40rem; margin: 0 auto; width: 100%;
}
.policy-page h1 {
  margin: 0 0 1rem; font-weight: 400;
  font-size: clamp(1.8rem, 6vw, 2.6rem);
}
.policy-page h2 {
  margin: 1.75rem 0 .5rem; font-weight: 400; font-size: 1.35rem;
}
.policy-page p, .policy-page li { color: var(--gray); }
.policy-page ul { padding-left: 1.15rem; }
.policy-back {
  display: inline-block; margin-bottom: 1rem; text-decoration: none;
  border-bottom: 1px solid var(--peach);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html, main { scroll-behavior: auto; scroll-snap-type: none; }
}
