/* catalogo-v2.css — Estilos AISLADOS de /catalogo-v2 y /producto/:id (Fase 2).
   Reutiliza variables de marca (styles.css) y componentes de home-v2.css
   (.v2-nav, .v2-card, .v2-btn, .v2-reveal). Mobile-first. */

/* El header global (.v2-nav / .v2-nav-solo) se estiliza en home-v2.css.
   Aquí solo despejamos la altura del header fijo (72px) en las páginas internas. */
#v2-main { padding-top: 72px; min-height: 60vh; }

/* ── Page-header con foto (banner cinematográfico estilo v0) ───────────── */
.v2-pagehead { position: relative; overflow: hidden; background: #2a1636; }
.v2-pagehead::before {
  content: ""; position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: .42;
}
.v2-pagehead::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(24,12,32,.94), rgba(24,12,32,.62) 60%, rgba(24,12,32,.74));
}
.v2-pagehead--catalogo::before { background-image: url('/static/img/productos/masa-madre.webp'); }
.v2-pagehead--promos::before { background-image: url('/static/img/productos/croissant.webp'); }
.v2-pagehead--contacto::before { background-image: url('/static/img/home/experience.webp'); }
.v2-pagehead--historia::before { background-image: url('/static/img/home/story.webp'); }
.v2-pagehead-inner {
  position: relative; z-index: 1; max-width: 1240px; margin: 0 auto;
  min-height: 44vh; display: flex; flex-direction: column; justify-content: flex-end;
  gap: .8rem; padding: 8rem 1.5rem 3.5rem;
}
.v2-pagehead .v2-kicker { color: rgba(245,239,224,.75); margin-bottom: 0; }
.v2-pagehead .v2-pagehead-titulo {
  font-family: var(--cm-serif); color: #F7F1E4; font-size: clamp(2.4rem, 7vw, 4.2rem);
  margin: 0; line-height: 1.02; letter-spacing: -.015em; max-width: 16ch;
  text-shadow: 0 2px 14px rgba(0,0,0,.4);
}
.v2-pagehead-desc { color: rgba(245,239,224,.82); font-size: 1.1rem; line-height: 1.6; margin: .4rem 0 0; max-width: 44ch; }
@media (min-width: 760px) { .v2-pagehead-inner { padding: 8rem 2.5rem 4rem; } }

/* ── Chips de categoría (pill editorial estilo v0) ─────────────────────── */
.cv2-chips {
  max-width: 1240px; margin: 2.5rem auto 1.5rem; padding: .5rem 1.5rem 1rem;
  display: flex; gap: .6rem; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
  justify-content: flex-start;
}
.cv2-chips a {
  flex: 0 0 auto; padding: .55rem 1.1rem; border-radius: 999px; text-decoration: none;
  background: transparent; color: var(--cm-primary); border: 1.5px solid var(--cm-cream-dark, #E8E0D0);
  font-size: .72rem; font-weight: 600; white-space: nowrap; text-transform: uppercase; letter-spacing: .1em;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.cv2-chips a:hover { background: var(--cm-primary); color: #fff; border-color: var(--cm-primary); }
@media (min-width: 760px) { .cv2-chips { justify-content: center; } }

/* ── Secciones y grilla del catálogo (más aire, títulos serif) ─────────── */
.cv2-seccion { max-width: 1240px; margin: 0 auto; padding: 3rem 1.5rem; scroll-margin-top: 80px; }
.cv2-seccion h2 { font-family: var(--cm-serif); font-size: clamp(1.6rem, 5vw, 2.4rem); margin: 0 0 1.6rem; color: var(--cm-dark); line-height: 1.05; letter-spacing: -.01em; }
.cv2-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (min-width: 620px) { .cv2-grid { grid-template-columns: repeat(3, 1fr); gap: 1.1rem; } }
@media (min-width: 900px) { .cv2-grid { grid-template-columns: repeat(4, 1fr); } }

/* Tarjeta con enlace (foto+datos) + acción separada (evita anidar botón en <a>). */
.v2-card-lnk { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.v2-card-acc { padding: 0 .9rem .9rem; margin-top: auto; }
/* Objetivo táctil ≥ 44px (endurecimiento Fase 5) en los botones de acción. */
.v2-card-acc .v2-btn { width: 100%; padding: .55rem .8rem; font-size: .9rem;
  min-height: 44px; display: flex; align-items: center; justify-content: center; }
.pv2-acciones .v2-btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.v2-card.agotado { opacity: .72; }

/* ── Placeholder de marca (cuando no hay imagen_url). NO emojis. ────────── */
.v2-ph {
  background: linear-gradient(135deg, var(--cm-cream, #F5EFE0), var(--cm-cream-dark, #E8E0D0));
  color: var(--cm-primary); position: relative;
}
.v2-ph .v2-ph-mark { width: 46%; height: 46%; opacity: .5; }
.v2-ph::after {
  content: "Casa Milagro"; position: absolute; bottom: 8%; left: 0; right: 0; text-align: center;
  font-family: var(--cm-serif); font-size: .8rem; letter-spacing: .04em; color: var(--cm-primary); opacity: .55;
}

/* ── Estado de disponibilidad ──────────────────────────────────────────── */
.v2-estado { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; font-weight: 600; padding: .2rem .5rem; border-radius: 999px; }
.v2-estado-ok { background: #e7f0e1; color: #2E7D4F; }
.v2-estado-no { background: #f3e2df; color: #b3261e; }
.v2-estado-recien { background: #fff0d6; color: #a9670a; }

/* ── Ficha de producto (estilo v0) ─────────────────────────────────────── */
.pv2-breadcrumb { max-width: 1240px; margin: 0 auto; padding: .5rem 1.5rem; font-size: .8rem; color: var(--mute, #8a8178); }
.pv2-breadcrumb a { color: var(--mute, #8a8178); text-decoration: none; }
.pv2-breadcrumb a:hover { color: var(--cm-primary); }
.pv2 { max-width: 1240px; margin: 0 auto; padding: 1rem 1.5rem 3rem; display: grid; gap: 2rem; }
.pv2-media-col { position: relative; }
.pv2-media {
  position: relative; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: var(--cm-cream, #F5EFE0);
}
.pv2-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.22,1,.36,1); }
.pv2-media:hover img { transform: scale(1.05); }
.pv2-badge {
  position: absolute; top: 1rem; left: 1rem; z-index: 2; background: var(--cm-primary); color: #fff;
  font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; padding: .35rem .7rem; border-radius: 999px;
}
.pv2-badge-oro { background: var(--v2-gold, #C29A4B); }
.pv2-badge-sage { background: var(--cm-accent, #B4CFAA); color: var(--cm-dark); }
.pv2-info { display: flex; flex-direction: column; }
.pv2-cat { display: inline-block; letter-spacing: .18em; text-transform: uppercase; font-size: .72rem; font-weight: 600; color: var(--cm-primary); }
.pv2-nombre { font-family: var(--cm-serif); font-size: clamp(2rem, 5.5vw, 3rem); margin: .6rem 0 0; color: var(--cm-dark); line-height: 1.05; letter-spacing: -.01em; }
.pv2-precio-row { display: flex; align-items: center; gap: .9rem; margin-top: 1.1rem; flex-wrap: wrap; }
.pv2-precio { font-family: var(--cm-serif); font-size: 1.9rem; font-weight: 600; color: var(--cm-dark); }
.pv2-precio s { color: var(--mute, #8a8178); font-weight: 400; font-size: 1.2rem; margin-left: .5rem; }
.pv2-disp { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 600; padding: .35rem .8rem; border-radius: 999px; }
.pv2-disp-ok { background: rgba(180,207,170,.4); color: #2E7D4F; }
.pv2-disp-no { background: var(--muted, #eee); color: var(--mute, #8a8178); }
.pv2-desc { line-height: 1.7; color: var(--mute, #6b6258); margin: 1.4rem 0 0; font-size: 1.02rem; }
.pv2-hr { display: block; height: 1px; background: var(--v2-linea, rgba(58,38,71,.14)); margin: 1.8rem 0; }
.pv2-acciones { display: flex; gap: .8rem; align-items: stretch; flex-wrap: wrap; }
.pv2-add { flex: 1; min-width: 12rem; justify-content: center; }
.pv2-comprar { width: 100%; justify-content: center; margin-top: .8rem; }
.pv2-puntos { display: flex; align-items: center; gap: .5rem; margin: 1.2rem 0 0; font-size: .9rem; color: var(--mute, #6b6258); }
.pv2-puntos strong { color: var(--cm-dark); }
.pv2-entrega { display: grid; gap: .8rem; margin-top: 1.8rem; }
.pv2-entrega-card { display: flex; gap: .8rem; align-items: flex-start; background: var(--cm-cream, #F5EFE0); border-radius: 16px; padding: 1rem 1.1rem; }
.pv2-entrega-ico { font-size: 1.3rem; line-height: 1; }
.pv2-entrega-card h3 { font-size: .92rem; margin: 0; color: var(--cm-dark); }
.pv2-entrega-card p { font-size: .82rem; margin: .2rem 0 0; color: var(--mute, #8a8178); line-height: 1.5; }
.pv2-agotado { background: var(--cm-cream, #F5EFE0); border-radius: 16px; padding: 1.4rem; }
.pv2-agotado p { margin: 0 0 1rem; color: var(--mute, #6b6258); line-height: 1.6; }
/* Botón claro sobre fondo claro → morado legible */
.v2-body .v2-btn-claro { color: var(--cm-primary); border-color: rgba(92,61,110,.25); }
.v2-body .v2-btn-claro:hover { background: var(--cm-primary); color: #fff; border-color: var(--cm-primary); }
/* Control de cantidad (lo lee app.js: .producto .cantidad-card span) */
.cantidad-card { display: inline-flex; align-items: center; border: 1px solid var(--cm-cream-dark, #E8E0D0); border-radius: 999px; overflow: hidden; }
.cantidad-card button { border: 0; background: #fff; width: 48px; height: 52px; font-size: 1.2rem; cursor: pointer; color: var(--cm-primary); }
.cantidad-card span { min-width: 2.4ch; text-align: center; font-weight: 700; }
@media (min-width: 620px) { .pv2-entrega { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .pv2 { grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; } .pv2-media-col { position: sticky; top: 96px; } }

/* ── Avisos amables (sin errores técnicos) ─────────────────────────────── */
.v2-aviso { max-width: 640px; margin: 2rem auto; text-align: center; background: #fff; border-radius: var(--radio); padding: 2rem 1.5rem; box-shadow: var(--sombra); }
.v2-aviso h2 { font-family: var(--cm-serif); color: var(--cm-primary); margin: 0 0 .5rem; }
.v2-aviso p { color: #4a3d50; margin: 0 0 1.2rem; }
.cv2-noscript, .pv2-noscript { max-width: 640px; margin: 1.5rem auto; text-align: center; }

/* Los relacionados reutilizan .v2-bento de home-v2.css */
.pv2-relacionados-sec { max-width: 1100px; margin: 0 auto; padding: 1rem 1.25rem 3rem; }
.pv2-relacionados-sec h2 { font-family: var(--cm-serif); color: var(--cm-dark); font-size: clamp(1.4rem, 4.5vw, 2rem); }

/* ── Historia (/historia): relato editorial de bloques alternados (v0) ──── */
.hist-split { display: grid; grid-template-columns: 1fr; align-items: stretch; }
.hist-split-media { position: relative; min-height: 42vh; overflow: hidden; }
.hist-split-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s cubic-bezier(.22,1,.36,1); }
.hist-split:hover .hist-split-media img { transform: scale(1.05); }
.hist-split-media .v2-ph { width: 100%; height: 100%; min-height: 42vh; display: flex; align-items: center; justify-content: center; }
.hist-split-texto { display: flex; flex-direction: column; justify-content: center; gap: .4rem; padding: 3rem 1.5rem; }
.hist-index { font-family: var(--cm-serif); font-size: .95rem; color: var(--cm-primary); letter-spacing: .1em; }
.hist-split-texto h2 { font-family: var(--cm-serif); font-size: clamp(1.8rem, 4.5vw, 2.8rem); line-height: 1.08; letter-spacing: -.01em; margin: .5rem 0 1rem; color: var(--cm-dark); max-width: 20ch; }
.hist-split-cuerpo p { line-height: 1.8; color: var(--mute, #6b6258); margin: 0 0 1rem; font-size: 1.05rem; max-width: 46ch; }
.hist-split--cream { background: var(--cm-cream, #F5EFE0); }
.hist-split--ivory { background: #fffdf8; }
.hist-split--plum { background: var(--cm-primary); }
.hist-split--plum .hist-index { color: var(--v2-gold-2, #DCC085); }
.hist-split--plum .v2-kicker { color: rgba(245,239,224,.75); }
.hist-split--plum h2 { color: #F5EFE0; }
.hist-split--plum .hist-split-cuerpo p { color: rgba(245,239,224,.85); }
@media (min-width: 860px) {
  .hist-split { grid-template-columns: 1fr 1fr; }
  .hist-split-texto { padding: 4.5rem 4rem; }
  .hist-split--reverse .hist-split-media { order: 2; }
  .hist-split--reverse .hist-split-texto { order: 1; }
}

/* ── Banda de cierre editorial (v0): frase de marca + CTA, fondo oscuro ── */
.v2-cierre { background: var(--cm-dark, #3A2647); color: #F5EFE0; padding: 5.5rem 1.5rem; }
.v2-cierre-inner { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 1.6rem; }
.v2-cierre .v2-kicker { color: rgba(245,239,224,.55); margin: 0; }
.v2-cierre .v2-cierre-frase { font-family: var(--cm-serif); font-size: clamp(2rem, 5.5vw, 3.4rem); line-height: 1.1; letter-spacing: -.01em; margin: 0; max-width: 18ch; color: #F7F1E4; font-weight: 600; }
.v2-cierre .v2-cierre-btn, .v2-body .v2-cierre .v2-cierre-btn { background: var(--cm-cream, #F5EFE0); color: var(--cm-dark, #3A2647); border-color: var(--cm-cream, #F5EFE0); margin-top: .6rem; }
.v2-cierre .v2-cierre-btn:hover { background: #fff; color: var(--cm-dark, #3A2647); border-color: #fff; }
@media (min-width: 760px) { .v2-cierre { padding: 7rem 1.5rem; } }

/* ── Contacto (/contacto): dos columnas (mensaje + Visítanos) estilo v0 ─── */
.contacto-cols { max-width: 1240px; margin: 0 auto; padding: 4rem 1.5rem 5rem; display: grid; gap: 3rem; }
@media (min-width: 900px) { .contacto-cols { grid-template-columns: 1fr 1fr; gap: 4.5rem; align-items: start; } }
.contacto-h2 { font-family: var(--cm-serif); font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--cm-dark); margin: .3rem 0 1.6rem; letter-spacing: -.01em; }
.contacto-form { display: flex; flex-direction: column; gap: 1.1rem; }
.contacto-form textarea.av2-input { resize: vertical; min-height: 7rem; line-height: 1.5; }
.contacto-form .v2-btn { align-self: flex-start; margin-top: .3rem; }
/* Datos de "Dónde encontrarnos" (los pinta catalogo-v2.js) como filas editoriales,
   con distintivo circular por cada dato (estilo v0). */
.contacto-info-col .contacto-dato { display: flex; align-items: flex-start; gap: 1.1rem; background: transparent; box-shadow: none; border-radius: 0; padding: 1.4rem 0; border-top: 1px solid var(--v2-linea, rgba(58,38,71,.14)); }
.contacto-info-col .contacto-dato:first-of-type { border-top: 0; padding-top: 0; }
.contacto-dato-ico { flex: 0 0 auto; width: 2.9rem; height: 2.9rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; line-height: 1; background: rgba(92,61,110,.1); }
.contacto-dato-cuerpo { min-width: 0; flex: 1; }
.contacto-dato h3, .contacto-dato h2 { font-family: var(--cm-sans); text-transform: uppercase; letter-spacing: .12em; color: var(--cm-primary); margin: .35rem 0 .45rem; font-size: .78rem; font-weight: 700; }
.contacto-dato p { margin: 0 0 .5rem; line-height: 1.6; color: #4a3d50; }
.contacto-dato a:not(.v2-btn) { color: var(--cm-primary); font-weight: 600; }
.contacto-dato .v2-btn { margin-top: .3rem; }
.contacto-mapa { height: 300px; border-radius: 16px; overflow: hidden; background: var(--cm-cream-dark, #E8E0D0); margin-top: 1.5rem; }
.contacto-mapa-wrap { min-width: 0; }

/* ── Autenticación a pantalla dividida (estilo v0) ─────────────────────── */
.av2-body { overflow-x: hidden; }
.av2-body #v2-main { padding-top: 0; min-height: 0; }
.av2 { display: grid; grid-template-columns: 1fr; min-height: 100vh; min-height: 100svh; }
.av2-foto {
  position: relative; overflow: hidden; min-height: 34vh; display: flex; flex-direction: column;
  justify-content: space-between; padding: 1.5rem; color: #fff; background: var(--cm-primary);
}
.av2-foto::before {
  content: ""; position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .62;
}
.av2-foto::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(58,38,71,.95), rgba(58,38,71,.55) 50%, rgba(58,38,71,.2));
}
.av2-foto--pan::before { background-image: url('/static/img/home/story.webp'); }
.av2-foto--cafe::before { background-image: url('/static/img/productos/latte.webp'); }
.av2-logo { position: relative; z-index: 1; align-self: flex-start; }
.av2-foto-cita { position: relative; z-index: 1; }
.av2-quote { font-family: var(--cm-serif); font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.1; letter-spacing: -.01em; margin: 0; color: #F5EFE0; max-width: 20ch; }
.av2-sub { text-transform: uppercase; letter-spacing: .18em; font-size: .7rem; font-weight: 600; color: rgba(245,239,224,.6); margin: 1.3rem 0 0; }

.av2-form { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; background: var(--cm-cream, #F5EFE0); }
.av2-form-inner { width: 100%; max-width: 27rem; }
.av2-h1 { font-family: var(--cm-serif); font-size: clamp(2.1rem, 5.5vw, 3rem); color: var(--cm-dark); margin: 0; line-height: 1.03; letter-spacing: -.01em; }
.av2-lead { color: var(--mute, #6b6258); margin: .9rem 0 1.9rem; line-height: 1.6; }
.av2-error { background: #f6e3e0; color: #b3261e; border-radius: 12px; padding: .8rem 1rem; margin: 0 0 1.2rem; font-size: .9rem; }
.av2-aviso { background: rgba(180,207,170,.35); color: #2E7D4F; border-radius: 12px; padding: .8rem 1rem; margin: 0 0 1.2rem; font-size: .9rem; }
.av2-formulario { display: flex; flex-direction: column; gap: 1.1rem; }
.av2-field { display: flex; flex-direction: column; gap: .4rem; }
.av2-label { font-size: .82rem; font-weight: 600; color: var(--cm-dark); }
.av2-input {
  width: 100%; background: #fffdf8; border: 1.5px solid var(--cm-cream-dark, #E8E0D0); border-radius: 12px;
  padding: .85rem 1rem; font-size: 1rem; font-family: var(--cm-sans); color: var(--cm-dark);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.av2-input::placeholder { color: #b8ad9e; }
.av2-input:focus { outline: none; border-color: var(--cm-primary); box-shadow: 0 0 0 3px rgba(92,61,110,.14); }
.av2-hint { font-size: .78rem; color: var(--mute, #8a8178); }
.av2-check { display: flex; gap: .6rem; align-items: flex-start; font-size: .85rem; color: var(--mute, #6b6258); line-height: 1.4; cursor: pointer; }
.av2-check input { margin-top: .15rem; width: 1.05rem; height: 1.05rem; accent-color: var(--cm-primary); flex: 0 0 auto; }
.av2-check a { color: var(--cm-primary); }
.av2-submit {
  margin-top: .4rem; width: 100%; border: 0; cursor: pointer; background: var(--cm-primary); color: #fff;
  font-family: var(--cm-sans); font-weight: 600; font-size: .95rem; padding: .95rem 1rem; border-radius: 999px;
  transition: background-color .2s ease, transform .15s ease;
}
.av2-submit:hover { background: var(--cm-primary-osc, #4A3057); transform: translateY(-1px); }
.av2-alt { text-align: center; font-size: .88rem; color: var(--mute, #6b6258); margin: 1rem 0 0; }
.av2-alt a { color: var(--cm-primary); font-weight: 600; text-decoration: none; }
.av2-alt a:hover { text-decoration: underline; }
@media (min-width: 900px) {
  .av2 { grid-template-columns: 1fr 1fr; }
  .av2-foto { min-height: 100vh; min-height: 100svh; padding: 3rem; }
  .av2-form { padding: 3rem; }
}
