:root {
  --bg: #0a0a0a;
  --bg-card: #151515;
  --border: #2a2a2a;
  --text: #f2f2f2;
  --text-dim: #a0a0a0;
  --accent: #e11d48;
  --whatsapp: #25d366;
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
}
.logo img {
  height: 30px;
  width: 30px;
  object-fit: cover;
  border-radius: 6px;
}

.admin-nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}
.admin-nav-link:hover { color: var(--accent); }

.menu-wrap { position: relative; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  min-width: 160px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 30;
}

.dropdown-item {
  background: transparent;
  border: none;
  color: var(--text-dim);
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: left;
  transition: all 0.15s ease;
}
.dropdown-item:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.dropdown-item.active { color: var(--accent); font-weight: 600; }

.cat-btn.active { color: var(--accent); }

.header-icons {
  display: flex;
  align-items: center;
  gap: 18px;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.15s ease;
}
.icon-btn:hover { color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; }

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 14px;
}
.search-bar input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
}
.search-bar input:focus { outline: none; border-color: var(--accent); }
.search-bar button {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
}
.search-bar button:hover { color: var(--accent); }

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent);
  color: white;
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 48px 20px 32px;
  max-width: 700px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 2rem;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}

.bcv-badge {
  display: inline-block;
  margin-top: 14px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.51rem;
  color: var(--text-dim);
  background: var(--bg-card);
}

.price-bs {
  display: block;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.78rem;
}

/* Catalog grid */
.catalog {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.product-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.product-image {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  text-align: center;
  padding: 16px;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  cursor: pointer;
}

.product-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-link {
  color: var(--text-dim);
  font-size: 0.75rem;
}
.admin-link:hover { color: var(--accent); }

.discount-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 5px;
  letter-spacing: 0.3px;
}

.stock-badge {
  background: #444;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-final {
  color: var(--accent);
  font-weight: 700;
}

.price-original {
  color: var(--text-dim);
  font-size: 0.82rem;
  text-decoration: line-through;
}

.product-info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
}
.product-name:hover { color: var(--accent); }

.product-sizes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.size-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
}
.size-btn.selected {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(225, 29, 72, 0.15);
}

.btn-add {
  margin-top: auto;
  background: white;
  color: #111;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
  transition: opacity 0.15s ease;
}
.btn-add:hover { opacity: 0.85; }
.btn-add:disabled { opacity: 0.5; cursor: not-allowed; }

/* Info envíos */
.info-envios {
  max-width: 1100px;
  margin: 28px auto;
  padding: 0 20px;
}

.info-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.info-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}
.info-block h3 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.info-block p {
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-bottom: 10px;
}

.brand-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.brand-badge {
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 30px 20px 50px;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}
.site-footer p { margin: 4px 0; }

.social-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 14px 0;
}
.social-links a {
  color: var(--text-dim);
  display: flex;
  transition: color 0.15s ease;
}
.social-links a:hover { color: var(--text); }
.social-links svg { width: 20px; height: 20px; }

/* Cart drawer */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 30;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  max-width: 380px;
  background: #0f0f0f;
  border-left: 1px solid var(--border);
  z-index: 31;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}
.cart-close {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

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

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

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; font-size: 0.9rem; }
.cart-item-meta { color: var(--text-dim); font-size: 0.78rem; margin-top: 2px; }

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.qty-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
}
.cart-item-remove {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.9rem;
}
.cart-item-remove:hover { color: var(--accent); }
.cart-item-price { font-weight: 700; white-space: nowrap; }

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

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checkout-form input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
}
.checkout-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
}
.btn-whatsapp:hover { opacity: 0.9; }
.btn-whatsapp:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 640px) {
  .catalog {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 14px;
  }
  .product-image { padding: 10px; font-size: 0.75rem; }
  .product-info { padding: 10px 12px 12px; gap: 6px; }
  .product-name { font-size: 0.85rem; }
  .btn-add { font-size: 0.78rem; padding: 8px; }
  .size-btn { padding: 3px 7px; font-size: 0.7rem; }
}

/* Página de detalle de producto */
.product-detail-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px 10px;
}

.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.detail-image-wrap { width: 100%; }
.detail-image {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.3rem;
  text-align: center;
  padding: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.85);
  overflow: hidden;
}

.detail-video-wrap { padding: 0; }
.detail-video-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: black;
}

.detail-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.detail-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
}
.detail-thumb.active { border-color: var(--accent); }
.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: rgba(0,0,0,0.35);
  font-size: 0.7rem;
}

.detail-info { display: flex; flex-direction: column; gap: 14px; }
.detail-info h1 { font-size: 1.5rem; }

.detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 1.3rem;
}
.detail-price-row .price-final { color: var(--accent); font-weight: 800; }
.detail-price-row .price-original { font-size: 1rem; }

.detail-sizes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.detail-qty {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.qty-control {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 14px;
}
.qty-control button {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  width: 20px;
}

.detail-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.btn-add-outline {
  flex: 1;
  min-width: 160px;
  background: transparent;
  border: 1px solid var(--text);
  color: var(--text);
  padding: 13px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}
.btn-add-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-add-outline:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-buy-now {
  flex: 1;
  min-width: 160px;
  background: var(--accent);
  border: none;
  color: white;
  padding: 13px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}
.btn-buy-now:hover { opacity: 0.9; }
.btn-buy-now:disabled { opacity: 0.4; cursor: not-allowed; }

.detail-stock-msg { font-size: 0.78rem; color: var(--text-dim); min-height: 1em; }

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