@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1e1e1e;
  --bg-filter: #131313;
  --border: #2a2a2a;
  --border-hover: #3a3a3a;
  --text-primary: #f0f0f0;
  --text-secondary: #888888;
  --text-muted: #555555;
  --accent: #e8ff00;
  --accent-dark: #b8cc00;
  --accent-glow: rgba(232, 255, 0, 0.12);
  --red: #ff4d4d;
  --badge-nuevo: #e8ff00;
  --badge-nuevo-text: #0a0a0a;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-modal: 0 24px 80px rgba(0,0,0,0.8);
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --transition: 0.2s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ========== NAVBAR ========== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.navbar-logo .logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.navbar-logo .logo-text span {
  color: var(--accent);
}

.navbar-search {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.navbar-search input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 1rem 0.6rem 2.8rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.navbar-search input::placeholder { color: var(--text-muted); }

.navbar-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.navbar-search .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.navbar-count {
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.navbar-count span {
  color: var(--accent);
  font-weight: 700;
}

/* ========== LAYOUT ========== */
.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 72px);
  max-width: 1600px;
  margin: 0 auto;
}

/* ========== SIDEBAR FILTERS ========== */
.sidebar {
  background: var(--bg-filter);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1.2rem;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.sidebar-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.btn-clear {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.78rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background var(--transition);
  display: none;
}

.btn-clear.visible { display: block; }
.btn-clear:hover { background: var(--accent-glow); }

/* Filter groups */
.filter-group {
  margin-bottom: 1.8rem;
}

.filter-group-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition);
  user-select: none;
}

.filter-option:hover { background: var(--bg-card-hover); }

.filter-option.active {
  background: var(--accent-glow);
  border: 1px solid rgba(232,255,0,0.2);
}

.filter-option-label {
  font-size: 0.87rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.filter-option.active .filter-option-label {
  color: var(--accent);
  font-weight: 600;
}

.filter-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 1px 6px;
  border-radius: 10px;
}

/* checkbox hidden, custom style */
.filter-option input[type="checkbox"] { display: none; }

.filter-checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  margin-right: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.filter-option.active .filter-checkbox {
  background: var(--accent);
  border-color: var(--accent);
}

.filter-option.active .filter-checkbox::after {
  content: '✓';
  font-size: 10px;
  color: #000;
  font-weight: 800;
}

.filter-left {
  display: flex;
  align-items: center;
}

/* ========== MAIN CONTENT ========== */
.main {
  padding: 1.5rem 2rem;
  min-width: 0;
}

/* Sort/View bar */
.content-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-glow);
  border: 1px solid rgba(232,255,0,0.25);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
  animation: tagIn 0.2s ease;
}

@keyframes tagIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.filter-tag:hover {
  background: rgba(232,255,0,0.2);
}

.filter-tag .tag-remove {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.7;
}

/* Sort select */
.sort-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.83rem;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
  flex-shrink: 0;
}

.sort-select:focus { border-color: var(--accent); }

/* ========== PRODUCT GRID ========== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

/* Product Card */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  animation: cardIn 0.3s ease both;
  position: relative;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card);
}

.product-card:hover .card-img {
  transform: scale(1.05);
}

.card-img-wrapper {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-secondary);
  position: relative;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-muted);
  background: linear-gradient(135deg, #1a1a1a, #222);
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--badge-nuevo);
  color: var(--badge-nuevo-text);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
}

.card-gender-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  color: var(--text-secondary);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
}

.card-body {
  padding: 0.9rem;
}

.card-brand {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.card-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  flex: 1;
}

.size-chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  max-width: 4;
}

.card-cat {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ========== NO RESULTS ========== */
.no-results {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  text-align: center;
  gap: 1rem;
  color: var(--text-muted);
}

.no-results .no-icon { font-size: 4rem; }
.no-results h3 { font-size: 1.1rem; color: var(--text-secondary); }
.no-results p { font-size: 0.87rem; }

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: var(--shadow-modal);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-img-side {
  background: var(--bg-secondary);
  aspect-ratio: 1/1;
  position: relative;
  overflow: hidden;
}

.modal-img-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--text-muted);
}

.modal-info-side {
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background var(--transition);
}

.modal-close:hover { background: rgba(255,255,255,0.1); }

.modal-brand {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
}

.modal-name {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
}

.modal-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

.modal-desc {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.modal-detail-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.modal-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal-size {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
}

.modal-colors {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.color-chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
}

.modal-divider {
  border: none;
  border-top: 1px solid var(--border);
}

.catalog-only-notice {
  background: var(--accent-glow);
  border: 1px solid rgba(232,255,0,0.2);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.8rem;
  color: var(--accent);
  text-align: center;
  font-weight: 500;
}

/* ========== FOOTER ========== */
.site-footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 3rem;
}

/* ========== LOADER ========== */
.loader-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  grid-column: 1/-1;
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: pulse 1.5s ease infinite;
}

.skeleton-img {
  aspect-ratio: 1/1;
  background: linear-gradient(90deg, #1a1a1a 25%, #222 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease infinite;
}

.skeleton-body { padding: 0.9rem; }
.skeleton-line {
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, #1a1a1a 25%, #222 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease infinite;
  margin-bottom: 8px;
}

.skeleton-line.short { width: 50%; }
.skeleton-line.medium { width: 75%; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
  }

  .sidebar-filters-toggle {
    display: flex;
  }

  .modal {
    grid-template-columns: 1fr;
    max-height: 95vh;
    overflow-y: auto;
  }

  .modal-img-side {
    aspect-ratio: 16/9;
  }
}

@media (max-width: 600px) {
  .navbar { padding: 0 1rem; gap: 0.75rem; }
  .navbar-count { display: none; }
  .main { padding: 1rem; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
}
