/* =========================================================
   Fer Store BC · Base
   Colores, letras y piezas que comparten la tienda y el panel.
   ========================================================= */

:root {
  /* Paleta tomada de la portada */
  --noche: #0a0608;
  --noche-2: #130a0f;
  --noche-3: #1c1016;
  --noche-4: #27161f;
  --ciruela: #31121d;
  --linea: rgba(255, 150, 200, .14);
  --linea-fuerte: rgba(255, 150, 200, .3);

  --neon: #ff5aa5;
  --neon-claro: #ffb3d6;
  --rosa: #fbb0cc;
  --rosa-medio: #f98fbd;
  --rosa-fuerte: #e1769a;
  --rosa-hondo: #c94a7c;
  --petalo: #fde4ee;
  --crema: #fef7ef;

  --texto: #fbeef4;
  --texto-suave: #c9abb9;
  --texto-tenue: #95798a;
  --tinta: #1a0f14;
  --tinta-suave: #6b5260;

  --ok: #8be3b9;
  --aviso: #ffd27a;
  --error: #ff8a9a;

  --f-script: 'Caveat', 'Segoe Print', cursive;
  --f-brush: 'Kaushan Script', 'Caveat', cursive;
  --f-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --f-body: 'Jost', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --r-lg: 28px;
  --r: 20px;
  --r-sm: 14px;
  --r-xs: 10px;

  --glow: 0 0 5px rgba(255, 90, 165, .9), 0 0 16px rgba(255, 90, 165, .55), 0 0 38px rgba(255, 90, 165, .3);
  --glow-sm: 0 0 4px rgba(255, 90, 165, .75), 0 0 12px rgba(255, 90, 165, .38);
  --glow-text: 0 0 2px rgba(255, 200, 225, .9), 0 0 10px rgba(255, 90, 165, .85), 0 0 28px rgba(255, 90, 165, .5);
  --sombra: 0 24px 48px -24px rgba(0, 0, 0, .85);
  --ease: cubic-bezier(.22, .8, .24, 1);

  /* Pinceladas de brocha seca (se usan como máscara, el color lo pone cada pieza) */
  --pincel-banda: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 140' preserveAspectRatio='none'%3E%3Cfilter id='f' filterUnits='userSpaceOnUse' x='-30' y='-40' width='660' height='220'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .16' numOctaves='3' seed='4'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='24' xChannelSelector='R' yChannelSelector='G' result='s'/%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004 .22' numOctaves='2' seed='9'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 0 -1.35'/%3E%3CfeComposite in='s' operator='in'/%3E%3C/filter%3E%3Cpath filter='url(%23f)' d='M14 30C130 14 300 10 470 15c55 2 95 8 116 16l-6 18 14 16-12 18 9 18c-40 12-170 21-292 19-120-2-210-10-286-21l9-14-16-14 15-14z'/%3E%3C/svg%3E");
  --pincel-liso: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 140' preserveAspectRatio='none'%3E%3Cfilter id='f' filterUnits='userSpaceOnUse' x='-30' y='-40' width='660' height='220'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .16' numOctaves='3' seed='4'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='24' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3Cpath filter='url(%23f)' d='M14 30C130 14 300 10 470 15c55 2 95 8 116 16l-6 18 14 16-12 18 9 18c-40 12-170 21-292 19-120-2-210-10-286-21l9-14-16-14 15-14z'/%3E%3C/svg%3E");
  --pincel-seco: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 200' preserveAspectRatio='none'%3E%3Cfilter id='f' filterUnits='userSpaceOnUse' x='-40' y='-60' width='880' height='320'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.008 .09' numOctaves='3' seed='2'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='40' xChannelSelector='R' yChannelSelector='G' result='s'/%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0025 .38' numOctaves='3' seed='17'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4.2 0 0 0 -1.15'/%3E%3CfeComposite in='s' operator='in'/%3E%3C/filter%3E%3Cpath filter='url(%23f)' d='M30 80C160 40 360 30 560 38c90 4 160 14 210 30-10 18 6 30-8 46 12 16-4 30 4 44-70 14-200 22-360 18-160-4-270-14-370-30 14-16-6-28 8-42-12-14 2-26-6-34z'/%3E%3C/svg%3E");
  --pincel-borde: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 90' preserveAspectRatio='none'%3E%3Cfilter id='f' filterUnits='userSpaceOnUse' x='-50' y='-50' width='1300' height='200'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.018 .06' numOctaves='3' seed='5'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='36' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3Cpath filter='url(%23f)' d='M-40 46C120 30 260 58 420 40s300 6 460-10 240 14 360-2V160H-40z'/%3E%3C/svg%3E");
  --flecha: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffb3d6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  color-scheme: dark;
}

/* ---------- Reinicio ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--noche);
  color: var(--texto);
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, figure, fieldset, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
[hidden] { display: none !important; }
::selection { background: var(--neon); color: #fff; }
:focus-visible { outline: 2px solid var(--neon-claro); outline-offset: 3px; }

.container { width: min(100% - 32px, 1200px); margin-inline: auto; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -80px; z-index: 999;
  padding: .6em 1.1em; border-radius: 999px; background: var(--neon); color: #fff; font-weight: 600;
  transition: top .2s;
}
.skip:focus { top: 12px; }

/* ---------- Íconos ---------- */
.i {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.i--fill { fill: currentColor; stroke: none; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.deco { fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }

/* ---------- Marca (Fer Store BC) ---------- */
.marca { position: relative; display: inline-flex; align-items: baseline; gap: .12em; line-height: 1; padding-top: .55rem; }
.marca__corona { position: absolute; left: -.1rem; top: -.15rem; color: var(--neon-claro); filter: drop-shadow(0 0 4px rgba(255, 90, 165, .9)); transform: rotate(-14deg); }
.marca__corona .i { width: 19px; height: 19px; stroke-width: 2; }
.marca__fer { font-family: var(--f-brush); font-size: 2.15rem; color: #fff; text-shadow: var(--glow-text); line-height: .9; }
.marca__store { font-family: var(--f-brush); font-size: 1.02rem; color: var(--neon-claro); white-space: nowrap; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .75em 1.45em; border-radius: 999px;
  font-family: var(--f-body); font-weight: 600; font-size: 1rem; letter-spacing: .01em; line-height: 1.1;
  text-align: center; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background-color .2s, color .2s, border-color .2s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn .i { width: 1.2em; height: 1.2em; }
.btn--neon {
  background: linear-gradient(135deg, #ff74b4, #ff3f95 55%, #e8318a);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 190, 220, .55) inset, 0 10px 26px -10px rgba(255, 61, 148, .9), var(--glow-sm);
}
.btn--neon:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255, 220, 235, .75) inset, 0 12px 30px -10px rgba(255, 61, 148, 1), var(--glow); }
.btn--ghost {
  border: 1.5px solid var(--neon); color: var(--texto); background: rgba(255, 90, 165, .06);
  box-shadow: var(--glow-sm), inset 0 0 14px rgba(255, 90, 165, .16);
}
.btn--ghost:hover { background: rgba(255, 90, 165, .14); box-shadow: var(--glow), inset 0 0 14px rgba(255, 90, 165, .22); color: #fff; }
.btn--soft { background: var(--noche-3); border: 1px solid var(--linea-fuerte); color: var(--texto); }
.btn--soft:hover { border-color: var(--neon); color: #fff; }
.btn--dark { background: var(--tinta); color: #fff; }
.btn--dark:hover { background: #2c1822; }
.btn--danger { background: rgba(255, 122, 138, .1); border: 1px solid rgba(255, 122, 138, .45); color: var(--error); }
.btn--danger:hover { background: rgba(255, 122, 138, .2); }
.btn--sm { min-height: 38px; padding: .5em 1em; font-size: .9rem; }
.btn--lg { min-height: 56px; padding: .9em 1.85em; font-size: 1.06rem; }
.btn--block { width: 100%; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%; color: var(--texto);
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.icon-btn:hover { background: rgba(255, 90, 165, .13); color: #fff; }
.icon-btn .i { width: 22px; height: 22px; }
.bubble {
  position: absolute; top: 1px; right: -1px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--neon); color: #fff; box-shadow: var(--glow-sm);
  font: 700 .72rem/19px var(--f-body); text-align: center;
}

.link { color: var(--neon-claro); text-decoration: underline; text-decoration-color: rgba(255, 179, 214, .4); text-underline-offset: 3px; font-weight: 500; }
.link:hover { color: #fff; text-decoration-color: var(--neon); }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 6px; }
.field__label { font-size: .9rem; font-weight: 500; color: var(--texto-suave); }
.field__label b { color: var(--neon-claro); font-weight: 600; }
.field__hint { font-size: .82rem; color: var(--texto-tenue); line-height: 1.45; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: .7em 1em;
  background: var(--noche-2); border: 1px solid var(--linea-fuerte); border-radius: var(--r-sm);
  color: var(--texto); font-size: 1rem; transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 100px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--texto-tenue); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 0 3px rgba(255, 90, 165, .22); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--error); }
.select { appearance: none; -webkit-appearance: none; padding-right: 2.6em; background-image: var(--flecha); background-repeat: no-repeat; background-position: right 1em center; background-size: 16px; }
.select option { background: var(--noche-2); color: var(--texto); }

/* Pastillas de filtro */
.chip {
  display: inline-flex; align-items: center; gap: .45em; flex: none;
  min-height: 42px; padding: .45em 1.05em; border-radius: 999px;
  border: 1px solid var(--linea-fuerte); background: rgba(255, 255, 255, .02);
  color: var(--texto-suave); font-size: .93rem; font-weight: 500; white-space: nowrap;
  transition: color .2s, border-color .2s, background-color .2s, box-shadow .2s;
}
.chip:hover { color: #fff; border-color: var(--neon-claro); }
.chip[aria-pressed="true"] { background: var(--neon); border-color: var(--neon); color: #fff; box-shadow: var(--glow-sm); }
.chip .i { width: 18px; height: 18px; }

/* Opciones de talla y color */
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.opt span {
  display: inline-grid; place-items: center; min-width: 48px; min-height: 44px; padding: .4em .95em;
  border-radius: 12px; border: 1px solid var(--linea-fuerte); font-weight: 500; transition: .2s;
}
.opt input:checked + span { border-color: var(--neon); background: rgba(255, 90, 165, .16); color: #fff; box-shadow: var(--glow-sm); }
.opt input:focus-visible + span { outline: 2px solid var(--neon-claro); outline-offset: 2px; }

/* Interruptor */
.switch { position: relative; display: inline-flex; align-items: center; gap: .7em; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track {
  position: relative; flex: none; width: 46px; height: 26px; border-radius: 999px;
  background: var(--noche-4); border: 1px solid var(--linea-fuerte); transition: .2s;
}
.switch__track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--texto-suave); transition: transform .2s var(--ease), background-color .2s;
}
.switch input:checked + .switch__track { background: var(--neon); border-color: var(--neon); box-shadow: var(--glow-sm); }
.switch input:checked + .switch__track::after { transform: translateX(20px); background: #fff; }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--neon-claro); outline-offset: 2px; }

/* Etiquetas de producto */
.badge {
  display: inline-flex; align-items: center; gap: .3em; padding: .34em .72em .3em; border-radius: 999px;
  font: 700 .76rem/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.badge--new { background: var(--neon); color: #fff; box-shadow: var(--glow-sm); }
.badge--sale { background: #fff; color: var(--tinta); }
.badge--last { background: var(--aviso); color: var(--tinta); }
.badge--out { background: rgba(10, 6, 8, .86); color: var(--texto); border: 1px solid var(--linea-fuerte); }
.badge--muted { background: var(--noche-4); color: var(--texto-suave); }

/* ---------- Pinceladas y adornos ---------- */
.pintado { position: relative; isolation: isolate; display: inline-block; padding: .08em .5em .16em; color: var(--tinta); }
.pintado::before {
  content: ''; position: absolute; inset: -.14em -.22em; z-index: -1;
  background: linear-gradient(90deg, #f6a0c6, #fbb8d4 45%, #f593c1);
  -webkit-mask: var(--pincel-liso) center / 100% 100% no-repeat;
  mask: var(--pincel-liso) center / 100% 100% no-repeat;
}
.pintado--seco::before {
  -webkit-mask-image: var(--pincel-banda);
  mask-image: var(--pincel-banda);
}
.pintado--blanco::before { background: linear-gradient(90deg, #efe4ea, #fff 45%, #f4eaef); }
.pintado--fuerte { color: #fff; }
.pintado--fuerte::before { background: linear-gradient(90deg, #ee6aa6, #f582b6 50%, #e65d9c); }

.rayos { display: inline-flex; align-items: center; gap: .3em; }
.rayos > [data-icon] { color: var(--neon); }
.rayos .deco { width: .95em; height: .95em; stroke-width: 3.4; }

@keyframes destello {
  0%, 100% { transform: scale(.55) rotate(0deg); opacity: .3; }
  50% { transform: scale(1) rotate(45deg); opacity: 1; }
}
.destello { position: absolute; color: #fff; pointer-events: none; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .75)); animation: destello 3.8s ease-in-out infinite; }
.destello .i { width: 100%; height: 100%; }

/* Encabezado de sección: frase a mano + título en mayúsculas */
.sec-head { display: grid; justify-items: center; text-align: center; margin-bottom: clamp(28px, 4vw, 46px); }
.sec-head__script {
  font-family: var(--f-script); font-weight: 700; font-size: clamp(1.55rem, 3vw, 2rem); line-height: 1;
  color: var(--neon-claro); transform: rotate(-3deg); margin-bottom: .1em;
}
.sec-head__title {
  font-family: var(--f-body); font-weight: 800; text-transform: uppercase; letter-spacing: .035em;
  font-size: clamp(2.05rem, 5.2vw, 3.3rem); line-height: 1.02;
}
.sec-head__swoosh { width: min(210px, 48vw); height: 18px; margin-top: .45em; color: var(--neon); }
.sec-head__swoosh .deco { width: 100%; height: 100%; }
.sec-head__lead { margin-top: .9em; max-width: 54ch; color: var(--texto-suave); }

/* ---------- Ventanas (dialog) ---------- */
dialog { padding: 0; border: 0; background: transparent; color: inherit; max-width: none; max-height: none; overflow: visible; }
dialog::backdrop { background: rgba(5, 2, 4, .74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
body:has(dialog[open]) { overflow: hidden; }

/* ---------- Avisos flotantes ---------- */
.toasts {
  position: fixed; inset: auto auto max(20px, env(safe-area-inset-bottom)) 50%; transform: translateX(-50%);
  z-index: 1000; display: grid; gap: 10px; justify-items: center; width: min(92vw, 440px);
  margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; pointer-events: none; color: var(--texto);
}
.toast {
  display: flex; align-items: center; gap: .6em; padding: .8em 1.25em; border-radius: 999px;
  background: rgba(30, 14, 23, .94); border: 1px solid var(--linea-fuerte); color: var(--texto);
  box-shadow: var(--sombra), var(--glow-sm); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-weight: 500; font-size: .95rem; line-height: 1.35;
  opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.toast.is-in { opacity: 1; transform: none; }
.toast .i { width: 18px; height: 18px; color: var(--neon); }
.toast--error .i { color: var(--error); }
.toast--info .i { color: var(--neon-claro); }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
