/* ============================================
   Veliroz — Premium Boutique Editorial Layer
   ============================================ */

:root {
  --v-primary: #89565f;
  --v-primary-deep: #6d404a;
  --v-primary-soft: #c4929a;
  --v-blush: #dca8b0;
  --v-blush-light: #f2dde0;
  --v-sage: #5b6946;
  --v-sage-light: #d4e0c8;
  --v-surface: #fffbff;
}

/* ===== ATMOSPHERE: Gradient mesh + paper texture (cheap) ===== */
.mesh-bg {
  background:
    radial-gradient(at 18% 22%, rgba(242, 221, 224, 0.55) 0%, transparent 45%),
    radial-gradient(at 82% 78%, rgba(212, 224, 200, 0.4) 0%, transparent 50%),
    #fffbff;
}

/* Paper texture: a single cheap tile on body — no fixed, no blend-mode */
.paper-bg {
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='1' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.54 0 0 0 0 0.34 0 0 0 0 0.37 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #89565f 0%, #c4929a 50%, #dca8b0 100%);
  z-index: 100;
  transition: width 80ms linear;
  pointer-events: none;
}

/* ===== CUSTOM CURSOR (desktop only) ===== */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 9999px;
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 250ms ease, width 220ms, height 220ms;
  display: none;
}
.cursor-dot {
  width: 10px;
  height: 10px;
  background: #89565f;
  box-shadow: 0 0 0 2px rgba(255, 251, 255, 0.9), 0 2px 8px rgba(137, 86, 95, 0.35);
}
.cursor-ring {
  width: 42px;
  height: 42px;
  border: 2px solid #89565f;
  background: rgba(137, 86, 95, 0.06);
}
.cursor-ring.is-hover {
  width: 66px;
  height: 66px;
  border-color: #c4929a;
  background: rgba(196, 146, 154, 0.18);
}
body.cursor-ready .cursor-dot { opacity: 1; }
body.cursor-ready .cursor-ring { opacity: 0.9; }
body.cursor-ready, body.cursor-ready a, body.cursor-ready button {
  cursor: none !important;
}
@media (hover: hover) and (pointer: fine) {
  .cursor-dot, .cursor-ring { display: block; }
}

/* ===== PAGE TRANSITION OVERLAY ===== */
.page-transition {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #89565f 0%, #6d404a 100%);
  z-index: 9998;
  transform: scaleY(0);
  transform-origin: top;
  pointer-events: none;
  transition: transform 500ms cubic-bezier(0.76, 0, 0.24, 1);
}
.page-transition.is-leaving {
  transform: scaleY(1);
  transform-origin: top;
}
.page-transition.is-entering {
  transform: scaleY(0);
  transform-origin: bottom;
}

/* ===== DROP CAP (Nosotros) ===== */
.editorial-article > p:first-of-type::first-letter {
  font-family: 'Noto Serif', serif;
  font-size: 5.2em;
  font-weight: 700;
  font-style: italic;
  float: left;
  line-height: 0.85;
  padding: 0.08em 0.12em 0 0;
  color: #89565f;
}

/* ===== PULL QUOTE ===== */
.pull-quote {
  font-family: 'Noto Serif', serif;
  font-style: italic;
  font-size: 1.65rem;
  line-height: 1.45;
  border-left: 3px solid #89565f;
  padding: 1.25rem 0 1.25rem 2rem;
  margin: 2.5rem 0;
  color: #6d404a;
  max-width: 38rem;
}
@media (min-width: 768px) {
  .pull-quote { font-size: 1.95rem; padding-left: 2.5rem; }
}

/* ===== UNIFORM CATALOG GRID ===== */
/* Cards uniformes — todas mismo tamaño y aspect ratio */

/* ===== HOVER ZOOM (catalog) ===== */
.product-card { position: relative; }
.product-card img { transition: transform 800ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.product-card:hover img { transform: scale(1.08); }

/* ===== QUICK VIEW BUTTON (catalog) ===== */
.quickview-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #89565f;
  box-shadow: 0 4px 12px rgba(109, 64, 74, 0.18);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 300ms, transform 300ms, background 200ms;
  z-index: 5;
  cursor: pointer;
}
.product-card:hover .quickview-btn,
.quickview-btn:focus-visible {
  opacity: 1;
  transform: translateY(0);
}
.quickview-btn:hover {
  background: #89565f;
  color: white;
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(34, 26, 28, 0.92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms ease;
  padding: 2rem;
}
.lightbox-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  transform: scale(0.96);
  transition: transform 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.lightbox-overlay.is-open .lightbox-content {
  transform: scale(1);
}
.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 1rem;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}
.lightbox-meta {
  text-align: center;
  color: #fffbff;
}
.lightbox-meta h3 {
  font-family: 'Noto Serif', serif;
  font-style: italic;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.lightbox-meta p { color: #f2dde0; font-size: 0.95rem; }
.lightbox-btn {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 200ms;
  transform: translateY(-50%);
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  transform: none;
}

/* ===== QUICK VIEW PANEL ===== */
.quickview-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(440px, 100vw);
  background: #fffbff;
  z-index: 10001;
  transform: translateX(100%);
  transition: transform 500ms cubic-bezier(0.76, 0, 0.24, 1);
  box-shadow: -20px 0 60px rgba(109, 64, 74, 0.25);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.quickview-panel.is-open { transform: translateX(0); }
.quickview-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(34, 26, 28, 0.55);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms;
}
.quickview-backdrop.is-open { opacity: 1; pointer-events: auto; }
.quickview-img-wrap {
  width: 100%;
  aspect-ratio: 4/4.4;
  overflow: hidden;
  background: #f7f3ea;
}
.quickview-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.quickview-body { padding: 1.75rem 1.75rem 2.25rem; flex: 1; }
.quickview-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #5b6946;
  background: #e6f7ca;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  margin-bottom: 0.85rem;
}
.quickview-title {
  font-family: 'Noto Serif', serif;
  font-size: 1.85rem;
  color: #39382f;
  margin-bottom: 0.5rem;
  line-height: 1.15;
}
.quickview-price {
  color: #5b6946;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}
.quickview-desc {
  color: #66655a;
  line-height: 1.65;
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
}
.quickview-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  background: #25d366;
  color: white;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 200ms, box-shadow 200ms;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}
.quickview-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(37, 211, 102, 0.38); }
.quickview-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #89565f;
  cursor: pointer;
  z-index: 5;
}

/* ===== MAGNETIC CTA ===== */
.btn-magnetic {
  transition: transform 400ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 300ms;
  will-change: transform;
}

/* ===== REVEAL ===== */
.reveal-up {
  opacity: 0;
  transform: translateY(60px) scale(0.97);
  will-change: opacity, transform;
  transition: opacity 1100ms cubic-bezier(0.16, 1, 0.3, 1), transform 1100ms cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up.is-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ===== KINETIC TEXT ===== */
.kinetic-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(40%);
  will-change: opacity, transform;
}
.kinetic-word.is-revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 700ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 800ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ===== PETALS ===== */
.petal {
  position: fixed;
  top: -40px;
  left: 0;
  width: 18px;
  height: 22px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  will-change: transform, opacity;
}

/* ===== Ensure nav stays above overlays ===== */
nav.fixed { z-index: 50; }

/* ===== REDUCED MOTION GUARDS ===== */
@media (prefers-reduced-motion: reduce) {
  .cursor-dot, .cursor-ring, .petal, .page-transition, .scroll-progress { display: none !important; }
  .reveal-up, .kinetic-word { opacity: 1 !important; transform: none !important; }
  .product-card img { transition: none !important; }
  .product-card:hover img { transform: none !important; }
}

/* ===== Mobile: disable heavy effects ===== */
@media (max-width: 767px) {
  .petal { display: none !important; }
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* ===== Accesibilidad: touch targets ≥44px en íconos de nav (WCAG) ===== */
nav a:has(> .material-symbols-outlined),
nav button:has(> .material-symbols-outlined),
nav a:has(> span.material-symbols-outlined),
nav button:has(> span.material-symbols-outlined) {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* El enlace de cuenta lleva texto+icono: deja crecer el ancho */
nav a[data-auth-user] { min-width: auto; padding: 0 4px; }
