@import url('assets/css/tokens.css');

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 12px 20px;
  background: var(--sage);
  color: var(--cream);
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-icon { width: 32px; height: 32px; object-fit: contain; filter: brightness(0) invert(1); }
.header-cta {
  font-family: var(--font-label); font-size: 12.5px; font-weight: 700;
  color: var(--navy-deep); background: var(--taupe);
  padding: 9px 16px; border-radius: 999px; text-decoration: none;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}
.header-cta:hover { background: var(--cream); }
.header-cta:active { transform: scale(0.96); }

/* ============================================================
   FONDOS TEMÁTICOS — mismo lenguaje visual que /menu: cada sección
   usa un color de la paleta oficial a todo lo ancho, con trazos
   decorativos sueltos y el isotipo grande y tenue en una esquina.
   ============================================================ */
.theme-navy  { background-color: var(--navy); --theme-bg: var(--navy); }
.theme-sage  { background-color: var(--sage); --theme-bg: var(--sage); }
.theme-coral { background-color: var(--tan);  --theme-bg: var(--tan); }

.deco-fade {
  position: absolute; top: 0; left: 0; right: 0; height: 70px;
  pointer-events: none; z-index: 0;
}

.deco-flourish {
  position: absolute; pointer-events: none; z-index: 0;
  fill: none; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round;
}
.deco-flourish svg { display: block; width: 100%; height: 100%; overflow: visible; }
.deco-flourish.deco-head { width: min(56vw, 380px); top: 18px; }
.deco-flourish.deco-body { width: min(50vw, 340px); bottom: 24px; }
.deco-flourish.side-left { left: -14%; }
.deco-flourish.side-right { right: -14%; transform: scaleX(-1); }
.theme-sage .deco-flourish, .theme-navy .deco-flourish { stroke: rgba(255, 255, 255, 0.28); }
.theme-coral .deco-flourish { stroke: rgba(35, 43, 55, 0.24); }

.deco-watermark {
  position: absolute; width: 210px; max-width: 46%; height: auto;
  opacity: 0.13; pointer-events: none; z-index: 0; bottom: -24px;
}
.deco-watermark.wm-right { right: -30px; }
.deco-watermark.wm-left { left: -30px; transform: scaleX(-1); }
.theme-sage .deco-watermark, .theme-navy .deco-watermark { filter: brightness(0) invert(1); }

.hero-flourish {
  position: absolute; pointer-events: none; z-index: 0;
  fill: none; stroke: rgba(255, 255, 255, 0.28); stroke-width: 3.2;
  stroke-linecap: round; stroke-linejoin: round;
}
.hero-flourish svg { display: block; width: 100%; height: 100%; overflow: visible; }
.flourish-pos-a { width: min(70vw, 520px); top: -10%; left: -12%; transform: rotate(-6deg); }
.flourish-pos-c { width: min(66vw, 480px); top: 22%; right: -16%; transform: rotate(10deg); }
.flourish-pos-d { width: min(58vw, 420px); bottom: 6%; left: -14%; transform: rotate(-14deg) scaleY(-1); }

/* ============================================================
   HERO — pensado para caber en 100dvh en móvil junto al header
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(100dvh - 62px);
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
  padding: 34px 12px 8px;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-bg-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 2.2s var(--ease);
}
.hero-bg-img.is-active { opacity: 1; }
.hero-bg-tint {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(35,43,55,0.82), rgba(35,43,55,0.7) 45%, rgba(35,43,55,0.88));
}
.hero-main {
  width: 100%; flex: 1; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
}
.hero-head { position: relative; z-index: 1; text-align: center; }
.hero-kicker {
  font-family: var(--font-label); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.12em; color: var(--tan); text-transform: uppercase;
}
.hero-logo-full {
  display: block; margin: 6px auto 0;
  width: clamp(210px, 62vw, 340px); height: auto;
}
.hero-sub {
  font-family: var(--font-body); font-size: clamp(11.5px, 3vw, 14px);
  color: rgba(250, 247, 240, 0.78); margin-top: 6px;
}

.hero-features {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin-top: 18px;
}
.hero-feature {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid rgba(250, 247, 240, 0.25);
  background: rgba(250, 247, 240, 0.06);
  font-family: var(--font-label); font-size: 10.5px; font-weight: 600;
  color: rgba(250, 247, 240, 0.9); letter-spacing: 0.01em; white-space: nowrap;
}
.hero-feature svg { width: 13px; height: 13px; flex: 0 0 auto; }

.hero-actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-top: 20px;
}

/* --------------------------------------------------------------
   VITRINA — 4 columnas fijas en el DOM, cada una con un ítem arriba
   y uno abajo. El giro se controla por completo desde JS: cada
   columna recibe un valor continuo de posición (0-4) que se traduce
   en translateX/scale/opacity interpolados, así el arrastre sigue
   al dedo/mouse en tiempo real y solo al soltar se anima el "snap"
   hacia la cara más cercana.
   -------------------------------------------------------------- */
.showcase {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  width: 100%;
  flex: 1;
  min-height: 0;
  max-height: 600px;
  touch-action: pan-y;
}
.showcase-stage {
  position: relative;
  width: clamp(280px, 90vw, 400px);
  aspect-ratio: 1 / 1.3;
  cursor: grab;
  touch-action: pan-y;
  /* select/drag desactivados: evita que en computadora un arrastre
     se interprete como selección de texto o arrastre de imagen */
  user-select: none; -webkit-user-select: none;
  -webkit-user-drag: none;
}
.showcase-stage:active { cursor: grabbing; }
.showcase-ring { position: absolute; inset: 0; user-select: none; -webkit-user-select: none; }
.showcase-shadow {
  position: absolute; left: 50%; bottom: 4%;
  width: 58%; height: 14px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(0,0,0,0.35), transparent 75%);
  border-radius: 50%;
  z-index: 0;
}

.showcase-column {
  position: absolute; left: 50%; top: 50%;
  width: 42%;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(14px, 4vw, 24px);
  will-change: transform, opacity;
  user-select: none; -webkit-user-select: none;
}
.showcase-column .blob-frame { pointer-events: auto; }

/* Cada producto "descansa" sobre una repisa horizontal en vez de
   colgar de una línea vertical: una línea corta debajo de cada
   círculo, con una sombra sutil, como si fuera el borde de un
   estante donde se apoya. */
.shelf-item { width: 100%; position: relative; display: flex; flex-direction: column; align-items: center; }
.column-shelf {
  width: 78%;
  height: 3px;
  margin-top: 10px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, rgba(209, 196, 155, 0.9), transparent);
  box-shadow: 0 5px 8px -3px rgba(0, 0, 0, 0.4);
}

.blob-frame {
  position: relative;
  width: 100%; flex: 0 0 auto;
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--tan), var(--taupe));
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.45), inset 0 0 0 3px rgba(255,255,255,0.45);
  cursor: pointer;
  border-radius: 63% 37% 54% 46% / 45% 41% 59% 55%;
  animation: blobMorph 9s ease-in-out infinite alternate;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
  -webkit-user-drag: none;
}
.showcase-column:nth-child(2) .blob-frame { animation-delay: -3s; }
.showcase-column:nth-child(3) .blob-frame { animation-delay: -6s; }
.blob-frame:hover,
.blob-frame.is-focused {
  transform: scale(1.12);
  filter: saturate(1.18) brightness(1.06);
  box-shadow: 0 20px 38px -14px rgba(0, 0, 0, 0.55), inset 0 0 0 3px rgba(255,255,255,0.7);
}
.blob-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: inherit;
}
.blob-frame svg {
  width: 40%; height: 40%;
  stroke: var(--navy-deep);
  overflow: visible;
  pointer-events: none;
  -webkit-user-drag: none;
}
.blob-label {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-family: var(--font-label); font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.02em; color: var(--paper); white-space: nowrap;
  opacity: 0; transition: opacity 0.3s var(--ease);
  text-transform: uppercase;
  user-select: none; -webkit-user-select: none;
}
.blob-top .blob-label { top: -15px; }
.blob-bottom .blob-label { bottom: -26px; }
.showcase-column.is-front .blob-label { opacity: 1; }

/* Partículas simples que aparecen detrás del producto al pasar el
   mouse (o al "enfocarlo" con el primer toque en celular). Viven en
   un contenedor hermano que pinta antes que el círculo, así quedan
   detrás de él en vez de encima. */
.blob-particles {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
}
.particle {
  position: absolute; top: 50%; left: 50%;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--tan);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.3);
}
.shelf-item:has(.blob-frame:hover) .particle,
.shelf-item:has(.blob-frame.is-focused) .particle {
  animation: particleFloat 1.1s ease-out infinite;
}
.particle.p1 { --dx: -48px; --dy: -40px; animation-delay: 0s; }
.particle.p2 { --dx: 42px; --dy: -48px; animation-delay: 0.14s; background: var(--paper); }
.particle.p3 { --dx: 54px; --dy: 8px; animation-delay: 0.28s; }
.particle.p4 { --dx: -54px; --dy: 12px; animation-delay: 0.42s; background: var(--paper); }
.particle.p5 { --dx: -20px; --dy: 52px; animation-delay: 0.56s; }
.particle.p6 { --dx: 24px; --dy: 50px; animation-delay: 0.7s; background: var(--paper); }
@keyframes particleFloat {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  30%  { opacity: 0.9; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1); }
}

@keyframes blobMorph {
  0%   { border-radius: 63% 37% 54% 46% / 45% 41% 59% 55%; }
  33%  { border-radius: 40% 60% 66% 34% / 58% 39% 61% 42%; }
  66%  { border-radius: 56% 44% 38% 62% / 40% 62% 38% 60%; }
  100% { border-radius: 48% 52% 62% 38% / 62% 44% 56% 38%; }
}

.showcase-arrow {
  flex: 0 0 auto;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy); background: var(--paper);
  box-shadow: 0 6px 16px -8px rgba(0,0,0,0.4);
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
  z-index: 6;
}
.showcase-arrow svg { width: 16px; height: 16px; }
.showcase-arrow:hover { background: var(--tan); }
.showcase-arrow:active { transform: scale(0.9); }

.hero-scroll-hint {
  position: relative; z-index: 1;
  margin-top: auto;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--tan); opacity: 0.9;
  animation: bob 1.8s ease-in-out infinite;
}
.hero-scroll-hint svg { width: 18px; height: 18px; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ============================================================
   SECCIONES GENERALES
   ============================================================ */
.section { padding: 56px 20px; max-width: 1080px; margin: 0 auto; }
.section-bleed {
  position: relative; overflow: hidden;
  max-width: none; margin: 0; padding-left: 0; padding-right: 0;
}
.section-inner { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.section-head { text-align: center; margin-bottom: 30px; }
.section-kicker {
  font-family: var(--font-label); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; color: var(--sage-deep); text-transform: uppercase;
}
.section-title { margin-top: 4px; line-height: 1; }
.section-title .script-part {
  display: block; position: relative; z-index: 2;
  font-family: var(--font-script); font-size: clamp(38px, 8vw, 52px); color: var(--navy);
  /* Relieve/emboss: mismo tratamiento que el menú — un halo sólido en el
     color exacto del fondo de la sección, para separar el script del
     bold que queda montado justo debajo (--theme-bg lo define cada tema) */
  -webkit-text-stroke: 2px var(--theme-bg, var(--cream));
  paint-order: stroke fill;
}
.section-title .bold-part {
  display: block; position: relative; z-index: 1;
  font-family: var(--font-agrandir); font-weight: 700; text-transform: uppercase;
  font-size: clamp(19px, 4vw, 25px); letter-spacing: 0.03em; color: var(--navy); margin-top: -0.2em;
}
.theme-sage .section-kicker, .theme-navy .section-kicker { color: var(--tan); }
.theme-sage .section-title .script-part, .theme-sage .section-title .bold-part,
.theme-navy .section-title .script-part, .theme-navy .section-title .bold-part { color: var(--cream); }

/* ---------------- Categorías ---------------- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.category-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; text-decoration: none;
  background: var(--paper); border-radius: var(--radius-md);
  padding: 22px 12px; box-shadow: var(--shadow-soft);
  border: 1px solid rgba(49,60,76,0.06);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.category-card:hover { transform: translateY(-4px); box-shadow: 0 18px 32px -18px rgba(0,0,0,0.45); }
.category-card-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--tan), var(--taupe));
}
.category-card-icon svg { width: 24px; height: 24px; stroke: var(--navy-deep); }
.category-card-name {
  font-family: var(--font-display); font-weight: 700; font-size: 13.5px;
  color: var(--navy); text-transform: uppercase; letter-spacing: 0.02em;
}

/* ---------------- Recomendados del barista ---------------- */
.highlights-strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.highlight-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  background: var(--navy); color: var(--cream);
  font-family: var(--font-label); font-size: 12.5px; font-weight: 600;
}
.highlight-pill svg { width: 16px; height: 16px; flex: 0 0 auto; }
.highlight-pill:nth-child(3n+2) { background: var(--paper); color: var(--navy); }
.highlight-pill:nth-child(3n) { background: var(--sage); color: var(--cream); }

/* ---------------- Ubicación y horarios ---------------- */
.location-section { padding-top: 64px; scroll-margin-top: 70px; }
.location-card {
  max-width: 680px; margin: 0 auto;
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  --theme-bg: var(--navy);
  border-radius: var(--radius-lg);
  padding: 40px 28px;
  color: var(--cream);
  text-align: center;
}
.location-card .section-kicker { color: var(--tan); }
.location-card .script-part, .location-card .bold-part { color: var(--cream); }
.location-list {
  list-style: none; margin: 20px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--font-body); font-size: 14px; color: rgba(250,247,240,0.85);
}
.location-list strong { color: var(--tan); font-weight: 600; }
.location-actions { margin-top: 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-primary, .btn-ghost {
  font-family: var(--font-label); font-size: 13px; font-weight: 700;
  padding: 12px 22px; border-radius: 999px; text-decoration: none;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease), color 0.2s var(--ease);
}
.btn-primary { background: var(--taupe); color: var(--navy-deep); }
.btn-primary:hover { background: var(--cream); }
.btn-ghost { border: 1.5px solid rgba(250,247,240,0.4); color: var(--cream); }
.btn-ghost:hover { background: rgba(250,247,240,0.12); }
.btn-primary:active, .btn-ghost:active { transform: scale(0.97); }

/* ---------------- Promoción destacada (editable desde /admin) ---------------- */
.promo-section { padding-top: 40px; padding-bottom: 8px; }
.promo-card {
  max-width: 680px; margin: 0 auto;
  background: var(--paper); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-soft);
  border: 1px solid rgba(49,60,76,0.06);
}
.promo-photo { width: 100%; height: 190px; object-fit: cover; }
.promo-info { padding: 22px 24px 26px; text-align: center; }
.promo-title {
  font-family: var(--font-agrandir); font-weight: 700; text-transform: uppercase;
  font-size: clamp(18px, 4vw, 22px); letter-spacing: 0.02em; color: var(--navy);
}
.promo-text { margin-top: 8px; font-size: 14px; color: rgba(44,40,34,0.7); }
.promo-info .btn-primary { display: inline-block; margin-top: 18px; background: var(--sage); color: var(--cream); }
.promo-info .btn-primary:hover { background: var(--sage-deep); }

/* ---------------- Publicación de Instagram elegida ---------------- */
.instagram-section { padding-top: 44px; padding-bottom: 12px; text-align: center; }
.instagram-embed-wrap {
  max-width: 400px; margin: 0 auto;
  display: flex; justify-content: center;
}
/* Instagram inyecta su propio iframe/estilos vía embed.js; esto solo
   evita que el placeholder salte de tamaño antes de que cargue. */
.instagram-embed-wrap blockquote.instagram-media { margin: 0 auto !important; min-width: 260px !important; }
.instagram-follow { display: inline-block; margin-top: 18px; border-color: rgba(49,60,76,0.3); color: var(--navy); }
.instagram-follow:hover { background: rgba(49,60,76,0.06); }

/* ---------------- Footer ---------------- */
.site-footer { padding: 34px 20px 44px; text-align: center; color: rgba(49,60,76,0.6); }
.footer-icon { width: 26px; margin: 0 auto 10px; opacity: 0.5; }
.footer-name { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--navy); letter-spacing: 0.02em; }
.footer-social { margin-top: 8px; }
.footer-social a { color: var(--sage-deep); text-decoration: none; font-family: var(--font-label); font-size: 12.5px; font-weight: 600; }
.footer-copy { margin-top: 14px; font-size: 11px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 640px) {
  .showcase-stage { width: clamp(400px, 38vw, 430px); }
  .hero-logo-full { width: clamp(260px, 40vw, 360px); }
  .promo-card { display: flex; align-items: stretch; text-align: left; }
  .promo-photo { width: 42%; height: auto; }
  .promo-info { flex: 1; text-align: left; display: flex; flex-direction: column; justify-content: center; }
}
@media (min-width: 960px) {
  .hero { padding: 0 40px; }
  .hero-main {
    flex-direction: row; align-items: center; justify-content: space-between;
    max-width: 1320px; margin: 0 auto; gap: 48px;
  }
  .hero-head { flex: 1 1 40%; text-align: left; }
  .hero-kicker, .hero-sub { text-align: left; }
  .hero-features, .hero-actions { justify-content: flex-start; }
  .hero-logo-full { margin: 10px 0 0; width: clamp(260px, 24vw, 380px); }
  .showcase { flex: 1 1 56%; max-height: 640px; }
  .showcase-stage { width: clamp(460px, 32vw, 600px); aspect-ratio: 1 / 1.15; }
}
@media (max-width: 380px) {
  .hero { padding-top: 8px; }
  .showcase-stage { width: 88vw; }
}
@media (prefers-reduced-motion: reduce) {
  .blob-frame { animation: none; }
  .hero-scroll-hint { animation: none; }
}
