/* ==========================================================
   FASHION MARIEX · Hoja de estilos
   Concepto: denim con costuras ámbar, parches de cuero y tendedero
   ========================================================== */

:root {
  --denim: #1e3b6f;        /* tela */
  --indigo: #13264d;       /* denim oscuro */
  --lavado: #e8edf5;       /* denim blanqueado */
  --hilo: #f4a62a;         /* hilo de costura (ámbar) */
  --cuero: #a9753f;        /* parche de cuero */
  --tinta: #0d1730;        /* texto sobre claro */
  --suave: #a9bddb;        /* texto secundario sobre denim */
  --fuente: "Bricolage Grotesque", "Arial Narrow", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--fuente);
  font-size: 1.02rem;
  line-height: 1.55;
  color: #fff;
  background-color: var(--denim);
  /* sarga del denim: diagonales finas */
  background-image:
    repeating-linear-gradient(135deg, rgba(255,255,255,.045) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(135deg, rgba(0,0,0,.07) 0 2px, transparent 2px 8px);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
:focus-visible { outline: 3px solid var(--hilo); outline-offset: 3px; }

.contenedor { width: min(1240px, 100% - 2.4rem); margin-inline: auto; }

/* Titulares: la misma tipografía, en su versión condensada y pesada */
h1, h2, h3, .marca span {
  font-weight: 800;
  font-variation-settings: "wdth" 75;
  letter-spacing: -.02em;
  line-height: .95;
}
h2 { font-size: clamp(2.6rem, 6vw, 4.8rem); }

/* ---------- Encabezado ---------- */
.cabecera {
  position: sticky; top: 0; z-index: 50;
  background: rgba(19, 38, 77, .94);
  backdrop-filter: blur(8px);
  border-bottom: 2px dashed var(--hilo);
}
.fila { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .6rem 0; }
.marca { display: flex; align-items: center; gap: .75rem; }
.marca img { width: 54px; height: 54px; border-radius: 50%; }
.marca span { font-size: 1.7rem; line-height: .9; }
.menu { display: flex; gap: .3rem 1.8rem; flex-wrap: wrap; }
.menu a { padding: .25rem 0; font-weight: 600; border-bottom: 2px dashed transparent; transition: border-color .2s, color .2s; }
.menu a:hover, .menu a.activo { border-color: var(--hilo); color: var(--hilo); }

/* ---------- Botones ---------- */
.btn {
  display: inline-block; padding: .85rem 1.7rem; border-radius: 6px;
  font: inherit; font-weight: 700; border: 2px dashed var(--hilo);
  cursor: pointer; transition: transform .2s, background .2s, color .2s;
}
.btn-hilo { background: var(--hilo); color: var(--tinta); border-style: solid; }
.btn-hilo:hover { transform: translateY(-3px); background: #ffbc4d; }
.btn-borde { color: #fff; }
.btn-borde:hover { background: var(--hilo); color: var(--tinta); transform: translateY(-3px); }
.btn-tinta { background: var(--tinta); color: var(--hilo); border: 2px solid var(--tinta); }
.btn-tinta:hover { transform: translateY(-3px); background: var(--indigo); }

/* ---------- Portada con tendedero ---------- */
.portada { padding: 3rem 0 4rem; overflow: hidden; }
.portada-cab { display: grid; grid-template-columns: auto minmax(260px, 1fr); justify-items: end; gap: 2rem; align-items: end; }
.portada h1 { font-size: clamp(5rem, 15vw, 13.5rem); line-height: .8; }
.portada-txt p { color: var(--suave); font-size: 1.15rem; max-width: 30ch; margin-bottom: 1.6rem; }
.botones { display: flex; gap: .9rem; flex-wrap: wrap; }

.tendedero { position: relative; display: flex; justify-content: space-between; margin-top: 2.2rem; }
.cuerda { position: absolute; left: -2%; top: 0; width: 104%; height: 70px; overflow: visible; }
.cuerda path { fill: none; stroke: var(--hilo); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.colgado {
  position: relative; width: 23.5%; margin-top: calc(var(--y) + 4px);
  transform-origin: 50% 0;
  rotate: calc(var(--tilt, 0) * 1deg);      /* lo mueve el cursor (cursor.js) */
  transition: rotate .7s ease-out;
}
.balanceo { transform-origin: 50% 0; animation: balanceo 5.5s ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
.colgado img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; border: 5px solid var(--lavado); box-shadow: 0 18px 30px rgba(5,12,30,.45); }
.pinza {
  position: absolute; z-index: 2; left: 50%; top: -22px; width: 18px; height: 46px; translate: -50% 0;
  background: linear-gradient(90deg, var(--lavado) 0 44%, #b9c5da 44% 56%, var(--lavado) 56%);
  border-radius: 4px 4px 7px 7px; box-shadow: 0 2px 4px rgba(0,0,0,.4);
}
@keyframes balanceo {
  from { transform: rotate(calc(var(--r, 0deg) - 1.8deg)); }
  to   { transform: rotate(calc(var(--r, 0deg) + 1.8deg)); }
}

/* ---------- Secciones ---------- */
.seccion { padding: 5.5rem 0; }
.seccion-oscura { background-color: var(--indigo); }
.seccion-clara { background: var(--lavado); color: var(--tinta); background-image: none; }
.encabezado { margin-bottom: 2.8rem; max-width: 640px; }
.encabezado p { color: var(--suave); margin-top: 1rem; font-size: 1.1rem; }
.seccion-clara .encabezado p { color: #3d4c6b; }

/* Pasillos: lista tipográfica */
.pasillos li { position: relative; border-top: 2px dashed rgba(244,166,42,.6); }
.pasillos li:last-child { border-bottom: 2px dashed rgba(244,166,42,.6); }
.pasillos a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 1.2rem .4rem; transition: background .25s, padding .25s;
}
.pasillos .nombre { font-size: clamp(3.6rem, 12vw, 9.5rem); font-weight: 800; font-variation-settings: "wdth" 75; letter-spacing: -.03em; line-height: .9; }
.pasillos .detalle { color: var(--suave); text-align: right; font-size: 1.05rem; }
.pasillos a:hover { background: var(--hilo); color: var(--tinta); padding-inline: 1.6rem; }
.pasillos a:hover .detalle { color: var(--tinta); }
.pasillos img {
  position: absolute; z-index: 5; right: 24%; top: 50%; width: 170px; aspect-ratio: 2 / 3; object-fit: cover;
  border: 5px solid var(--lavado); border-radius: 4px; pointer-events: none;
  opacity: 0; translate: 0 -50%; rotate: 0deg; scale: .6; transition: opacity .25s, scale .3s, rotate .3s;
}
.pasillos a:hover img { opacity: 1; scale: 1; rotate: 6deg; }

/* ---------- Tarjetas de producto ---------- */
.productos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3.2rem 1.7rem; }
.card { display: flex; flex-direction: column; }
.foto {
  position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 6px;
  outline: 2px dashed var(--hilo); outline-offset: 5px; background: var(--indigo);
}
.foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card:hover .foto img { transform: scale(1.05); }
.sello {
  position: absolute; z-index: 2; top: .7rem; left: .7rem; padding: .25rem .75rem; border-radius: 99px;
  background: var(--lavado); color: var(--tinta); font-size: .82rem; font-weight: 700;
}
/* Parche de cuero, como el de la cintura de un jean */
.parche {
  position: relative; z-index: 2; width: 86%; margin: -2.4rem auto 0; padding: .95rem 1.1rem 1rem;
  color: #2a1a0b; border-radius: 10px;
  background: linear-gradient(160deg, #b98650, #9a6a38);
  box-shadow: 0 10px 18px rgba(5,12,30,.4);
  transition: transform .3s;
}
.parche::after { content: ""; position: absolute; inset: 5px; border: 1.5px dashed rgba(42,26,11,.55); border-radius: 6px; pointer-events: none; }
.card:hover .parche { transform: translateY(-6px) rotate(-1deg); }
.parche small { font-size: .82rem; font-weight: 600; opacity: .8; }
.parche h3 { font-size: 1.5rem; line-height: .95; margin: .15rem 0 .35rem; text-shadow: 0 1px 0 rgba(255,255,255,.22); }
.parche p { font-size: .86rem; line-height: 1.35; margin-bottom: .6rem; }
.parche div { display: flex; align-items: baseline; justify-content: space-between; }
.precio { font-size: 1.6rem; font-weight: 800; font-variation-settings: "wdth" 75; }
.parche div a { font-weight: 700; font-size: .92rem; border-bottom: 2px solid #2a1a0b; }
.parche div a:hover { background: #2a1a0b; color: #f4d9b1; }

/* Etiquetas de cuidado */
.etiquetas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.etiqueta {
  background: #fff; padding: 1.6rem 1.3rem; border-radius: 4px;
  outline: 2px dashed var(--denim); outline-offset: -8px;
  box-shadow: 0 8px 18px rgba(13,23,48,.14);
}
.etiqueta:nth-child(odd) { rotate: -1.2deg; }
.etiqueta:nth-child(even) { rotate: 1deg; }
.etiqueta h3 { font-size: 1.7rem; margin-bottom: .5rem; }
.etiqueta p { color: #3d4c6b; font-size: .95rem; }

/* Llamado final */
.llamado { background: var(--hilo); color: var(--tinta); text-align: center; padding: 5rem 1.2rem; }
.llamado h2 { font-size: clamp(3rem, 8vw, 6.5rem); margin-bottom: 1rem; }
.llamado p { font-size: 1.15rem; margin-bottom: 1.8rem; }

/* ---------- Páginas interiores ---------- */
.titulo-pagina { padding: 3.5rem 0 1.5rem; }
.titulo-pagina h1 { font-size: clamp(4.5rem, 13vw, 10rem); line-height: .82; }
.titulo-pagina p { color: var(--suave); margin-top: 1.2rem; max-width: 46ch; font-size: 1.1rem; }

.filtro-radio { position: absolute; opacity: 0; pointer-events: none; }
.filtros { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.5rem 0 3rem; }
.filtros label {
  padding: .5rem 1.4rem; border: 2px dashed var(--hilo); border-radius: 99px; font-weight: 700;
  transition: background .2s, color .2s;
}
.filtros label:hover { background: rgba(244,166,42,.2); }
#f-todo:checked ~ .filtros label[for="f-todo"],
#f-hombre:checked ~ .filtros label[for="f-hombre"],
#f-mujer:checked ~ .filtros label[for="f-mujer"],
#f-unisex:checked ~ .filtros label[for="f-unisex"] { background: var(--hilo); color: var(--tinta); border-style: solid; }
#f-hombre:checked ~ .productos .card:not([data-cat~="hombre"]),
#f-mujer:checked ~ .productos .card:not([data-cat~="mujer"]),
#f-unisex:checked ~ .productos .card:not([data-cat~="unisex"]) { display: none; }
.filtro-radio:focus-visible ~ .filtros { outline: 3px solid var(--hilo); outline-offset: 6px; }

/* Visor de imagen (solo CSS, con :target) */
.visor { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 1rem; background: rgba(8,16,38,.94); }
.visor:target { display: grid; animation: aparecer .3s; }
.visor .cerrar-fondo { position: absolute; inset: 0; }
.visor img { position: relative; z-index: 2; max-height: 92vh; width: auto; border: 6px solid var(--lavado); border-radius: 6px; }
.visor .cerrar { position: absolute; z-index: 3; top: .8rem; right: 1.4rem; font-size: 3rem; line-height: 1; color: var(--hilo); }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Contacto ---------- */
.contacto-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 4rem; align-items: start; }
.contacto-grid h2 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 1.8rem; }
.pasos { counter-reset: paso; display: grid; gap: 1.6rem; }
.pasos li { counter-increment: paso; position: relative; padding-left: 4.2rem; }
.pasos li::before {
  content: counter(paso); position: absolute; left: 0; top: -.2rem; width: 2.9rem; height: 2.9rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; color: var(--tinta);
  background: radial-gradient(circle at 35% 30%, #ffd58a, var(--hilo) 55%, #b9741a);
}
.pasos strong { display: block; font-size: 1.35rem; font-variation-settings: "wdth" 75; }
.pasos span { color: var(--suave); }
.horario { margin-top: 2.2rem; padding: 1.1rem 1.3rem; border: 2px dashed var(--hilo); border-radius: 8px; }

form {
  background: var(--lavado); color: var(--tinta); padding: 2.2rem; border-radius: 8px;
  outline: 2px dashed var(--denim); outline-offset: -10px; display: grid; gap: 1.2rem;
}
form h2 { font-size: 2.4rem; margin: 0; }
form label { display: grid; gap: .35rem; font-weight: 700; }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; padding: .75rem .9rem; background: #fff; color: var(--tinta);
  border: 1.5px solid #9fb2d2; border-radius: 6px; font: inherit; font-weight: 400;
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--hilo); border-color: var(--tinta); }
textarea { min-height: 120px; resize: vertical; }

/* ---------- Pie de página ---------- */
.pie { background: var(--indigo); border-top: 2px dashed var(--hilo); padding: 3.5rem 0 1.6rem; }
.pie-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.pie img { width: 84px; border-radius: 50%; margin-bottom: .9rem; }
.pie h4 { font-size: 1.3rem; font-weight: 800; font-variation-settings: "wdth" 75; margin-bottom: .6rem; }
.pie p, .pie li { color: var(--suave); }
.pie li { margin-bottom: .3rem; }
.pie a:hover { color: var(--hilo); }
.derechos { margin-top: 2.4rem; padding-top: 1.2rem; border-top: 1px solid rgba(169,189,219,.3); font-size: .9rem; color: var(--suave); }

/* ==========================================================
   EFECTOS DE CURSOR (los crea js/cursor.js)
   ========================================================== */
html.cursor-on, html.cursor-on * { cursor: none !important; }

.hilo-lienzo { position: fixed; inset: 0; z-index: 9996; pointer-events: none; }

.rivete {
  position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none;
  width: 34px; height: 34px; translate: -50% -50%;
  display: grid; place-items: center; border-radius: 99px;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.45));
  transition: width .25s, height .25s, background .25s, opacity .2s;
}
.rivete svg { width: 100%; height: 100%; transition: scale .2s; }
.rivete span { display: none; font-size: .85rem; font-weight: 800; color: var(--tinta); white-space: nowrap; }
.rivete.sobre-enlace svg { scale: 1.5; }
.rivete.con-texto { width: auto; min-width: 70px; height: 38px; padding: 0 16px; background: var(--hilo); }
.rivete.con-texto svg { display: none; }
.rivete.con-texto span { display: block; }
.rivete.presionado svg { scale: .75; }
.rivete.oculto { opacity: 0; }

/* Puntadas que salen al hacer clic */
.puntada {
  position: fixed; z-index: 9997; pointer-events: none; width: 12px; height: 3px; border-radius: 2px; background: var(--hilo);
  animation: puntada .6s ease-out forwards;
}
@keyframes puntada {
  from { opacity: 1; transform: translate(-50%, -50%) rotate(var(--a)) translateX(8px); }
  to   { opacity: 0; transform: translate(-50%, -50%) rotate(var(--a)) translateX(60px); }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1000px) {
  .productos { grid-template-columns: repeat(2, 1fr); }
  .etiquetas { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .portada-cab, .contacto-grid, .pie-grid { grid-template-columns: 1fr; }
  .portada h1 { font-size: clamp(5rem, 24vw, 9rem); }
  .tendedero { justify-content: space-around; }
  .colgado { width: 46%; --y: 29px !important; }
  .colgado:nth-child(n+4) { display: none; }          /* 1 cuerda + 2 prendas */
  .colgado:nth-child(n+5) { display: none; }
  .pasillos img { right: 4%; width: 90px; opacity: 1; scale: 1; rotate: 5deg; }
  .pasillos .detalle { display: none; }
  .fila { justify-content: center; }
}
@media (max-width: 520px) {
  .productos, .etiquetas { grid-template-columns: 1fr; }
  .seccion { padding: 3.8rem 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
