/* ==========================================================================
   Manitas Creativas — una sola página
   La paleta sale de las pinturas de los mates: terracota, mostaza, turquesa,
   fucsia y verde yerba, sobre un papel crema para que las fotos manden.
   ========================================================================== */
:root {
  --paper: #fbf5ea;
  --sand: #f3e7d3;
  --line: #e4d5bc;
  --white: #fffdf8;
  --ink: #2b1d14;
  --ink-soft: #3a291d;
  --muted: #6b5a4b;

  --terracotta: #b5472a;
  --terracotta-dark: #933719;
  --terracotta-soft: #f0bfa3;
  --mustard: #e5a823;
  --mustard-soft: #f6d68a;
  --teal: #1f7a78;
  --teal-soft: #a9dcd4;
  --magenta: #b92a66;
  --yerba: #2f4a38;
  --yerba-light: #3f5f49;
  --whatsapp: #1fa855;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Figtree', 'Segoe UI', system-ui, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --nav-height: 72px;
  --gutter: clamp(16px, 4vw, 32px);
  --shadow: 0 1px 2px rgba(43, 29, 20, 0.06), 0 10px 28px rgba(43, 29, 20, 0.08);
  --shadow-lift: 0 2px 4px rgba(43, 29, 20, 0.08), 0 20px 44px rgba(43, 29, 20, 0.16);
}

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

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
ul, ol { list-style: none; }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}
.section-dark :focus-visible,
.section-green :focus-visible,
.footer :focus-visible,
.lightbox :focus-visible { outline-color: var(--mustard); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: fixed;
  z-index: 3000;
  top: 8px;
  left: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--white);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* --- Navegación ---------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(251, 245, 234, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(160%) blur(10px);
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1200px;
  height: var(--nav-height);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  flex: none;
  width: 32px;
  height: 32px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.nav-links a {
  position: relative;
  display: block;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
  text-decoration: none;
}
.nav-links a::after {
  content: '';
  position: absolute;
  right: 12px;
  bottom: 3px;
  left: 12px;
  height: 3px;
  border-radius: 3px;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:hover::after,
.nav-links a.is-current::after { transform: scaleX(1); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-cart,
.nav-toggle {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-size: 1.1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.nav-cart:hover,
.nav-toggle:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}
.nav-toggle { display: none; }
.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--terracotta);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
}
.cart-count.is-bumping { animation: bump 0.35s ease; }
@keyframes bump {
  50% { transform: scale(1.35); }
}

/* --- Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
/* Las diapositivas se apilan en la misma celda: el hero mide lo que la más alta. */
.hero-slides { display: grid; }
.hero-slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  width: 100%;
  max-width: 1200px;
  min-height: min(calc(100svh - var(--nav-height) - 58px), 680px);
  margin: 0 auto;
  padding: 56px var(--gutter) 104px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 700ms ease, visibility 700ms ease;
}
.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}
.badge {
  display: inline-block;
  color: var(--terracotta-dark);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero h1,
.hero-slide h2 {
  margin: 14px 0 18px;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 6vw, 4.9rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
}
/* Pincelada bajo la palabra destacada */
.hero em {
  display: inline-block;
  padding-bottom: 0.14em;
  color: var(--terracotta);
  font-style: italic;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 16' preserveAspectRatio='none'%3E%3Cpath d='M3 10C50 4 96 3 146 5s98 3 151-1c-38 7-92 9-146 8S47 11 3 10z' fill='%23e5a823'/%3E%3C/svg%3E") left bottom / 100% 0.2em no-repeat;
}
.hero-content p {
  max-width: 30em;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 1.2rem;
}
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-art {
  position: relative;
  justify-self: center;
  width: min(100%, 440px);
  transform: translate3d(0, calc(var(--hero-parallax-y, 0px) * 0.5), 0);
}
/* Mancha de pintura detrás de la foto; cambia de color con cada diapositiva */
.hero-art::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -6% -9% -4% -7%;
  border-radius: 58% 42% 47% 53% / 46% 54% 46% 54%;
  background: var(--slide-color);
}
.hero-slide-image {
  width: 84%;
  aspect-ratio: 4 / 5;
  margin-left: auto;
  border: 8px solid var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
  object-fit: cover;
  transform: rotate(2deg);
}
.hero-slide-detail {
  position: absolute;
  bottom: -6%;
  left: -13%;
  width: 37%;
  aspect-ratio: 1;
  border: 6px solid var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-lift);
  object-fit: cover;
  transform: rotate(-5deg);
}
.hero-controls {
  position: absolute;
  z-index: 3;
  bottom: 30px;
  left: max(var(--gutter), calc((100% - 1200px) / 2 + var(--gutter)));
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-arrow {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.hero-arrow:hover {
  background: var(--ink);
  color: var(--white);
}
.hero-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}
/* El punto se ve chico pero el área de toque mide 28px */
.hero-dot {
  position: relative;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.hero-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--line);
  box-shadow: inset 0 0 0 1px var(--muted);
  transform: translate(-50%, -50%);
  transition: width 0.25s, background 0.25s;
}
.hero-dot.is-active::after {
  width: 22px;
  background: var(--terracotta);
  box-shadow: none;
}

/* Franja de características */
.promise-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px clamp(24px, 5vw, 64px);
  padding: 18px var(--gutter);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.98rem;
  font-weight: 500;
}
.promise-strip li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.promise-strip i { color: var(--mustard); }

/* --- Botones ------------------------------------------------------------- */
.btn-main,
.btn-secondary,
.btn-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn-main {
  background: var(--terracotta);
  color: var(--white);
}
.btn-main:hover:not(:disabled) {
  background: var(--terracotta-dark);
  transform: translateY(-2px);
}
.btn-secondary {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--white);
}
.btn-card {
  width: 100%;
  min-height: 46px;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--white);
}
.btn-card:hover { background: var(--terracotta); }
.btn-card.is-added { background: var(--teal); }
.btn-icon {
  width: 54px;
  padding: 0;
  font-size: 1.5rem;
}
.full-width { width: 100%; }

/* --- Secciones ----------------------------------------------------------- */
.section {
  position: relative;
  padding: clamp(64px, 9vw, 104px) 0;
}
.bg-light { background-color: var(--sand); }
.section-dark {
  background: var(--ink);
  color: var(--paper);
}
.section-green {
  background: var(--yerba);
  color: var(--paper);
}
.section-head {
  max-width: 640px;
  margin-bottom: clamp(30px, 4vw, 44px);
}
.section-head-split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px 40px;
  max-width: none;
}
.section-head-split > div:first-child { max-width: 560px; }
.eyebrow {
  margin-bottom: 8px;
  color: var(--terracotta-dark);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.section-dark .eyebrow,
.section-green .eyebrow { color: var(--mustard); }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.section-subtitle {
  margin-top: 10px;
  color: var(--muted);
  font-size: 1.1rem;
}
.section-dark .section-subtitle,
.section-green .section-subtitle { color: #e0d3c0; }

/* --- Catálogo ------------------------------------------------------------ */
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-btn {
  min-height: 42px;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-btn:hover { border-color: var(--ink); }
.filter-btn.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}
.product-carousel,
.gallery-carousel { position: relative; }
.product-viewport,
.gallery-viewport {
  min-width: 0;
  overflow: hidden;
}
.product-grid {
  --card-gap: 24px;
  display: flex;
  gap: var(--card-gap);
  /* Margen para que la sombra de las tarjetas no se corte */
  margin: -8px -8px -32px;
  padding: 8px 8px 32px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-padding-left: 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.product-grid::-webkit-scrollbar,
.gallery-track::-webkit-scrollbar { display: none; }
.product-card {
  display: flex;
  flex: 0 0 calc((100% - 2 * var(--card-gap)) / 3);
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  scroll-snap-align: start;
  transition: box-shadow 0.3s, transform 0.3s;
}
.product-card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-4px);
}
.product-image-button {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 0;
  background: var(--sand);
  cursor: zoom-in;
}
.product-image-button:focus-visible { outline-offset: -4px; }
.product-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-img { transform: scale(1.04); }
.product-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 22px 22px;
}
.category-tag {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
[data-category='ilustrado'] .category-tag { color: var(--magenta); }
[data-category='box'] .category-tag { color: var(--terracotta); }
.product-info h3 {
  margin: 4px 0 6px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
}
.product-info p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.98rem;
}
.product-info .product-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin-top: auto;
  margin-bottom: 14px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
}
.product-price span {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
}
.btn-consult { background: var(--whatsapp); margin-top: auto; }
.btn-consult:hover { background: var(--yerba); }

/* --- Lista de precios ---------------------------------------------------- */
.price-list {
  margin-top: 48px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.price-list-head { margin-bottom: 20px; }
.price-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.price-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}
.price-item-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.price-item-info { flex: 1; }
.price-item h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
}
.price-item-price {
  margin: 0;
  color: var(--terracotta-dark);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
}
.price-item-price span {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
}
.price-notice {
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Flechas de los carruseles */
.gallery-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-lift);
  color: var(--ink);
  font-size: 1.05rem;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s, color 0.2s, opacity 0.2s, visibility 0.2s;
}
.gallery-arrow:hover:not(:disabled) {
  background: var(--terracotta);
  color: var(--white);
}
.gallery-arrow:disabled {
  opacity: 0;
  visibility: hidden;
}
.product-arrow-previous,
.gallery-arrow-previous { left: -14px; }
.product-arrow-next,
.gallery-arrow-next { right: -14px; }

/* --- Carrito ------------------------------------------------------------- */
.cart-box {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 24px clamp(24px, 5vw, 56px);
  margin-top: 36px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  scroll-margin-top: calc(var(--nav-height) + 16px);
}
.cart-box h2 {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
}
.cart-empty { color: var(--muted); }
.cart-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.cart-item-image {
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.cart-item-details {
  flex: 1;
  min-width: 0;
}
.cart-item-details strong { font-weight: 600; }
.cart-item-details p {
  color: var(--muted);
  font-size: 0.92rem;
}
.cart-item-controls {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
}
.cart-quantity-button,
.cart-remove-button {
  min-width: 38px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s;
}
.cart-quantity-button:hover,
.cart-remove-button:hover { border-color: var(--ink); }
.cart-remove-button {
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
}
.cart-summary {
  align-self: start;
  padding: 20px;
  border-radius: var(--radius-sm);
  background: var(--paper);
}
.cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--muted);
}
.cart-total strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
}
.cart-checkout { width: 100%; }
.cart-checkout:disabled {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}
.cart-note,
.cart-status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}
.cart-status:empty { display: none; }

/* --- Galería ------------------------------------------------------------- */
.gallery-track {
  --tile: 206px;
  --tile-gap: 12px;
  display: grid;
  grid-auto-columns: var(--tile);
  grid-auto-flow: column dense;
  grid-template-rows: repeat(2, var(--tile));
  gap: var(--tile-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.gallery-item {
  min-width: 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--ink-soft);
  cursor: zoom-in;
  scroll-snap-align: start;
}
.gallery-item:nth-child(5n + 1) {
  grid-column: span 2;
  grid-row: span 2;
}
.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-img:focus-visible { outline-offset: -4px; }
.gallery-item:hover .gallery-img { transform: scale(1.05); }
.gallery-arrow-previous,
.gallery-arrow-next { background: var(--paper); }

/* Lightbox de la galería */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  inset: 0;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background-color: rgba(28, 18, 12, 0.92);
  backdrop-filter: blur(8px);
}
.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  gap: 12px;
}
.lightbox-image-button {
  display: block;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.lightbox-content {
  max-width: 100%;
  max-height: calc(100vh - 110px);
  max-height: calc(100svh - 110px);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.25s ease;
}
.lightbox-caption {
  color: var(--paper);
  font-size: 0.98rem;
  text-align: center;
}
.lightbox-nav {
  display: grid;
  flex: none;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(251, 245, 234, 0.5);
  border-radius: 50%;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lightbox-nav:hover {
  background: var(--paper);
  color: var(--ink);
}
.lightbox-close {
  position: absolute;
  z-index: 1;
  top: 14px;
  right: 18px;
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  color: var(--paper);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}
.lightbox-close:hover { color: var(--mustard); }
@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* Visor de imágenes del catálogo */
.image-modal {
  position: fixed;
  inset: 0;
  width: min(94vw, 860px);
  max-width: none;
  max-height: 94vh;
  margin: auto;
  padding: 52px 20px 18px;
  border: 0;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.image-modal::backdrop { background: rgba(28, 18, 12, 0.85); }
.image-modal-img {
  max-width: 100%;
  max-height: calc(94vh - 120px);
  margin: 0 auto;
  border-radius: var(--radius-sm);
  object-fit: contain;
}
.image-modal-caption {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-align: center;
}
.image-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--sand);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

/* --- Personalizador ------------------------------------------------------ */
.customizer-box {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 1fr);
  align-items: start;
  gap: clamp(24px, 4vw, 48px);
}
.form-group {
  min-width: 0;
  margin-bottom: 26px;
  border: 0;
}
.form-group:last-child { margin-bottom: 0; }
.form-group legend,
.form-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}
.form-step {
  display: inline-grid;
  flex: none;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--terracotta);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.choice {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.choice:hover { border-color: var(--muted); }
.choice input {
  position: absolute;
  opacity: 0;
}
.choice img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.choice span {
  padding: 8px 10px 10px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
}
.choice:has(input:checked) {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 1px var(--terracotta);
}
.choice:has(input:checked)::after {
  content: '\2713';
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--terracotta);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
}
.choice:has(input:focus-visible) {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}
.form-group input[type='text'] {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  font-size: 1.05rem;
}
.form-group input[type='text']::placeholder { color: var(--muted); }
.form-group input[type='text']:focus {
  border-color: var(--terracotta);
  outline: none;
}
.customizer-preview {
  position: sticky;
  top: calc(var(--nav-height) + 20px);
  padding: 16px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}
.preview-photo {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}
.preview-photo img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
}
.preview-text {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  overflow: hidden;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--white);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 600;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-summary { margin: 12px 0 14px; }
.preview-summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 0.96rem;
}
.preview-summary dt { color: var(--muted); }
.preview-summary dd {
  font-weight: 600;
  text-align: right;
}
.customizer-preview .btn-main {
  padding-right: 12px;
  padding-left: 12px;
  font-size: 0.98rem;
  text-align: center;
}
.preview-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

/* --- Guía de curado ------------------------------------------------------ */
.steps-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}
/* Hilo punteado que une los pasos */
.steps-grid::before {
  content: '';
  position: absolute;
  top: 28px;
  right: calc(25% - 30px);
  left: 28px;
  border-top: 2px dashed rgba(251, 245, 234, 0.35);
}
.step-card { position: relative; }
.step-number {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--mustard);
  box-shadow: 0 0 0 8px var(--yerba);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
}
.step-card h3 {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
}
.step-card p { color: #e6dccb; }

/* --- Pie ----------------------------------------------------------------- */
.footer {
  padding: clamp(56px, 8vw, 88px) 0 26px;
  background: var(--ink);
  color: var(--paper);
}
.footer-cta {
  max-width: 760px;
  margin: 0 auto clamp(44px, 6vw, 64px);
  text-align: center;
}
.footer-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.footer-cta p {
  margin: 12px 0 26px;
  color: #e0d3c0;
  font-size: 1.15rem;
}
.footer-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.footer-cta .btn-secondary {
  border-color: var(--paper);
  color: var(--paper);
}
.footer-cta .btn-secondary:hover {
  background: var(--paper);
  color: var(--ink);
}
.footer-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  padding: 26px 0;
  border-top: 1px solid rgba(251, 245, 234, 0.16);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}
.footer-brand p {
  color: #d3c5b1;
  font-size: 0.95rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}
.footer-links a {
  color: var(--paper);
  text-decoration: none;
  text-underline-offset: 4px;
}
.footer-links a:hover { text-decoration: underline; }
.footer-bottom {
  color: #bfb09b;
  font-size: 0.88rem;
  text-align: center;
}

/* --- Elementos flotantes ------------------------------------------------- */
.whatsapp-float {
  position: fixed;
  z-index: 900;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 50%;
  background: var(--whatsapp);
  box-shadow: var(--shadow-lift);
  color: #fff;
  font-size: 1.7rem;
  text-decoration: none;
  transition: transform 0.2s;
}
.whatsapp-float:hover { transform: scale(1.08); }
.toast {
  position: fixed;
  z-index: 1100;
  bottom: 26px;
  left: 50%;
  width: max-content;
  max-width: calc(100vw - 150px);
  padding: 12px 20px;
  border: 2px solid var(--teal);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-lift);
  color: var(--ink);
  font-size: 0.96rem;
  text-align: center;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s, transform 0.25s;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Aparición suave al hacer scroll, sólo donde el navegador lo soporta */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .section-head,
    .step-card,
    .footer-cta {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 30%;
    }
    @keyframes rise {
      from { opacity: 0; transform: translateY(24px); }
      to { opacity: 1; transform: none; }
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Responsivo ---------------------------------------------------------- */
@media (max-width: 1280px) {
  .product-arrow-previous,
  .gallery-arrow-previous { left: -6px; }
  .product-arrow-next,
  .gallery-arrow-next { right: -6px; }
}

@media (max-width: 1100px) {
  .hero-slide-detail { left: -5%; }
}

@media (max-width: 960px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    box-shadow: var(--shadow);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    padding: 13px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 1.1rem;
  }
  .nav-links li:last-child a { border-bottom: 0; }
  .nav-links a::after { display: none; }
  .nav-links a.is-current { color: var(--terracotta); }

  .product-card { flex-basis: calc((100% - var(--card-gap)) / 2); }

  .cart-box,
  .customizer-box { grid-template-columns: minmax(0, 1fr); }
  .customizer-preview { position: static; }
  .preview-photo img { aspect-ratio: 16 / 9; }

  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 28px;
  }
  .steps-grid::before { display: none; }
}

@media (max-width: 760px) {
  :root { --nav-height: 64px; }
  .brand-logo { font-size: 1.22rem; }
  .brand-mark { width: 28px; height: 28px; }

  .hero-slide {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    align-content: start;
    min-height: 0;
    padding: 36px var(--gutter) 88px;
  }
  .hero-art {
    order: -1;
    width: min(78%, 320px);
    transform: none;
  }
  .hero-slide-image { aspect-ratio: 1; }
  .hero-content p {
    margin-bottom: 22px;
    font-size: 1.1rem;
  }
  .hero-buttons a { flex: 1 1 auto; }
  .hero-controls { bottom: 24px; }

  .promise-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    font-size: 0.92rem;
  }

  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice img { aspect-ratio: 4 / 3; }
}

@media (max-width: 360px) {
  .nav-container { gap: 8px; }
  .brand-logo {
    gap: 6px;
    font-size: 1.05rem;
  }
  .brand-mark { width: 24px; height: 24px; }
  .nav-cart,
  .nav-toggle { width: 42px; height: 42px; }
}

@media (max-width: 600px) {
  /* En celular se desliza con el dedo: la tarjeta siguiente asoma como pista */
  .gallery-arrow { display: none; }
  .product-grid { --card-gap: 14px; }
  .product-card { flex-basis: 84%; }
  .gallery-track {
    --tile: 132px;
    --tile-gap: 8px;
  }

  .cart-item { flex-wrap: wrap; }
  .cart-item-details { flex-basis: calc(100% - 74px); }
  .cart-item-controls {
    justify-content: flex-end;
    width: 100%;
  }

  .steps-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }
  .step-card {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    column-gap: 16px;
  }
  .step-number {
    grid-row: span 2;
    margin-bottom: 0;
  }

  .lightbox {
    flex-wrap: wrap;
    align-content: center;
    gap: 14px 20px;
    padding: 64px 12px 20px;
  }
  .lightbox-figure {
    flex-basis: 100%;
    order: -1;
  }
  .lightbox-content {
    max-height: calc(100vh - 230px);
    max-height: calc(100svh - 230px);
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
  .whatsapp-float {
    right: 14px;
    bottom: 14px;
    width: 52px;
    height: 52px;
  }
}
