/* ─────────────────────────────────────────────────────────────────────────────
   RETROBALL — Hoja de estilos principal
   Paleta: #080808 negro · #FF1D1D rojo neón · #FFFFFF blanco
───────────────────────────────────────────────────────────────────────────── */

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:           #080808;
  --bg-card:      #0F0F0F;
  --bg-card-2:    #141414;
  --bg-input:     #1A1A1A;
  --red:          #FF1D1D;
  --red-dim:      #CC1515;
  --red-glow:     rgba(255, 29, 29, 0.28);
  --red-glow-sm:  rgba(255, 29, 29, 0.12);
  --white:        #FFFFFF;
  --gray-2:       #222222;
  --gray-3:       #333333;
  --gray-6:       #666666;
  --gray-9:       #999999;
  --border:       rgba(255, 29, 29, 0.1);
  --border-h:     rgba(255, 29, 29, 0.45);
  --radius:       8px;
  --radius-lg:    12px;
  --header-h:     72px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red-dim); border-radius: 3px; }

/* ── Neon utilities ───────────────────────────────────────────────────────── */
.neon {
  color: var(--red);
  text-shadow: 0 0 12px var(--red-glow), 0 0 32px rgba(255, 29, 29, 0.15);
}

/* ── Container ────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Banner rebajas ───────────────────────────────────────────────────────── */
@keyframes sale-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.82; }
}
.sale-banner {
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  padding: 8px 16px;
  position: sticky;
  top: 0;
  z-index: 101;
  box-shadow: 0 0 24px rgba(255,29,29,0.5), 0 2px 8px rgba(0,0,0,0.4);
  animation: sale-pulse 3s ease-in-out infinite;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 36px;
  z-index: 100;
  height: var(--header-h);
  background: rgba(8, 8, 8, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo { display: flex; align-items: center; text-decoration: none; }
.logo-img { height: 56px; width: auto; display: block; mix-blend-mode: screen; }

/* Nav */
.nav { display: flex; align-items: center; gap: 16px; }

.nav-link {
  color: var(--gray-9);
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--white); }

.nav-ig { display: flex; align-items: center; }
.nav-ig:hover { color: var(--red); }

/* Cart button */
.cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--border-h);
  color: var(--white);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.cart-btn:hover {
  background: rgba(255, 29, 29, 0.08);
  border-color: var(--red);
  box-shadow: 0 0 14px var(--red-glow-sm);
}

.cart-count {
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px var(--red-glow);
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--red);
  color: #fff;
  border: none;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}
.btn-primary:hover {
  background: var(--red-dim);
  box-shadow: 0 0 22px var(--red-glow);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary.full { width: 100%; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: none;
  color: var(--white);
  border: 1px solid var(--border-h);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.btn-outline:hover {
  background: rgba(255, 29, 29, 0.08);
  border-color: var(--red);
}
.btn-outline.full { width: 100%; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  min-height: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 40px 24px 32px;
}

/* Pitch lines pattern */
.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 50% 50%, transparent 49%, rgba(255,29,29,0.04) 50%, transparent 51%),
    linear-gradient(to right, transparent 49.5%, rgba(255,29,29,0.04) 49.5%, rgba(255,29,29,0.04) 50.5%, transparent 50.5%),
    radial-gradient(ellipse at 50% 0%, rgba(255,29,29,0.07) 0%, transparent 65%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 740px;
}

.hero-eyebrow {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -2px;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--gray-9);
  margin-bottom: 36px;
  font-weight: 400;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 28px;
  margin-bottom: 40px;
}

.badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  color: var(--gray-9);
  font-weight: 500;
}

/* Hero category tags */
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--gray-9);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(4px);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
a.hero-tag:hover { border-color: rgba(255,255,255,0.35); color: var(--white); background: rgba(255,255,255,0.08); }
.hero-tag--special {
  border-color: var(--red);
  color: var(--white);
  background: rgba(255,29,29,0.1);
  box-shadow: 0 0 10px var(--red-glow);
}

/* Decorative hero jersey */
.hero-jersey {
  position: absolute;
  right: -2%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  opacity: 0.07;
  width: min(480px, 45vw);
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(-50%) rotate(-8deg); }
  50%       { transform: translateY(calc(-50% - 14px)) rotate(-8deg); }
}

/* Segunda camiseta (izquierda) */
.hero-jersey--left {
  right: auto;
  left: -3%;
  opacity: 0.04;
  width: min(320px, 28vw);
  animation: float-left 8s ease-in-out infinite 1s;
}
@keyframes float-left {
  0%, 100% { transform: translateY(-50%) rotate(10deg); }
  50%       { transform: translateY(calc(-50% - 16px)) rotate(10deg); }
}

/* Balones decorativos */
.deco-ball {
  position: absolute;
  pointer-events: none;
  background-image: url("assets/img/ball.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  mix-blend-mode: screen;
}
.deco-ball--1 { width: 90px;  height: 90px;  top: 12%;    left: 18%;  opacity: 0.06; animation: fb1 7s ease-in-out infinite; }
.deco-ball--2 { width: 45px;  height: 45px;  bottom: 18%; left: 42%;  opacity: 0.05; animation: fb2 5s ease-in-out infinite 1.5s; }
.deco-ball--3 { width: 65px;  height: 65px;  top: 58%;    right: 30%; opacity: 0.04; animation: fb3 9s ease-in-out infinite 3s; }

@keyframes fb1 {
  0%, 100% { transform: translateY(0)     rotate(0deg); }
  50%       { transform: translateY(-22px) rotate(40deg); }
}
@keyframes fb2 {
  0%, 100% { transform: translateY(0)     rotate(0deg); }
  50%       { transform: translateY(-14px) rotate(-30deg); }
}
@keyframes fb3 {
  0%, 100% { transform: translateY(0)     rotate(0deg); }
  50%       { transform: translateY(-18px) rotate(25deg); }
}

/* Números decorativos */
.deco-num {
  position: absolute;
  font-family: 'Arial Black', Arial, sans-serif;
  font-weight: 900;
  color: #fff;
  pointer-events: none;
  line-height: 1;
  user-select: none;
}
.deco-num--a { font-size: clamp(140px, 18vw, 220px); top: -30px;  left: -10px;  opacity: 0.025; }
.deco-num--b { font-size: clamp(100px, 13vw, 170px); bottom: -20px; right: 35%; opacity: 0.02; }

/* ── Section titles ───────────────────────────────────────────────────────── */
.section-title {
  font-size: clamp(24px, 4vw, 52px);
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 36px;
}

/* ── Catalog section ──────────────────────────────────────────────────────── */
.catalog-section { padding: 8px 0 60px; }

/* Search */
.search-bar { margin-bottom: 20px; }
.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-h);
  border-radius: var(--radius);
  color: var(--white);
  padding: 12px 18px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.search-input::placeholder { color: var(--gray-6); }
.search-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow-sm);
}

/* Filters */
.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 44px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border);
  color: var(--gray-9);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.3px;
  transition: all 0.2s;
}
.filter-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 2px;
  flex-shrink: 0;
}
.filter-btn:hover { border-color: var(--red); color: var(--white); }
.filter-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 0 18px var(--red-glow);
}

/* Categorías — panel hover */
.cats-section { margin-bottom: 20px; position: relative; display: flex; flex-direction: column; align-items: center; }
.cats-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1px solid var(--border);
  color: var(--red);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 16px 32px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.cats-trigger:hover,
.cats-section:hover .cats-trigger {
  background: rgba(255,29,29,0.08);
  border-color: var(--red);
  color: var(--white);
}
.cats-arrow {
  width: 17px;
  height: 17px;
  transition: transform 0.25s;
  flex-shrink: 0;
}
.cats-section:hover .cats-arrow { transform: rotate(180deg); }

.cats-panel {
  position: absolute;
  /* Sin gap — pegado al trigger para que el hover no se rompa */
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  /* Puente invisible para que el hover no se pierda al cruzar el borde */
  padding: 12px 24px 20px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
/* Puente invisible entre trigger y panel */
.cats-panel::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0; right: 0;
  height: 10px;
}
.cats-section:hover .cats-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.cats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (min-width: 768px) {
  .cats-grid { grid-template-columns: repeat(5, 1fr); }
}

/* Botón cerrar panel categorías — oculto en desktop, visible en móvil vía media query */
.cats-close { display: none; }

/* Sub-panel de Selecciones por país (dentro del panel de categorías) */
.cats-subpanel-wrap {
  position: relative;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.cats-sub-trigger {
  width: 100% !important;
  justify-content: center !important;
  text-align: center !important;
  color: var(--gray-9) !important;
  border-color: var(--border) !important;
  font-size: 12px !important;
  letter-spacing: 1.2px !important;
  background: none !important;
}
.cats-sub-trigger:hover,
.cats-subpanel-wrap:hover .cats-sub-trigger {
  color: var(--white) !important;
  border-color: var(--red) !important;
  background: rgba(255,29,29,0.08) !important;
}
.cats-sub-arrow { margin-left: 4px; opacity: 0.7; transition: transform 0.2s; }
.cats-subpanel-wrap:hover .cats-sub-arrow { transform: rotate(90deg); }

.cats-subpanel {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  z-index: 200;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 16px 20px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
}
/* Puente invisible para mantener el hover */
.cats-subpanel::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0; right: 0;
  height: 10px;
}
.cats-subpanel-wrap:hover .cats-subpanel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.country-btn {
  background: none;
  border: 1px solid var(--gray-3);
  color: var(--gray-9);
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  text-align: left;
}
.country-btn:hover {
  border-color: var(--red);
  color: var(--white);
  background: rgba(255,29,29,0.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.country-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 0 12px var(--red-glow);
}
.mini-flag {
  display: inline-block;
  width: 22px;
  height: 15px;
  border-radius: 2px;
  vertical-align: middle;
  flex-shrink: 0;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.12);
}
.cat-logo {
  display: inline-block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* ── Product card ─────────────────────────────────────────────────────────── */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.product-card:hover {
  border-color: var(--border-h);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,29,29,0.12);
}

/* Jersey preview area */
.jersey-preview {
  background: linear-gradient(145deg, #131313, #0A0A0A);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 190px;
  position: relative;
  overflow: hidden;
}
.jersey-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,29,29,0.04), transparent 70%);
  pointer-events: none;
}

.jersey-svg {
  width: 120px;
  height: auto;
  filter: drop-shadow(2px 6px 14px rgba(0,0,0,0.65));
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
  z-index: 1;
}
.product-card:hover .jersey-svg { transform: scale(1.08) rotate(-3deg); }

/* If card has a real image */
.jersey-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 8px;
  transition: transform 0.3s;
}
.product-card:hover .jersey-img { transform: scale(1.06); }

/* Card body */
.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-league {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: var(--red);
  text-transform: uppercase;
}
.card-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
}
.card-sub {
  font-size: 12px;
  color: var(--gray-6);
  margin-bottom: 2px;
}
.card-price {
  font-size: 22px;
  font-weight: 900;
  color: var(--red);
  margin-top: 2px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.price-orig {
  font-size: 0.6em;
  font-weight: 600;
  color: var(--white);
  text-decoration: line-through;
  opacity: 0.55;
}

/* Size selector */
.size-selector {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.size-btn {
  background: none;
  border: 1px solid var(--gray-3);
  color: var(--gray-6);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.3px;
}
.size-btn:hover { border-color: var(--gray-9); color: var(--white); }
.size-btn.selected {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* Add to cart row */
.add-row { display: flex; gap: 6px; margin-top: auto; padding-top: 12px; }
.add-btn {
  flex: 1;
  background: none;
  border: 1px solid var(--border);
  color: var(--white);
  padding: 10px 8px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: all 0.2s;
}
.add-btn:hover {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 16px var(--red-glow);
}
.add-btn.added {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.cart-jump-btn {
  flex-shrink: 0;
  width: 38px;
  background: none;
  border: 1px solid var(--border);
  color: var(--gray-9);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.cart-jump-btn:hover {
  border-color: var(--red);
  color: var(--white);
  background: rgba(255,29,29,0.08);
}

/* ── How it works ─────────────────────────────────────────────────────────── */
.how-section { padding: 80px 0; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.step-card:hover {
  border-color: var(--border-h);
  box-shadow: 0 0 24px var(--red-glow-sm);
}

.step-icon { font-size: 32px; margin-bottom: 14px; }
.step-card h3 { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.step-card p { font-size: 13px; color: var(--gray-6); line-height: 1.6; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-logo { font-size: 22px; display: block; margin-bottom: 10px; }
.footer-tagline { font-size: 13px; color: var(--gray-6); line-height: 1.7; }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-6);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--red); }

.footer-bottom {
  border-top: 1px solid var(--gray-2);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--gray-3);
}

/* ── Cart sidebar ─────────────────────────────────────────────────────────── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-sidebar {
  position: fixed;
  top: 0; right: 0;
  width: min(400px, 100vw);
  height: 100dvh;
  background: #0D0D0D;
  border-left: 1px solid var(--border);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-sidebar.open { transform: translateX(0); }

.cart-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.cart-header h2 { font-size: 17px; font-weight: 800; }

.cart-close {
  background: none;
  border: none;
  color: var(--gray-6);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.cart-close:hover { color: var(--white); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-empty {
  text-align: center;
  color: var(--gray-6);
  padding: 60px 0;
  font-size: 14px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: center;
}
.cart-item-jersey { width: 56px; height: 64px; flex-shrink: 0; border-radius: 6px; overflow: hidden; background: var(--bg-card-2); }
.cart-item-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-item-preview { cursor: pointer; transition: opacity 0.2s, box-shadow 0.2s; }
.cart-item-preview:hover { opacity: 0.8; box-shadow: 0 0 0 2px var(--red); }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-sub { font-size: 11px; color: var(--gray-6); }
.cart-item-size { font-size: 11px; color: var(--red); font-weight: 700; margin-top: 2px; }
.cart-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.cart-item-price { font-size: 15px; font-weight: 900; color: var(--red); }
.cart-item-remove {
  background: none; border: none;
  color: var(--gray-6); cursor: pointer;
  font-size: 15px; line-height: 1;
  transition: color 0.2s;
}
.cart-item-remove:hover { color: var(--red); }

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-shrink: 0;
}
.cart-shipping { font-size: 12px; color: var(--gray-6); text-align: center; }
.cart-shipping .free { color: #22c55e; font-weight: 700; }

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 17px;
  font-weight: 800;
}
.cart-total { color: var(--red); font-size: 24px; font-weight: 900; }

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal {
  background: #0D0D0D;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 92dvh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal-header {
  padding: 22px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h2 { font-size: 18px; font-weight: 900; }

.modal-close {
  background: none; border: none;
  color: var(--gray-6); font-size: 26px;
  cursor: pointer; line-height: 1;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--white); }

.modal-body { padding: 20px 24px 28px; }

/* ── Form ─────────────────────────────────────────────────────────────────── */
.order-summary-box {
  background: var(--bg-card-2);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 22px;
}
.order-summary-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.order-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--gray-9);
  margin-bottom: 8px;
}
.order-summary-line strong { color: var(--white); }
.order-summary-total {
  border-top: 1px solid var(--gray-2);
  margin-top: 10px;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 900;
}
.order-summary-total span { color: var(--red); }

.form-group { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gray-9);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--gray-3);
  border-radius: var(--radius);
  color: var(--white);
  padding: 11px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.form-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow-sm);
}
.form-input option { background: #1a1a1a; }

/* ── Order confirmation ───────────────────────────────────────────────────── */
.confirm-icon { font-size: 48px; text-align: center; margin-bottom: 12px; }
.confirm-title { font-size: 22px; font-weight: 900; text-align: center; margin-bottom: 6px; }
.confirm-sub { font-size: 13px; color: var(--gray-6); text-align: center; margin-bottom: 24px; }

.iban-box {
  background: var(--bg-card-2);
  border: 1px solid rgba(255, 29, 29, 0.22);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.iban-title {
  font-size: 10px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.iban-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 16px;
}
.iban-label { font-size: 12px; color: var(--gray-6); flex-shrink: 0; }
.iban-value { font-size: 13px; font-weight: 700; text-align: right; word-break: break-all; }
.iban-value.highlight {
  color: var(--red);
  font-family: 'Courier New', monospace;
  font-size: 14px;
  text-shadow: 0 0 8px var(--red-glow);
}

.steps-list { list-style: none; margin-bottom: 22px; display: flex; flex-direction: column; gap: 10px; }
.step-item { display: flex; align-items: flex-start; gap: 12px; font-size: 13px; color: var(--gray-9); }
.step-num {
  background: var(--red);
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Hint en tarjeta ──────────────────────────────────────────────────────── */
.jersey-preview.clickable { cursor: pointer; position: relative; }
.card-view-hint {
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: var(--gray-9);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 2;
}
.jersey-preview.clickable:hover .card-view-hint { opacity: 1; }

/* ── Botón volver arriba ──────────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  left: 40px;
  top: 90px;
  z-index: 200;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--red);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px var(--red-glow), 0 0 28px var(--red-glow);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s, transform 0.3s, box-shadow 0.2s;
  pointer-events: none;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { box-shadow: 0 0 22px var(--red-glow), 0 0 44px var(--red-glow); }
/* Tooltip */
.back-to-top::after {
  content: 'VOLVER AL INICIO';
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--red);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1.5px;
  white-space: nowrap;
  box-shadow: 0 0 12px var(--red-glow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.back-to-top:hover::after { opacity: 1; }

/* ── Visor split-panel ────────────────────────────────────────────────────── */
.visor-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  background: rgba(0,0,0,0.92);
}
.visor-overlay.open { display: flex; }

/* Tira de miniaturas (extremo izquierdo) */
.visor-thumbs-strip {
  width: 80px;
  flex-shrink: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 8px;
  background: rgba(0,0,0,0.5);
  scrollbar-width: thin;
  scrollbar-color: var(--gray-3) transparent;
}
.vts-thumb {
  width: 64px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.55;
  flex-shrink: 0;
  transition: opacity 0.2s, border-color 0.2s;
}
.vts-thumb:hover { opacity: 0.85; }
.vts-thumb.active { border-color: var(--red); opacity: 1; }

/* Galería: scrollable a la izquierda */
.visor-gallery {
  flex: 1;
  overflow-y: auto;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-3) transparent;
}
.vg-img {
  max-width: 600px;
  width: 100%;
  object-fit: contain;
  border-radius: 12px;
  background: #111;
  display: block;
}

/* Panel derecho: fijo */
.visor-panel {
  width: 380px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 40px 28px 32px;
  gap: 14px;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-3) transparent;
}

.vp-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--gray-6);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}
.vp-close:hover { color: var(--white); }

.vp-league {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red);
  margin-top: 8px;
}
.vp-name {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
}
.vp-price {
  font-size: 32px;
  font-weight: 900;
  color: var(--red);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.vp-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.vp-spacer { flex: 1; min-height: 20px; }

.visor-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-6);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.custom-section { margin-top: 4px; display: flex; flex-direction: column; gap: 10px; }
.custom-optional { font-weight: 400; font-size: 10px; color: var(--gray-6); text-transform: none; letter-spacing: 0; }
.custom-check-row { display: flex; align-items: center; gap: 10px; }
.custom-check-label {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-6);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  user-select: none;
  transition: color 0.2s;
}
.custom-check-label:has(.custom-chk:checked) { color: var(--white); }
.custom-chk {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--gray-3);
  border-radius: 4px;
  background: var(--bg-card-2);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.custom-chk:checked {
  background: var(--red);
  border-color: var(--red);
}
.custom-chk:checked::after {
  content: '';
  position: absolute;
  left: 3px; top: 0px;
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg);
}
.custom-input {
  background: var(--bg-card-2);
  border: 1px solid var(--gray-3);
  color: var(--white);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 13px;
  flex: 1;
  min-width: 0;
  transition: border-color 0.2s, opacity 0.2s;
}
.custom-input:disabled { opacity: 0.3; cursor: not-allowed; }
.custom-input:focus { outline: none; border-color: var(--red); }
.custom-input::placeholder { color: var(--gray-6); }
#visor-dorsal { max-width: 90px; }
.custom-inputs-wrap {
  display: flex;
  gap: 8px;
  margin-top: -4px;
  transition: opacity 0.2s;
}
.custom-inputs-wrap:has(.custom-input:disabled) { opacity: 0.4; pointer-events: none; }
.parche-opts {
  display: none;
  gap: 8px;
  margin-left: 4px;
}
.parche-opts.active { display: flex; }
.parche-opt {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-6);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
  white-space: nowrap;
}
.parche-opt:has(.parche-radio:checked) { color: var(--white); }
.parche-radio {
  appearance: none;
  width: 14px;
  height: 14px;
  border: 2px solid var(--gray-3);
  border-radius: 50%;
  background: var(--bg-card-2);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.parche-radio:checked {
  border-color: var(--red);
  background: var(--red);
}
.parche-radio:checked::after {
  content: '';
  position: absolute;
  left: 2px; top: 2px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
}
.custom-price-badge {
  font-size: 10px;
  font-weight: 800;
  color: var(--red);
  background: rgba(255,29,29,0.1);
  border: 1px solid rgba(255,29,29,0.25);
  border-radius: 4px;
  padding: 1px 5px;
  letter-spacing: 0.5px;
  text-transform: none;
  margin-left: 2px;
}
.cart-item-custom { font-size: 11px; color: var(--red); font-weight: 700; margin-top: 2px; letter-spacing: 0.5px; }

/* Mobile: galería arriba, panel abajo */
@media (max-width: 768px) {
  .visor-overlay { flex-direction: column; }
  .visor-gallery  { padding: 20px 16px; flex: none; max-height: 50vh; }
  .vg-img         { max-width: 100%; }
  .visor-panel    { width: 100%; height: auto; border-left: none; border-top: 1px solid var(--border); padding: 24px 20px; }
}

/* ── Toast ────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 500;
  background: var(--bg-card-2);
  border: 1px solid var(--red);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), 0 0 18px var(--red-glow);
  transform: translateY(80px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  pointer-events: none;
  max-width: 300px;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ── Card entry animation ─────────────────────────────────────────────────── */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.product-card { animation: cardIn 0.35s ease both; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-jersey, .deco-ball, .deco-num { display: none; }
  .hero-title { letter-spacing: -1px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .nav-link:not(.nav-ig) { display: none; }
  /* Instagram centrado entre logo y carrito */
  .header-inner { position: relative; }
  .nav-ig { position: absolute; left: 50%; transform: translateX(-50%); }
  /* Ocultar CTA "Ver catálogo" — el catálogo aparece directamente al hacer scroll */
  .hero-cta { display: none; }
  /* Tira de miniaturas del visor: oculta en móvil (sin espacio) */
  .visor-thumbs-strip { display: none; }
  /* Botón volver arriba: moverlo arriba del todo para no tapar el carrito */
  .back-to-top { left: 12px; top: 80px; width: 40px; height: 40px; }
  .back-to-top::after { display: none; }
  /* En móvil el panel ocupa todo el ancho y se controla con JS (.open) en vez de :hover */
  .cats-section { display: block; }
  .cats-panel { min-width: unset; max-width: unset; width: 100%; left: 0; right: 0;
    opacity: 0 !important; pointer-events: none !important; transform: translateY(-6px) !important; }
  .cats-section.open .cats-panel {
    opacity: 1 !important; pointer-events: auto !important; transform: translateY(0) !important; }
  /* Grid de 2 columnas en móvil para que los textos quepan */
  .cats-grid { grid-template-columns: repeat(2, 1fr); }
  .country-btn { white-space: normal; font-size: 11px; padding: 8px 8px; }
  /* Botón cerrar (X) — solo visible en móvil */
  .cats-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--gray-9);
    border-radius: 50%;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 2;
    transition: border-color 0.2s, color 0.2s;
  }
  .cats-close:hover { border-color: var(--red); color: var(--white); }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-body { padding: 12px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-inner { flex-direction: column; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .cart-sidebar { width: 100vw; }
}

@media (max-width: 360px) {
  .product-grid { grid-template-columns: 1fr; }
}
