/* ============================================================
   MARIMAR v3 — capa de refinamiento
   Ajustada a la estética blanca/pastel/lápiz: sin bloques oscuros,
   sin textura de grano — todo queda limpio, claro y liviano.
   Pensada también para funcionar bien empaquetada como APK (WebView).
   ============================================================ */

html, body { overscroll-behavior: none; }

button, a, .icon-btn, .filter-chip, .add-btn, .btn {
  -webkit-tap-highlight-color: transparent;
}

.site-header, .site-footer, .btn, .icon-btn, .filter-chip, .add-btn, .nav-links {
  -webkit-user-select: none;
  user-select: none;
}

/* ============================================================
   TRANSICIÓN ENTRE PÁGINAS
   ============================================================ */

body { animation: page-in 0.35s ease both; }
body.leaving { animation: page-out 0.2s ease both; }

@keyframes page-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes page-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-6px); }
}

/* ============================================================
   REVEAL AL SCROLLEAR
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { transition-delay: calc(var(--i, 0) * 60ms); }

/* ============================================================
   RIPPLE en botones
   ============================================================ */

.btn, .icon-btn, .filter-chip, .add-btn, .qty-btn {
  position: relative;
  overflow: hidden;
}
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(55,52,47,0.12);
  transform: scale(0);
  animation: ripple-anim 0.5s ease-out;
  pointer-events: none;
}
.btn-primary .ripple, .btn-coral .ripple, .btn-mp .ripple, .btn-whatsapp .ripple {
  background: rgba(255,255,255,0.45);
}
@keyframes ripple-anim {
  to { transform: scale(2.6); opacity: 0; }
}

/* ============================================================
   IMAGEN DE PRODUCTO — leve zoom en hover
   ============================================================ */

.product-media { cursor: pointer; }
.product-media .ph-swatch,
.product-media img {
  transition: transform 0.45s ease;
}
.product-card:hover .product-media .ph-swatch,
.product-card:hover .product-media img {
  transform: scale(1.06);
}
.product-media::after {
  content: "Ver más";
  position: absolute;
  inset: auto 0 0 0;
  text-align: center;
  padding: 8px 0 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(to top, rgba(0,0,0,0.28), transparent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.product-card:hover .product-media::after { opacity: 1; transform: translateY(0); }

/* ============================================================
   MODAL DE VISTA RÁPIDA
   ============================================================ */

.qv-overlay {
  position: fixed;
  inset: 0;
  background: rgba(55, 52, 47, 0.35);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.qv-overlay.open { opacity: 1; pointer-events: auto; }

.qv-modal {
  background: var(--paper);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 0 0 26px;
  transform: translateY(30px);
  transition: transform 0.3s ease;
  position: relative;
}
.qv-overlay.open .qv-modal { transform: translateY(0); }

@media (min-width: 700px) {
  .qv-overlay { align-items: center; }
  .qv-modal { border-radius: var(--radius-lg); }
}

.qv-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.qv-close svg { width: 16px; height: 16px; }

.qv-media {
  aspect-ratio: 16/10;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  position: relative;
}
.qv-body { padding: 22px 26px 0; }
.qv-body .product-rubro-label { display:block; margin-bottom: 6px; }
.qv-body h3 { font-size: 1.35rem; }
.qv-price-row { display:flex; align-items:baseline; gap:10px; margin: 10px 0 4px; }
.qv-price-row .price { font-size: 1.45rem; }
.qv-qty { display:flex; align-items:center; gap: 12px; margin: 18px 0; }
.qv-qty .qty-control { margin-top:0; }
.qv-actions { display:flex; gap: 12px; }

/* ============================================================
   TOASTS
   ============================================================ */

.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 300;
  width: min(92vw, 380px);
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: var(--cream);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  transform: translateY(10px);
  animation: toast-in 0.3s ease forwards, toast-out 0.3s ease forwards 2.4s;
}
.toast svg { width: 18px; height: 18px; color: var(--mint-deep); flex-shrink: 0; }
@keyframes toast-in { to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

body.has-mobile-bar .toast-stack { bottom: 96px; }

/* ============================================================
   BARRA DE CARRITO FLOTANTE (mobile)
   ============================================================ */

.mobile-cart-bar {
  position: fixed;
  left: 14px; right: 14px; bottom: 14px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  padding: 10px 10px 10px 22px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  z-index: 150;
  box-shadow: var(--shadow-lift);
  transform: translateY(120%);
  transition: transform 0.3s ease;
}
.mobile-cart-bar.visible { transform: translateY(0); }
.mobile-cart-bar .mcb-info { font-size: 0.85rem; line-height: 1.2; }
.mobile-cart-bar .mcb-info strong { display:block; font-family: var(--font-display); font-size: 1rem; }
.mobile-cart-bar .btn {
  border-color: var(--cream);
  color: var(--ink);
  background: var(--mustard);
  padding: 10px 20px;
  font-size: 0.85rem;
}
@media (min-width: 861px) { .mobile-cart-bar { display: none !important; } }

/* ============================================================
   CRÉDITO DE ESTUDIO
   ============================================================ */

.studio-credit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.studio-credit a {
  font-weight: 700;
  color: var(--coral-deep);
}
.studio-credit a:hover { color: var(--ink); }
