/* === ESTILO GENERAL === */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === HEADER === */
header {
  background: linear-gradient(90deg, #00bcd4, #0097a7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 5%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

/* LOGO */
.logo img {
  width: 60px;
}

/* NAV */
nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 5px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.3s;
}

nav a:hover {
  background-color: white;
  color: black;
}

/* === CONTENIDO === */
.contenido {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 110px 15px 40px;
  text-align: center;
  flex: 1;
}

/* TITULO */
.contenido h1 {
  font-size: 2.5em;
}

/* === CAJAS === */
.seccion-box {
  width: 100%;
  max-width: 800px;
  margin: 20px auto;
  padding: 25px;
  border: 2px solid #00bcd4;
  border-radius: 15px;
  background-color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-align: left;
}

/* === GRID PRODUCTOS === */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  margin: auto;
}

.producto-card {
  background: #fff;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: 0.3s;
}

.producto-card:hover {
  transform: translateY(-5px) scale(1.03);
}

/* === TABLA PRO (MEJORADA) === */
table {
  width: 100%;
  max-width: 850px;
  margin: 30px auto;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  font-size: 15px;
}

/* HEADER TABLA */
table th {
  background: linear-gradient(90deg, #00bcd4, #0097a7);
  color: white;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px;
  font-weight: bold;
  border: none;
}

/* CELDAS */
table td {
  padding: 14px;
  border-bottom: 1px solid #eee;
  color: #333;
}

/* HOVER FILAS */
table tr {
  transition: 0.3s;
}

table tr:hover {
  background: #f2fcfd;
  transform: scale(1.01);
}

/* FILAS ALTERNADAS */
table tr:nth-child(even) {
  background-color: #fafafa;
}

/* ÚLTIMA FILA */
table tr:last-child td {
  border-bottom: none;
}

/* === FORMULARIO === */
.formulario,
.formulario-contacto {
  width: 100%;
  max-width: 500px;
  margin: 30px auto;
  padding: 25px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* === CONTACTO === */
.contacto-contenedor {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  width: 100%;
  max-width: 1000px;
  margin: auto;
}

.cuadro-info,
.formulario-contacto {
  flex: 1 1 350px;
}

/* === CARRITO === */
.carrito-header a {
  color: white;
  font-size: 1.5rem;
  position: relative;
}

#contador-carrito {
  position: absolute;
  top: -8px;
  right: -12px;
  background: red;
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 50%;
}

/* === RESPONSIVE === */

/* TABLET */
@media (max-width: 1000px) {
  .productos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* MÓVIL */
@media (max-width: 768px) {

  header {
    flex-direction: column;
    gap: 10px;
  }

  nav {
    justify-content: center;
  }

  .contenido {
    padding: 130px 10px 40px;
  }

  .productos-grid {
    grid-template-columns: 1fr;
  }

  .contacto-contenedor {
    flex-direction: column;
  }

  .contenido h1 {
    font-size: 1.8em;
  }

  table {
    font-size: 13px;
  }

  table th,
  table td {
    padding: 10px;
  }
}