/* =========================================
   1. VARIABLES & RESET (Autocontenido)
   ========================================= */
:root {
  --bg-dark: #050a14;
  --bg-card: #0f1623;
  --brand: #fff404;       /* Amarillo Neón */
  --brand-2: #00f2ea;     /* Cyan */
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --border-glass: rgba(255, 255, 255, 0.08);
  --header-h: 90px;
  --radius: 16px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
button { cursor: pointer; font-family: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* =========================================
   2. HEADER (Glassmorphism)
   ========================================= */
.site-header { position: fixed; top: 0; width: 100%; z-index: 1000; padding: 1rem 0; }

.header-inner.glass-panel {
  max-width: 1200px; margin: 0 auto;
  background: rgba(5, 10, 20, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 100px;
  padding: 0.5rem 2rem;
  display: flex; justify-content: space-between; align-items: center;
}

.brand img { height: 120px; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5)); }

.desktop-nav { display: flex; gap: 2rem; }
.desktop-nav a { font-weight: 600; opacity: 0.7; font-size: 0.95rem; }
.desktop-nav a:hover, .desktop-nav a.active { opacity: 1; color: var(--brand); }

.nav-toggle { display: none; background: none; border: none; color: white; font-size: 1.8rem; }
.mobile-menu {
    display: none; position: absolute; top: 90px; left: 1rem; right: 1rem;
    background: rgba(15, 22, 35, 0.95); backdrop-filter: blur(10px);
    padding: 1.5rem; border-radius: 20px; border: 1px solid var(--border-glass);
    flex-direction: column; gap: 1.2rem; text-align: center; font-size: 1.1rem;
}
.mobile-menu.open { display: flex; }

@media(max-width: 900px) {
  .desktop-nav { display: none; }
  .nav-toggle { display: block; }
}

/* =========================================
   3. PAGE HERO & LAYOUT
   ========================================= */
.page-hero {
  margin-top: 120px; text-align: center; margin-bottom: 3rem;
  border-bottom: 1px solid var(--border-glass); padding-bottom: 2rem;
}
.page-hero h1 {
  font-size: 2.5rem; font-weight: 900; margin: 0;
  background: linear-gradient(to right, #fff, #ccc);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.page-hero p { color: var(--text-muted); font-size: 1.1rem; margin-top: 0.5rem; }

.main-content { padding-bottom: 5rem; }

/* =========================================
   4. GRID & CARDS (Nuevo Diseño)
   ========================================= */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex; flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.15);
}

/* Imagen */
.card-image-wrap {
  position: relative; height: 250px; overflow: hidden; background: #000;
}
.card-image-wrap img {
  width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease;
}
.product-card:hover .card-image-wrap img { transform: scale(1.1); }

/* Badge */
.card-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,0.7); color: var(--brand);
  padding: 0.3rem 0.7rem; border-radius: 6px; font-size: 0.8rem; font-weight: 700;
  backdrop-filter: blur(4px); border: 1px solid rgba(255,244,4,0.2);
}

/* Contenido */
.card-content { padding: 1.2rem; flex: 1; display: flex; flex-direction: column; }
.card-content h3 { margin: 0 0 0.5rem; font-size: 1.2rem; line-height: 1.3; }
.card-price { font-size: 1.3rem; font-weight: 700; color: var(--text-main); margin-bottom: 1rem; }
.card-actions { margin-top: auto; }

.btn-card {
  width: 100%; padding: 0.8rem; border-radius: 10px; border: none;
  background: rgba(255,255,255,0.05); color: white; font-weight: 600;
  border: 1px solid var(--border-glass); transition: 0.3s;
}
.btn-card:hover { background: var(--brand); color: black; border-color: var(--brand); }

/* =========================================
   5. MODAL (Rediseñado)
   ========================================= */
.modal {
  position: fixed; inset: 0; z-index: 2000;
  display: none; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal.show { display: flex; opacity: 1; pointer-events: auto; }

.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(5px); }

.modal-dialog {
  position: relative; width: min(900px, 90%); background: #0f1623;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.6); overflow: hidden;
  transform: translateY(20px); transition: transform 0.3s;
}
.modal.show .modal-dialog { transform: translateY(0); }

.modal-close {
  position: absolute; top: 15px; right: 15px; z-index: 10;
  background: rgba(0,0,0,0.5); color: white; border: none;
  width: 36px; height: 36px; border-radius: 50%; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.modal-close:hover { background: var(--brand); color: black; }

.modal-body { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 768px) { .modal-body { grid-template-columns: 1fr; } }

/* Imagen Modal */
.modal-media { background: #000; height: 100%; min-height: 300px; position: relative; }
.modal-media img { width: 100%; height: 100%; object-fit: cover; }

/* Contenido Modal */
.modal-content { padding: 2rem; display: flex; flex-direction: column; }
.modal-content h2 { font-size: 1.8rem; margin: 0 0 0.5rem; line-height: 1.1; }

.modal-meta-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-price { font-size: 1.6rem; font-weight: 700; color: var(--brand); }
.modal-stock { font-size: 0.9rem; color: var(--brand-2); background: rgba(0, 242, 234, 0.1); padding: 0.2rem 0.6rem; border-radius: 4px; }

.modal-desc { color: #cbd5e1; font-size: 1rem; line-height: 1.6; margin-bottom: 1.5rem; }

.modal-section { margin-bottom: 1.5rem; }
.modal-section h4 { margin: 0 0 0.8rem; font-size: 0.9rem; text-transform: uppercase; color: #64748b; }

/* Chips de Tallas */
.chips-container { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.size-chip {
  background: transparent; border: 1px solid rgba(255,255,255,0.2); color: white;
  padding: 0.5rem 1rem; border-radius: 8px; transition: 0.2s;
}
.size-chip:hover { border-color: white; }
.size-chip[aria-pressed="true"] { background: var(--text-main); color: black; border-color: white; font-weight: bold; }

/* Botones Modal */
.phone-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--text-muted); font-size: 0.9rem; transition: 0.2s;
}
.phone-btn:hover { color: white; }

.btn-whatsapp {
  width: 100%; padding: 1rem; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white; font-weight: 700; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center; gap: 0.8rem;
  transition: transform 0.2s;
}
.btn-whatsapp:hover { transform: scale(1.02); box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2); }
/* ... (Mantén las variables, reset, header y modal igual que antes) ... */

/* =========================================
   HERRAMIENTAS (BUSCADOR)
   ========================================= */
.tools-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-wrapper i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.2rem;
}

.search-wrapper input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-glass);
  padding: 0.8rem 1rem 0.8rem 2.8rem;
  border-radius: 50px;
  color: white;
  font-size: 1rem;
  outline: none;
  transition: 0.3s;
}

.search-wrapper input:focus {
  border-color: var(--brand);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 15px rgba(255, 244, 4, 0.1);
}

.results-count {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* =========================================
   PAGINACIÓN
   ========================================= */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-glass);
}

.page-btn {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand);
}

.page-btn.active {
  background: var(--brand);
  color: black;
  border-color: var(--brand);
  font-weight: bold;
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}