:root {
  --ink: #2c1b16;
  --brown: #4b2e24;
  --cocoa: #714a37;
  --cream: #f7f2e9;
  --paper: #fffdf9;
  --muted: #85776e;
  --line: #e9e0d5;
  --accent: #c47b4b;
  --green: #48664b;
  font-family: "DM Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.announcement { padding: 9px 16px; text-align: center; background: var(--ink); color: #f8eee2; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.site-header { height: 78px; padding: 0 clamp(20px, 6vw, 88px); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--paper); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); letter-spacing: .13em; }
.brand-logo { display: block; width: 42px; height: 42px; object-fit: contain; flex: 0 0 auto; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font-family: "Playfair Display", serif; font-size: 22px; }
.brand strong { display: block; font-size: 13px; line-height: 1.1; }
.brand small { display: block; margin-top: 4px; font-size: 9px; letter-spacing: .34em; }
.main-nav { display: flex; gap: 34px; color: #65564d; font-size: 13px; }
.main-nav a:hover, .header-cart:hover { color: var(--accent); }
.header-cart { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; }
.cart-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 50px; background: var(--accent); color: white; font-size: 11px; }
.hero { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; min-height: 510px; overflow: hidden; padding: 78px clamp(24px, 9vw, 140px) 70px; background: #38241d; color: #fff8ef; }
.hero-copy { position: relative; z-index: 2; max-width: 570px; }
.hero-logo { display: block; width: 112px; height: 112px; object-fit: contain; margin: 0 0 22px; filter: drop-shadow(0 8px 18px rgba(0,0,0,.18)); }
.eyebrow { display: inline-block; color: #d9a77f; font-size: 10px; font-weight: 700; letter-spacing: .2em; }
.hero h1, .section-heading h2, .story-section h2 { margin: 18px 0; font-family: "Playfair Display", Georgia, serif; font-size: clamp(42px, 5.4vw, 68px); font-weight: 600; line-height: 1.05; letter-spacing: -.035em; }
.hero h1 em, .story-section h2 em { color: #dfa77d; font-weight: 600; }
.hero-copy p { max-width: 410px; margin: 0 0 29px; color: #d7c8bc; font-size: 14px; line-height: 1.8; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 20px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 3px; font-size: 12px; font-weight: 700; transition: transform .2s, background .2s; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button-light { background: #f3e9dc; color: var(--ink); }
.button-light:hover { background: white; }
.hero-art { position: relative; min-height: 335px; }
.sun-disc { position: absolute; top: 7px; left: 18%; width: min(28vw, 290px); aspect-ratio: 1; border-radius: 50%; background: #b47b50; opacity: .9; box-shadow: 0 0 0 30px rgba(196,123,75,.08), 0 0 0 65px rgba(196,123,75,.04); }
.cacao-pod { position: absolute; display: grid; place-items: center; width: 125px; height: 215px; border: 2px solid #e3b184; border-radius: 48% 48% 45% 45%; color: rgba(255,235,211,.65); font-size: 30px; background: linear-gradient(90deg, #4a2b20, #8a5030 48%, #4a2b20); box-shadow: 10px 16px 22px rgba(0,0,0,.22); }
.cacao-pod::before, .cacao-pod::after { content: ""; position: absolute; top: 8px; bottom: 8px; width: 1px; background: rgba(239,197,154,.55); }
.cacao-pod::before { left: 38%; transform: rotate(-8deg); }
.cacao-pod::after { right: 38%; transform: rotate(8deg); }
.pod-one { top: 43px; left: 23%; transform: rotate(-23deg); }
.pod-two { top: 105px; left: 52%; transform: rotate(27deg) scale(.82); background: linear-gradient(90deg, #5b3427, #a36a43 48%, #5b3427); }
.hero-stamp { position: absolute; top: 10px; right: 0; display: flex; align-items: center; gap: 9px; padding: 11px 14px; border: 1px solid rgba(240,214,190,.55); border-radius: 50%; color: #f4d6b8; transform: rotate(9deg); }
.hero-stamp span { font-family: "Playfair Display", serif; font-size: 21px; }
.hero-stamp small { font-size: 8px; line-height: 1.2; text-transform: uppercase; letter-spacing: .1em; }
.hero-note { position: absolute; bottom: 22px; right: clamp(24px, 8vw, 120px); color: #c6ab96; font-family: "Playfair Display", serif; font-size: 12px; font-style: italic; line-height: 1.45; text-align: right; }
.shop-section { padding: 84px clamp(20px, 6vw, 88px) 95px; background: var(--cream); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.eyebrow-dark { color: var(--accent); }
.section-heading h2 { margin: 10px 0 0; font-size: clamp(34px, 4vw, 47px); }
.section-heading > p { margin: 0 0 6px; color: var(--muted); font-family: "Playfair Display", serif; font-size: 14px; font-style: italic; line-height: 1.5; }
.shop-layout { display: grid; grid-template-columns: minmax(0, 1fr) 315px; align-items: start; gap: 30px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.product-card { overflow: hidden; border: 1px solid #e8dfd3; border-radius: 5px; background: var(--paper); }
.product-art { position: relative; display: grid; place-items: center; min-height: 178px; overflow: hidden; background: var(--art-bg, #e7d3bc); }
.product-art::before { content: ""; position: absolute; width: 142px; height: 142px; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; }
.product-art .product-symbol { position: relative; z-index: 1; display: grid; place-items: center; width: 83px; height: 111px; border: 1px solid rgba(255,255,255,.65); border-radius: 4px; background: var(--pack-bg, #59382c); color: #f9e8d4; box-shadow: 8px 12px 20px rgba(57,35,25,.2); font-family: "Playfair Display", serif; font-size: 25px; transform: rotate(-5deg); }
.product-art .product-symbol small { display: block; margin-top: 5px; font-family: "DM Sans", sans-serif; font-size: 7px; letter-spacing: .14em; }
.product-label { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 5px 7px; background: rgba(255,253,249,.8); color: var(--brown); font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.product-info { padding: 15px; }
.product-info h3 { min-height: 38px; margin: 0 0 4px; font-family: "Playfair Display", Georgia, serif; font-size: 17px; font-weight: 600; }
.product-info p { min-height: 33px; margin: 0 0 13px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-price { font-size: 14px; font-weight: 700; }
.add-button { min-height: 33px; padding: 0 11px; border: 1px solid var(--brown); border-radius: 3px; background: transparent; color: var(--brown); font-size: 10px; font-weight: 700; }
.add-button:hover { background: var(--brown); color: white; }
.cart-panel { position: sticky; top: 18px; padding: 21px; border: 1px solid #e5dacd; border-radius: 5px; background: var(--paper); box-shadow: 0 12px 35px rgba(53,36,24,.05); }
.cart-heading { display: flex; justify-content: space-between; align-items: center; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.cart-heading h3 { margin: 5px 0 0; font-family: "Playfair Display", serif; font-size: 24px; }
.cart-count-dark { background: var(--brown); }
.cart-items { display: grid; gap: 12px; padding: 16px 0; }
.empty-cart { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 8px; font-size: 11px; }
.cart-line strong { display: block; margin-bottom: 4px; font-size: 11px; }
.cart-line small { color: var(--muted); }
.quantity-controls { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.quantity-controls button { width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 3px; background: white; color: var(--brown); }
.quantity-controls span { min-width: 12px; text-align: center; }
.cart-line-total { font-weight: 700; white-space: nowrap; }
.cart-total-row { display: flex; justify-content: space-between; padding: 14px 0 8px; border-top: 1px solid var(--line); font-size: 12px; }
.cart-total-row strong { font-size: 16px; }
.shipping-note { margin: 0 0 17px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.checkout-form { display: grid; gap: 8px; }
.checkout-form label { margin-top: 5px; font-size: 10px; font-weight: 700; }
.checkout-form label span { color: var(--muted); font-weight: 400; }
.checkout-form input { width: 100%; min-height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 3px; outline: none; background: white; color: var(--ink); font-size: 11px; }
.checkout-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(196,123,75,.12); }
.checkout-button { width: 100%; margin-top: 10px; background: var(--brown); color: white; }
.checkout-button:hover:not(:disabled) { background: var(--ink); }
.checkout-button:disabled { cursor: not-allowed; opacity: .45; }
.secure-note { margin: 5px 0 0; color: var(--muted); font-size: 9px; text-align: center; }
.checkout-message { min-height: 15px; margin: 2px 0 0; color: #9b3d2d; font-size: 10px; line-height: 1.5; }
.story-section { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 50px; padding: 80px clamp(24px, 14vw, 210px); background: #eadbca; }
.story-mark { display: grid; place-items: center; width: min(240px, 100%); aspect-ratio: 1; border: 1px solid #b98c69; border-radius: 50%; color: #87593c; font-family: "Playfair Display", serif; font-size: 120px; }
.story-section h2 { margin: 12px 0; color: var(--ink); font-size: clamp(36px, 4.2vw, 51px); }
.story-section h2 em { color: #a76c48; }
.story-section p { max-width: 480px; color: #766358; font-size: 13px; line-height: 1.8; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px clamp(20px, 6vw, 88px); background: var(--ink); color: #d9c9bb; font-size: 10px; }
.brand-footer { color: #f6e8da; }
.site-footer p { margin: 0; }

@media (max-width: 1050px) {
  .shop-layout { grid-template-columns: minmax(0, 1fr) 285px; gap: 18px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding-left: 7vw; padding-right: 7vw; }
}
@media (max-width: 760px) {
  .site-header { height: 68px; padding: 0 18px; }
  .main-nav { display: none; }
  .hero-logo { width: 88px; height: 88px; margin-bottom: 18px; }
  .hero { grid-template-columns: 1fr; min-height: 650px; padding: 65px 25px 45px; }
  .hero-art { min-height: 270px; margin-top: 20px; }
  .sun-disc { left: 20%; width: 220px; }
  .pod-one { left: 27%; top: 22px; transform: rotate(-23deg) scale(.8); }
  .pod-two { left: 55%; top: 65px; transform: rotate(27deg) scale(.68); }
  .hero-stamp { right: 9%; top: 0; }
  .hero-note { right: 24px; bottom: 13px; }
  .shop-section { padding: 62px 18px; }
  .section-heading { align-items: start; flex-direction: column; }
  .shop-layout { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-art { min-height: 145px; }
  .product-info { padding: 11px; }
  .product-info h3 { font-size: 15px; }
  .product-bottom { align-items: start; flex-direction: column; }
  .add-button { width: 100%; }
  .cart-panel { position: static; }
  .story-section { grid-template-columns: 1fr; gap: 25px; padding: 58px 28px; }
  .story-mark { width: 130px; font-size: 65px; }
  .site-footer { flex-wrap: wrap; }
}

.catalog-error { grid-column: 1 / -1; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--muted); font-size: 13px; }
.catalog-error p { margin: 0 0 14px; }
.catalog-error .add-button { min-height: 40px; padding: 0 18px; }


/* Hero fotográfico de Cototo: imagen hero.jpg en /public */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 88px;
  height: auto;
  background: #fffdf9;
}
.site-header .main-nav { grid-column: 1; grid-row: 1; justify-self: start; }
.site-header .brand { grid-column: 2; grid-row: 1; justify-self: center; gap: 0; }
.site-header .header-cart { grid-column: 3; grid-row: 1; justify-self: end; }
.brand-logo { display: block; width: 92px; height: 66px; object-fit: contain; flex: 0 0 auto; }
.brand-footer .brand-logo { width: 76px; height: 54px; }

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(560px, 44.27vw, 850px);
  padding: 70px 24px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  text-align: center;
  background-color: #24150f;
  background-image: none;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: -5%;
  pointer-events: none;
}
.hero::before {
  z-index: -2;
  background-image: url('/hero.jpg');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(var(--hero-zoom, 1));
  transform-origin: center center;
  will-change: transform;
}
.hero::after {
  z-index: -1;
  inset: 0;
  background: linear-gradient(rgba(15, 10, 8, .56), rgba(15, 10, 8, .61));
}
.hero-copy {
  position: relative;
  z-index: 1;
  width: min(100%, 900px);
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero .eyebrow { color: rgba(255,255,255,.88); margin-bottom: 8px; }
.hero h1 {
  margin: 15px 0 20px;
  color: #fff;
  font-size: clamp(44px, 5.4vw, 82px);
  line-height: 1.07;
  letter-spacing: -.035em;
  text-shadow: 0 3px 22px rgba(0,0,0,.34);
}
.hero h1 em { color: #fff; font-style: italic; font-weight: 600; }
.hero-copy p {
  max-width: 710px;
  margin: 0 auto 30px;
  color: #fff;
  font-size: clamp(14px, 1.25vw, 18px);
  line-height: 1.75;
  text-shadow: 0 2px 12px rgba(0,0,0,.55);
}
.hero .button-light {
  min-width: 190px;
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 0;
  background: rgba(20,14,11,.18);
  color: #fff;
  letter-spacing: .06em;
  backdrop-filter: blur(2px);
}
.hero .button-light:hover { background: rgba(255,255,255,.18); }


/* Entrada con rebote del contenido del hero al cargar o recargar la página. */
@keyframes heroBounceIn {
  0% { opacity: 0; transform: translate3d(0, -38px, 0) scale(.97); }
  58% { opacity: 1; transform: translate3d(0, 7px, 0) scale(1.01); }
  76% { transform: translate3d(0, -4px, 0) scale(1); }
  90% { transform: translate3d(0, 2px, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}
.hero-copy > .eyebrow,
.hero-copy > h1,
.hero-copy > p,
.hero-copy > .button {
  opacity: 0;
  animation: heroBounceIn .95s cubic-bezier(.22, .75, .25, 1) forwards;
}
.hero-copy > .eyebrow { animation-delay: .06s; }
.hero-copy > h1 { animation-delay: .16s; }
.hero-copy > p { animation-delay: .27s; }
.hero-copy > .button { animation-delay: .38s; }

@media (prefers-reduced-motion: reduce) {
  .hero-copy > .eyebrow,
  .hero-copy > h1,
  .hero-copy > p,
  .hero-copy > .button {
    opacity: 1;
    animation: none;
  }
  .hero::before { transform: none !important; will-change: auto; }
}

.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #20c767;
  color: #fff;
  box-shadow: 0 4px 18px rgba(0,0,0,.22);
  transition: transform .2s ease, box-shadow .2s ease;
}
.whatsapp-float:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 7px 22px rgba(0,0,0,.26); }
.whatsapp-float svg { display: block; width: 34px; height: 34px; }
.whatsapp-float:focus-visible { outline: 3px solid #2c1b16; outline-offset: 4px; }

@media (max-width: 760px) {
  .site-header { grid-template-columns: 1fr auto 1fr; min-height: 72px; padding: 0 16px; }
  .site-header .main-nav { display: none; }
  .site-header .brand { grid-column: 2; justify-self: center; }
  .brand-logo { width: 78px; height: 56px; }
  .site-header .header-cart { grid-column: 3; justify-self: end; }
  .header-cart > span:first-child { display: none; }
  .hero { min-height: 620px; padding: 55px 22px; background-position: center center; }
  .hero h1 { font-size: clamp(39px, 10vw, 58px); margin: 12px 0 17px; }
  .hero-copy p { max-width: 520px; font-size: 14px; }
  .whatsapp-float { right: 16px; bottom: 16px; width: 56px; height: 56px; }
  .whatsapp-float svg { width: 31px; height: 31px; }
}


/* Fotografías reales recibidas desde el catálogo de NexoFlow */
.product-art.product-art-photo {
  height: clamp(190px, 20vw, 250px);
  min-height: 0;
  padding: 12px;
  background: #f6f0e8;
}
.product-art.product-art-photo::before { display: none; }
.product-art.product-art-photo .product-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
@media (max-width: 760px) {
  .product-art.product-art-photo { height: 205px; }
}
