* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f4f6f9;
  color: #333;
}

/* Navbar */
.navbar {
  background: #1a3b5d;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-item a {
  color: #ddd;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-item.active a,
.nav-item a:hover {
  color: #fff;
}

.nav-cart a {
  color: #fff;
  position: relative;
}

#cart-count {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #e74c3c;
  color: white;
  font-size: 0.8rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Contenedor */
.container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 20px;
}

/* Catálogo */
.catalogo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.search-box {
  padding: 0.8rem 1rem;
  border: 1px solid #ddd;
  border-radius: 50px;
  width: 250px;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s;
}

.search-box:focus {
  border-color: #1a3b5d;
  box-shadow: 0 0 0 3px rgba(26, 59, 93, 0.1);
}

.filter-buttons {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  background: #e0e0e0;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
  background: #1a3b5d;
  color: white;
}

/* Grid de Productos */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* Producto */
.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.4s ease;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
}

.product-card.show {
  opacity: 1;
  transform: translateY(0);
}

.product-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.product-img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  object-position: center;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
  border-radius: 8px 8px 0 0;
  max-width: 100%;
  margin: 0 auto;
  display: block;
}

.product-info {
  padding: 1rem;
}

.product-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.product-desc {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.8rem;
}

.product-price {
  font-size: 1.1rem;
  font-weight: bold;
  color: #e74c3c;
}

/* Skeleton Loader */
.product-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 12px;
  height: 300px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Modal del Carrito */
.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background: white;
  margin: 10% auto;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  border-radius: 12px;
  position: relative;
  animation: modalFadeIn 0.4s;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

.close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: #aaa;
}

.close:hover {
  color: #000;
}

#cart-items {
  list-style: none;
  margin: 1rem 0;
}

#cart-items li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

#enviar-cart {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  .nav-menu {
    gap: 1rem;
  }
}

.basketball {
  position: absolute;
  background: #fbc02d;
  color: #222;
  border-radius: 50%;
  font-weight: bold;
  font-size: 22px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  pointer-events: none;
  z-index: 1000;
  transition: opacity 0.3s;
}
