:root {
  --bg: #0a0a0a;
  --surface: #1a1a1a;
  --text: #f5f5f5;
  --text-muted: #9a9a9a;
  --primary: #c6ff1a;
  --primary-text: #0a0a0a;
  --accent: #ff3b30;
  --success: #1db954;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Poppins", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.logo span { color: var(--accent); }

.header-logo {
  height: 40px;
  width: auto;
  flex-shrink: 0;
}

.search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px;
  transition: border-color 0.2s ease;
}
.search-wrap:focus-within { border-color: var(--primary); }

.search-icon { font-size: 13px; opacity: 0.6; flex-shrink: 0; }

.search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input::-webkit-search-cancel-button { cursor: pointer; }

.gender-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.gender-chip:hover { border-color: var(--primary); }
.gender-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-text);
}

.sub-filters {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sub-filters::-webkit-scrollbar { display: none; }

.header-actions { display: flex; align-items: center; }

.cart-btn {
  position: relative;
  border: none;
  background: var(--bg);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.cart-btn:hover { transform: scale(1.06); }
.cart-btn.bounce { animation: bounce 0.4s ease; }

@keyframes bounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.25); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ---------- BRAND HERO / BANNER ---------- */
.brand-hero {
  position: relative;
  overflow: hidden;
  height: min(42vw, 460px);
  min-height: 280px;
  background: #0a0a0a;
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  animation: heroZoom 22s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #0a0a0a 0%, #0a0a0a 30%, rgba(10,10,10,0.55) 55%, rgba(10,10,10,0) 75%),
    linear-gradient(180deg, rgba(10,10,10,0) 68%, rgba(10,10,10,0.97) 96%);
}

.hero-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(198,255,26,0.18) 50%, transparent 60%);
  background-size: 300% 300%;
  animation: heroShine 7s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroShine {
  0% { background-position: 200% 0%; }
  100% { background-position: -100% 0%; }
}

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-particles span {
  position: absolute;
  bottom: -20px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c6ff1a;
  box-shadow: 0 0 8px 2px rgba(198,255,26,0.6);
  opacity: 0;
  animation: floatUp 6s ease-in infinite;
}
.hero-particles span:nth-child(1) { left: 8%;  animation-delay: 0s; }
.hero-particles span:nth-child(2) { left: 18%; animation-delay: 1.2s; }
.hero-particles span:nth-child(3) { left: 27%; animation-delay: 2.4s; }
.hero-particles span:nth-child(4) { left: 12%; animation-delay: 3.6s; }
.hero-particles span:nth-child(5) { left: 22%; animation-delay: 4.4s; }
.hero-particles span:nth-child(6) { left: 32%; animation-delay: 5.2s; }

@keyframes floatUp {
  0%   { transform: translateY(0) scale(0.6); opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 0.6; }
  100% { transform: translateY(-260px) scale(1); opacity: 0; }
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-58%);
  z-index: 2;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-logo {
  position: relative;
  display: inline-flex;
  animation: fadeInUp 0.8s ease forwards;
}

.logo-img {
  width: clamp(150px, 22vw, 240px);
  height: auto;
  filter: drop-shadow(0 0 22px rgba(198,255,26,0.3));
  animation: splashPulse 4s ease-in-out infinite;
}

@keyframes splashPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.04) rotate(-1deg); }
}

.hero-bottom-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 24px;
  background: rgba(5,5,5,0.94);
  backdrop-filter: blur(4px);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.hero-features {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.hero-features li {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #f2f2f2;
}
.feat-icon {
  display: inline-flex;
  animation: iconBounce 2.6s ease-in-out infinite;
}
.hero-features li:nth-child(2) .feat-icon { animation-delay: 0.3s; }
.hero-features li:nth-child(3) .feat-icon { animation-delay: 0.6s; }

@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.hero-socials { display: flex; gap: 12px; }
.hero-socials a {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.hero-socials a:hover { background: #c6ff1a; transform: translateY(-2px); }
.hero-socials svg { width: 16px; height: 16px; fill: #fff; }
.hero-socials a:hover svg { fill: #0a0a0a; }

@media (max-width: 640px) {
  .brand-hero { height: 78vw; min-height: 340px; }
  .hero-bg::after {
    background:
      linear-gradient(180deg, rgba(10,10,10,0.8) 0%, rgba(10,10,10,0.4) 45%, rgba(10,10,10,0) 62%, rgba(10,10,10,0.97) 92%);
  }
  .hero-features { gap: 10px; }
  .hero-features li { font-size: 10px; }
  .hero-bottom-bar { padding: 10px 16px; }
}

/* ---------- ESTADOS ---------- */
.state-msg {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  display: none;
}
#loadingState { display: flex; flex-direction: column; align-items: center; gap: 14px; }

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- NUEVA COLECCIÓN ---------- */
.new-collection {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 20px 32px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.section-heading h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
}
.section-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.new-collection-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 240px);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

@media (max-width: 480px) {
  .new-collection-grid { grid-auto-columns: minmax(160px, 68vw); gap: 12px; }
}

/* ---------- GRID PRODUCTOS ---------- */
.products-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.product-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
  animation: fadeInUp 0.5s ease forwards;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(198,255,26,0.35);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.55);
}

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

.badge-offer {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 2;
  letter-spacing: 0.5px;
}

.product-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg);
  cursor: pointer;
}
.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  transition: opacity 0.3s ease, transform 0.4s ease;
}
.gallery-slide.active { opacity: 1; z-index: 1; }
.product-card:hover .gallery-slide.active { transform: scale(1.06); }

.gallery-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.gallery-dot.active { background: var(--primary); transform: scale(1.2); }

.product-info { padding: 14px 16px 16px; }

.product-tags {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.product-title {
  font-size: 15px;
  font-weight: 600;
  margin: 6px 0 10px;
  line-height: 1.3;
  min-height: 2.6em;
  cursor: pointer;
}

.product-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.old-price { text-decoration: line-through; color: var(--text-muted); font-size: 13px; }
.final-price { font-size: 18px; font-weight: 700; }

.talla-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.talla-chip {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  min-width: 34px;
  height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.talla-chip:hover { border-color: var(--primary); }
.talla-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-text);
}
.talla-chip.agotado {
  text-decoration: line-through;
  color: var(--text-muted);
  opacity: 0.45;
  cursor: not-allowed;
}
.talla-chip.agotado:hover { border-color: var(--border); }

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.talla-selector.shake { animation: shakeX 0.3s ease; }

.product-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.qty-btn {
  border: none;
  background: var(--bg);
  width: 28px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: background 0.15s ease;
}
.qty-btn:hover { background: var(--border); }
.qty-value {
  width: 28px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.buy-btn {
  flex: 1;
  border: none;
  background: var(--primary);
  color: var(--primary-text);
  padding: 8px 12px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.buy-btn:hover { transform: translateY(-1px); background: #d9ff5c; }
.buy-btn:active { transform: translateY(0) scale(0.97); }

/* ---------- CARRITO LATERAL ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 90;
}
.overlay.show { opacity: 1; pointer-events: auto; }

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(400px, 100%);
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: -8px 0 32px rgba(0,0,0,0.5);
}
.cart-panel.open { transform: translateX(0); }

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

.close-btn {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}

.cart-empty-msg {
  text-align: center;
  color: var(--text-muted);
  margin-top: 40px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  animation: fadeInUp 0.3s ease;
}
.cart-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-item-price { font-size: 12px; color: var(--text-muted); margin: 0 0 6px; }

.cart-item-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px 8px;
}
.cart-item-qty .qty-btn {
  width: 20px;
  height: 24px;
  background: transparent;
  font-size: 14px;
}
.cart-item-qty span { font-size: 13px; font-weight: 600; min-width: 14px; text-align: center; }

.remove-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  align-self: flex-start;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}
.remove-btn:hover { opacity: 1; }

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

.checkout-btn {
  width: 100%;
  border: none;
  background: var(--success);
  color: #fff;
  padding: 14px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.checkout-btn:hover:not(:disabled) { transform: translateY(-1px); }
.checkout-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- MODAL DE PRODUCTO ---------- */
.product-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: min(460px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  z-index: 110;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.product-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.7);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}

.modal-gallery {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}
.modal-image { width: 100%; height: 100%; object-fit: cover; }

.modal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(10, 10, 10, 0.55);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.modal-arrow:hover { background: var(--primary); color: var(--primary-text); }
.modal-arrow-prev { left: 10px; }
.modal-arrow-next { right: 10px; }

.modal-info { padding: 18px 20px 22px; }
.modal-title { font-size: 19px; font-weight: 700; margin: 8px 0 12px; line-height: 1.3; }

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--primary);
  color: var(--primary-text);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 200;
  box-shadow: var(--shadow);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- FOOTER ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.footer-brand .logo { font-size: 20px; margin-bottom: 4px; }
.footer-tagline { margin: 0; font-size: 12px; letter-spacing: 0.5px; text-transform: uppercase; }

.footer-info { text-align: right; }
.footer-info p { margin: 0 0 8px; font-size: 13px; line-height: 1.5; }
.footer-icon { margin-right: 4px; }

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}
.map-link:hover { text-decoration: underline; }

.footer-map {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.footer-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: invert(92%) hue-rotate(180deg) brightness(0.95) contrast(0.9);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
}

.footer-credit-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 6px;
}

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; }
  .footer-info { text-align: left; }
  .footer-map { max-width: 100%; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 480px) {
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .cart-panel { width: 100%; }
  .product-actions { flex-direction: column; gap: 8px; }
  .qty-stepper { align-self: center; }
  .buy-btn { width: 100%; }
}
