/* ══════════════════════════════════════════════════════
   JABONES.CSS — Colección de Jabones Artesanales
   O-Vié · Mayo 2026
   CSS exclusivo de jabones.php
   Todo prefijado con j- para evitar conflictos globales
══════════════════════════════════════════════════════ */

/* ── Reset de elementos del homepage que no aplican aquí ── */
#bubbles        { display: none !important; }

/* ── Z-index: asegurar que header y footer sean visibles ── */
#header         { z-index: 500 !important; }
#cintillo       { z-index: 501 !important; }
#search-bar     { z-index: 499 !important; }
#footer-block   { position: relative; z-index: 10; }

/* ── Base de página ── */
body { background: #080808; }

/* ── Variables de paleta por categoría ── */
:root {
  --c-champagne:      #C9A870;
  --c-champagne-glow: rgba(201, 168, 112, 0.5);
  --c-jade:           #5CA88A;
  --c-jade-glow:      rgba(92, 168, 138, 0.5);
  --c-ivory:          #4A8FE0;
  --c-ivory-glow:     rgba(74, 143, 224, 0.5);
  --c-blush:          #C8959A;
  --c-blush-glow:     rgba(200, 149, 154, 0.5);
}

/* ══════════════════════════════════════
   BOTÓN DE REGRESO AL INICIO
══════════════════════════════════════ */

.j-back {
  position: fixed;
  top: 54px;
  left: 32px;
  z-index: 502;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.3s ease, gap 0.3s ease;
}

.j-back:hover {
  color: rgba(255,255,255,0.92);
  gap: 15px;
}

.j-back-arrow {
  font-size: 14px;
  line-height: 1;
  transition: transform 0.3s ease;
}

.j-back:hover .j-back-arrow {
  transform: translateX(-4px);
}

.j-back-line {
  width: 20px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
  transition: width 0.3s ease;
}

.j-back:hover .j-back-line { width: 34px; }

/* ══════════════════════════════════════
   BLOQUE 1 — HERO
══════════════════════════════════════ */

.j-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  z-index: 1;
}

/* Fallback gradient (siempre visible debajo del video) */
.j-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(145deg,
    #1c1508 0%,
    #0f0f0f 40%,
    #0c130d 70%,
    #080808 100%
  );
}

.j-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.j-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(to top,
      rgba(0,0,0,0.88) 0%,
      rgba(0,0,0,0.35) 45%,
      rgba(0,0,0,0.12) 100%
    ),
    linear-gradient(to right,
      rgba(0,0,0,0.55) 0%,
      rgba(0,0,0,0.1) 55%,
      transparent 100%
    );
}

.j-hero-content {
  position: relative;
  z-index: 3;
  padding: 0 80px 90px;
  max-width: 680px;
}

.j-hero-eyebrow {
  display: block;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.42em;
  color: rgba(255,255,255,0.38);
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0;
  animation: jFadeUp 0.9s ease forwards 0.3s;
}

.j-hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(70px, 10.5vw, 148px);
  line-height: 0.88;
  color: #fff;
  margin: 0 0 6px;
  letter-spacing: 0.025em;
  font-weight: 400;
  opacity: 0;
  animation: jFadeUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.45s;
}

.j-hero-title-em {
  display: block;
  color: var(--c-champagne);
  font-size: 0.62em;
  letter-spacing: 0.08em;
}

.j-hero-sub {
  font-family: 'Ballet', cursive;
  font-size: clamp(17px, 2.2vw, 26px);
  color: rgba(255,255,255,0.5);
  margin: 22px 0 52px;
  font-weight: 400;
  opacity: 0;
  animation: jFadeUp 0.9s ease forwards 0.75s;
}

.j-hero-scroll {
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
  text-decoration: none;
  animation: jFadeUp 0.8s ease forwards 1.1s;
}

.j-hero-scroll-line {
  width: 36px;
  height: 1px;
  background: rgba(255,255,255,0.22);
  animation: jLinePulse 2.4s ease-in-out infinite 1.5s;
}

.j-hero-scroll-text {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.38em;
  color: rgba(255,255,255,0.28);
  text-transform: uppercase;
}

/* ══════════════════════════════════════
   BLOQUE 2 — CATEGORÍAS
══════════════════════════════════════ */

.j-categories {
  position: relative;
  padding: 90px 0 80px;
  overflow: hidden;
}

/* Canvas WebGL océano — position:fixed, detrás de todo */
#j-ocean {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
}

/* Header de sección */
.j-cats-header {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 55px;
  padding: 0 60px;
}

.j-cats-eyebrow {
  display: block;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 9.5px;
  font-weight: 300;
  letter-spacing: 0.45em;
  color: rgba(255,255,255,0.25);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.j-cats-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(34px, 4.5vw, 60px);
  color: #fff;
  letter-spacing: 0.05em;
  margin: 0 0 16px;
  font-weight: 400;
}

.j-cats-divider {
  width: 40px;
  height: 1px;
  background: linear-gradient(to right,
    transparent,
    rgba(201,168,112,0.5),
    transparent
  );
  margin: 0 auto;
}

/* ══════════════════════════════════════
   GRID DE TARJETAS
══════════════════════════════════════ */

.j-cards-wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  max-width: 100%;
  width: 100%;
  margin: 0;
}

/* ── Tarjeta base ── */
.j-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1.85;
  background: #0d0d0d;
  animation: jCardFloat 7s ease-in-out infinite;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.j-card:nth-child(1) { animation-delay:  0s;   }
.j-card:nth-child(2) { animation-delay: -2.2s; }
.j-card:nth-child(3) { animation-delay: -4.5s; }
.j-card:nth-child(4) { animation-delay: -1.1s; }

/* Borde + glow por categoría */
.j-card[data-color="champagne"] {
  border: 1px solid rgba(201,168,112,0.28);
  box-shadow: 0 0 28px rgba(201,168,112,0.08), 0 22px 55px rgba(0,0,0,0.65), inset 0 1px 0 rgba(201,168,112,0.12);
}
.j-card[data-color="champagne"]:hover {
  border-color: rgba(201,168,112,0.65);
  box-shadow: 0 0 55px rgba(201,168,112,0.28), 0 0 110px rgba(201,168,112,0.12), 0 30px 70px rgba(0,0,0,0.7), inset 0 1px 0 rgba(201,168,112,0.22);
}

.j-card[data-color="jade"] {
  border: 1px solid rgba(92,168,138,0.28);
  box-shadow: 0 0 28px rgba(92,168,138,0.08), 0 22px 55px rgba(0,0,0,0.65), inset 0 1px 0 rgba(92,168,138,0.12);
}
.j-card[data-color="jade"]:hover {
  border-color: rgba(92,168,138,0.65);
  box-shadow: 0 0 55px rgba(92,168,138,0.28), 0 0 110px rgba(92,168,138,0.12), 0 30px 70px rgba(0,0,0,0.7), inset 0 1px 0 rgba(92,168,138,0.22);
}

.j-card[data-color="ivory"] {
  border: 1px solid rgba(74,143,224,0.28);
  box-shadow: 0 0 28px rgba(74,143,224,0.08), 0 22px 55px rgba(0,0,0,0.65), inset 0 1px 0 rgba(74,143,224,0.12);
}
.j-card[data-color="ivory"]:hover {
  border-color: rgba(74,143,224,0.65);
  box-shadow: 0 0 55px rgba(74,143,224,0.28), 0 0 110px rgba(74,143,224,0.12), 0 30px 70px rgba(0,0,0,0.7), inset 0 1px 0 rgba(74,143,224,0.22);
}

.j-card[data-color="blush"] {
  border: 1px solid rgba(200,149,154,0.28);
  box-shadow: 0 0 28px rgba(200,149,154,0.08), 0 22px 55px rgba(0,0,0,0.65), inset 0 1px 0 rgba(200,149,154,0.12);
}
.j-card[data-color="blush"]:hover {
  border-color: rgba(200,149,154,0.65);
  box-shadow: 0 0 55px rgba(200,149,154,0.28), 0 0 110px rgba(200,149,154,0.12), 0 30px 70px rgba(0,0,0,0.7), inset 0 1px 0 rgba(200,149,154,0.22);
}

/* Fondo satín de color por categoría */
.j-card-base {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.j-card[data-color="champagne"] .j-card-base {
  background: linear-gradient(148deg, #2e2208 0%, #1c1508 35%, #100e09 65%, #1a1408 100%);
}
.j-card[data-color="jade"] .j-card-base {
  background: linear-gradient(148deg, #0d2218 0%, #091810 35%, #060f09 65%, #0c1e14 100%);
}
.j-card[data-color="ivory"] .j-card-base {
  background: linear-gradient(148deg, #060f22 0%, #030a18 35%, #010408 65%, #050d1f 100%);
}
.j-card[data-color="blush"] .j-card-base {
  background: linear-gradient(148deg, #22100f 0%, #160a09 35%, #0f0607 65%, #1c0e0d 100%);
}

/* Sheen satín animado */
.j-card-sheen {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    118deg,
    transparent             0%,
    rgba(255,255,255,0.02)  28%,
    rgba(255,255,255,0.055) 50%,
    rgba(255,255,255,0.02)  68%,
    transparent             100%
  );
  animation: jSheenSlide 5s ease-in-out infinite;
}
.j-card:nth-child(2) .j-card-sheen { animation-delay: -1.2s; }
.j-card:nth-child(3) .j-card-sheen { animation-delay: -2.5s; }
.j-card:nth-child(4) .j-card-sheen { animation-delay: -3.8s; }

/* Video de la tarjeta */
.j-card-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.j-card-video.playing { opacity: 1; }

/* Overlay gradiente */
.j-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.88) 0%,
    rgba(0,0,0,0.45) 42%,
    rgba(0,0,0,0.08) 100%
  );
  transition: background 0.45s ease;
}
.j-card:hover .j-card-overlay {
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.75) 0%,
    rgba(0,0,0,0.22) 48%,
    transparent      100%
  );
}

/* Contenido de la tarjeta */
.j-card-content {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 26px;
}

.j-card-num {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.38em;
  color: rgba(255,255,255,0.28);
  text-transform: uppercase;
}

.j-card-spacer { flex: 1; }

.j-card-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1;
  margin: 0 0 5px;
  color: #fff;
  letter-spacing: 0.04em;
  font-weight: 400;
  transition: color 0.35s ease;
}

.j-card[data-color="champagne"]:hover .j-card-title { color: var(--c-champagne); }
.j-card[data-color="jade"]:hover      .j-card-title { color: var(--c-jade);      }
.j-card[data-color="ivory"]:hover     .j-card-title { color: var(--c-ivory);     }
.j-card[data-color="blush"]:hover     .j-card-title { color: var(--c-blush);     }

.j-card-sub {
  font-family: 'Ballet', cursive;
  font-size: 12.5px;
  color: rgba(255,255,255,0.38);
  margin: 0 0 14px;
  line-height: 1;
}

.j-card-count {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.25);
  text-transform: uppercase;
  margin-bottom: 18px;
  display: block;
}

/* CTA con línea extensible */
.j-card-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  transition: color 0.35s ease, gap 0.35s ease;
}
.j-card:hover .j-card-cta {
  color: rgba(255,255,255,0.85);
  gap: 18px;
}

.j-card-cta-line {
  width: 22px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
  transition: width 0.35s ease;
}
.j-card:hover .j-card-cta-line { width: 38px; }



/* ══════════════════════════════════════
   GRAIN SUTIL DE PÁGINA
══════════════════════════════════════ */

.j-grain {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 300px 300px;
}

/* ══════════════════════════════════════
   KEYFRAMES
══════════════════════════════════════ */

@keyframes jFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes jLinePulse {
  0%,  100% { width: 36px; opacity: 0.4; }
  50%        { width: 58px; opacity: 1;   }
}

@keyframes jCardFloat {
  0%,  100% { transform: translateY(0px)   rotate(0deg);     }
  25%        { transform: translateY(-9px)  rotate(0.25deg);  }
  50%        { transform: translateY(-16px) rotate(0deg);     }
  75%        { transform: translateY(-7px)  rotate(-0.25deg); }
}

@keyframes jSheenSlide {
  0%,  100% { transform: translateX(-30%) skewX(-10deg); opacity: 0.4; }
  50%        { transform: translateX(30%)  skewX(-10deg); opacity: 1;   }
}

/* ══════════════════════════════════════
   RESPONSIVE — Mobile
══════════════════════════════════════ */

@media (max-width: 980px) {
  .j-cards-wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
  }
  .j-card { aspect-ratio: 3 / 4.2; }
}

@media (max-width: 768px) {
  .j-back { top: 46px; left: 18px; }
  .j-hero-content { padding: 0 28px 65px; }
  .j-categories { padding: 70px 0 60px; }
  .j-cats-header { padding: 0 20px; margin-bottom: 40px; }
  .j-cards-wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
  }
  .j-card { aspect-ratio: 3 / 4; border-radius: 8px; }
}

@media (max-width: 480px) {
  .j-hero-content { padding: 0 22px 55px; }
  .j-cats-title { font-size: 28px; }
}

/* ══════════════════════════════════════
   FIX — LINK INICIO EN HERO
   Evita color violeta/subrayado de link visitado
══════════════════════════════════════ */
.j-hero-scroll,
.j-hero-scroll:link,
.j-hero-scroll:visited,
.j-hero-scroll:hover,
.j-hero-scroll:active,
.j-hero-scroll:focus {
  color: rgba(255,255,255,0.28) !important;
  text-decoration: none !important;
  outline: none;
}

.j-hero-scroll * {
  text-decoration: none !important;
}

.j-hero-scroll-text {
  color: inherit !important;
  text-decoration: none !important;
}

/* ══════════════════════════════════════════════════════
   LIQUID VEIL — Transición luxury de salida
   Velo negro/azul oscuro sube desde el fondo con un
   borde superior curvo y orgánico. Logo O-Vié centrado.
══════════════════════════════════════════════════════ */

/* Cuerpo del velo — se crea via JS en jabones.js */
#ovie-veil {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 115vh;
  z-index: 9999;
  pointer-events: none;
  overflow: visible;
  will-change: transform;
  background:
    radial-gradient(ellipse at 50% 52%, rgba(22,55,115,0.52) 0%, rgba(2,9,24,0.82) 40%, rgba(1,4,12,0.98) 78%),
    linear-gradient(to bottom, rgba(3,10,26,0.92), #000);
}

/* Lip curvo — borde orgánico que lidera el ascenso */
.ovie-veil-lip {
  position: absolute;
  top: -52px;
  left: -6%;
  width: 112%;
  height: 106px;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: rgba(3,10,26,0.97);
  box-shadow: 0 -6px 38px rgba(22,55,115,0.16);
}

/* Logo + líneas — posición fija centrada en viewport */
.ovie-veil-center {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  z-index: 10000;
  pointer-events: none;
}

.ovie-veil-line {
  width: 132px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,168,112,0.82), transparent);
  transform: scaleX(0);
  opacity: 0;
  box-shadow: 0 0 16px rgba(201,168,112,0.20);
}

.ovie-veil-logo {
  width: auto;
  height: clamp(42px, 5.4vw, 66px);
  opacity: 0;
}

@media (max-width: 640px) {
  .ovie-veil-center { gap: 18px; }
  .ovie-veil-line   { width: 104px; }
  .ovie-veil-logo   { height: 42px; }
}
