/* ====== Variables de color ====== */
:root {
  --primary-color: #222;
  /* Fondo principal oscuro */
  --accent-color: #002fff;
  /* Color de acento (naranja vibrante) */
  --text-color: #fff;
  --secondary-text: #ccc;
  --card-bg: #2c2c2c;
  --border-color: #444;
  --radius: 12px;
  --transition: all 0.3s ease;
}

/* ====== Reset básico ====== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: var(--primary-color);
  color: var(--text-color);
  line-height: 1.5;
  padding: 0;
}

/* ====== Encabezado ====== */
header {
  text-align: center;
  padding: 1rem;
  background-color: var(--card-bg);
  border-bottom: 2px solid var(--border-color);
}

header h1 {
  font-size: 2rem;
}

header h1 span {
  color: var(--accent-color);
}

.social-buttons {
  margin-top: 0.5rem;
}

.social-buttons img {
  transition: transform 0.2s;
}

.social-buttons img:hover {
  transform: scale(1.1);
}

/* ====== Contenedor ====== */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 1rem;
}

/* ====== Filtros ====== */
.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.filters input[type="search"] {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: #1a1a1a;
  color: var(--text-color);
}

.filters button {
  background: var(--accent-color);
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.filters button:hover {
  background: #00e043;
}

/* ====== Lista de productos ====== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  max-width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  height: 200px;
}

.card h4 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.card small {
  color: var(--secondary-text);
}

.card p {
  margin: 0.3rem 0;
}

.size-select {
  width: 100%;
  padding: 0.4rem;
  margin: 0.5rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: #1a1a1a;
  color: white;
}

.addToCartBtn {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  width: 100%;
  transition: var(--transition);
}

.addToCartBtn:hover {
  background: #25e000;
}

/* ====== Carrito ====== */
.cart-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--card-bg);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 9999;
}

.cart-container h3 {
  margin-bottom: 1rem;
}

.cart-container ul {
  list-style: none;
}

.qty-btn {
  background: var(--accent-color);
  border: none;
  padding: 0.3rem 0.6rem;
  margin: 0 0.2rem;
  color: white;
  border-radius: var(--radius);
  cursor: pointer;
}

.qty-btn:hover {
  background: #e03e00;
}

.removeBtn {
  color: #ff4d4d;
  cursor: pointer;
}

#checkoutBtn {
  margin-top: 1rem;
  background: var(--accent-color);
  border: none;
  color: white;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
}

#checkoutBtn:hover {
  background: #e03e00;
}

/* ====== Responsivo ====== */
@media (max-width: 600px) {
  .filters {
    flex-direction: column;
  }
}

.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.4s ease; /* animación entrada */
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  animation: zoomIn 0.4s ease; /* animación del contenido */
}

/* Botón cerrar */
.closeBtn {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease, color 0.3s ease;
}

.closeBtn:hover {
  color: #ff4444;
  transform: rotate(90deg) scale(1.2); /* efecto dinámico */
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}


.footer {
  background-color: #333;
  color: #fff;
  padding: 20px 0;
  font-size: 14px;
}

.footer-content {
  display: flex;
  justify-content: space-around;
  padding: 0 20px;
}

.footer-section {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s, transform 0.2s;
  max-width: 200px;
}

.footer-section h3 {
  font-size: 16px;
  margin-bottom: 10px;
  color: #164cfd;
}

.footer-section p,
.footer-section ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-section a {
  color: #fff;
  text-decoration: none;
  display: block;
  margin: 5px 0;
}

.footer-section a:hover {
  color: #16fd22;
  /* Cambio de color al pasar el mouse */
  transform: scale(1.05);
  /* Pequeña animación */
  text-decoration: underline;
}

/* Estilos de redes sociales */
.social-links {
  display: flex;
  gap: 10px;
}

.social-links a {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
}

.social-links a:hover {
  color: #164cfd;
}

/* Estilos del pie de página inferior */
.footer-bottom {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
}

/* Animación de entrada */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fadeIn {
  animation: fadeIn 0.4s ease forwards;
}

/* Animación de salida */
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.fadeOut {
  animation: fadeOut 0.4s ease forwards;
}


/* Responsive para móviles */
@media (max-width: 600px) {
  .modal-content {
    width: 95% !important;
    max-width: 95% !important;
    padding: 20px;
    border-radius: 10px;
    font-size: 14px; /* texto más compacto */
  }

  .modal-content h2 {
    font-size: 18px;
  }

  .modal-content p {
    font-size: 14px;
    line-height: 1.4;
  }

  .closeBtn {
    font-size: 24px;
    top: 10px;
    right: 12px;
  }
}
