/* ========================= */
/* ESTILOS GENERALES */
/* ========================= */

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  font-family:Arial, Helvetica, sans-serif;
  background:#f4f4f4;
  color:#222;
  transition:.3s;
}

/* ========================= */
/* MODO OSCURO */
/* ========================= */

body.dark{
  background:#111;
  color:white;
}

/* ========================= */
/* CONTENEDOR */
/* ========================= */

.container{
  width:90%;
  max-width:1200px;
  margin:auto;
}

/* ========================= */
/* HEADER */
/* ========================= */

.header{
  background:white;
  position:sticky;
  top:0;
  z-index:1000;
  box-shadow:0 2px 10px rgba(0,0,0,.1);
}

body.dark .header{
  background:#1b1b1b;
}

.nav{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:15px 0;
}

.nav h1{
  color:green;
}

.nav nav{
  display:flex;
  gap:20px;
}

.nav nav a{
  text-decoration:none;
  color:inherit;
  font-weight:bold;
  transition:.3s;
}

.nav nav a:hover{
  color:green;
}

.acciones{
  display:flex;
  gap:10px;
}

.acciones button{
  border:none;
  background:green;
  color:white;
  padding:10px 14px;
  border-radius:10px;
  cursor:pointer;
  font-size:16px;
}

/* ========================= */
/* HERO */
/* ========================= */

.hero{
  padding:60px 0;
}

.hero-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:40px;
  align-items:center;
}

.hero h2{
  font-size:55px;
  margin-bottom:20px;
  line-height:1.1;
}

.hero p{
  font-size:18px;
  margin-bottom:25px;
  color:#555;
}

body.dark .hero p{
  color:#ccc;
}

.hero img{
  width:100%;
  border-radius:20px;
  box-shadow:0 10px 20px rgba(0,0,0,.2);
}

/* ========================= */
/* BOTONES */
/* ========================= */

.btn{
  display:inline-block;
  background:green;
  color:white;
  padding:14px 25px;
  border-radius:12px;
  text-decoration:none;
  border:none;
  cursor:pointer;
  font-weight:bold;
  transition:.3s;
}

.btn:hover{
  background:#0d5f0d;
  transform:translateY(-3px);
}

/* ========================= */
/* SECCIONES */
/* ========================= */

section{
  padding:60px 0;
}

section h2{
  font-size:40px;
  margin-bottom:25px;
}

/* ========================= */
/* CARDS */
/* ========================= */

.cards{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:20px;
}

.card,
.promo,
.producto{
  background:white;
  border-radius:20px;
  padding:20px;
  box-shadow:0 5px 15px rgba(0,0,0,.08);
  transition:.3s;
}

.card:hover,
.promo:hover,
.producto:hover{
  transform:translateY(-5px);
}

body.dark .card,
body.dark .promo,
body.dark .producto,
body.dark .carrito{
  background:#1f1f1f;
}

/* ========================= */
/* PROMOCIONES */
/* ========================= */

.promo h3{
  color:green;
  margin-bottom:10px;
}

/* ========================= */
/* BUSCADOR */
/* ========================= */

#buscador{
  width:100%;
  padding:15px;
  border-radius:12px;
  border:1px solid #ccc;
  margin-bottom:30px;
  font-size:16px;
}

/* ========================= */
/* PRODUCTOS */
/* ========================= */

.productos-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:25px;
}

.producto img{
  width:100%;
  height:200px;
  object-fit:cover;
  border-radius:15px;
  margin-bottom:15px;
}

.producto h3{
  margin-bottom:10px;
}

.producto p{
  margin-bottom:15px;
  color:green;
  font-weight:bold;
}

/* ========================= */
/* FORMULARIOS */
/* ========================= */

.formulario{
  display:grid;
  gap:15px;
}

.formulario input,
.formulario select,
.formulario textarea{
  padding:15px;
  border-radius:12px;
  border:1px solid #ccc;
  font-size:16px;
}

.formulario textarea{
  min-height:120px;
  resize:none;
}

/* ========================= */
/* CARRITO */
/* ========================= */

.carrito{
  position:fixed;
  top:0;
  right:0;
  width:360px;
  height:100vh;
  background:white;
  box-shadow:-5px 0 15px rgba(0,0,0,.15);
  padding:20px;
  overflow-y:auto;
  z-index:9999;

  transform:translateX(100%);
  transition:.3s;
}

.carrito.abierto{
  transform:translateX(0);
}

body.dark .carrito{
  background:#1f1f1f;
}

.carrito h2{
  margin-bottom:20px;
}

#itemsCarrito{
  margin-bottom:20px;
}

#itemsCarrito div{
  margin-bottom:10px;
  padding-bottom:10px;
  border-bottom:1px solid #ddd;
}

/* ========================= */
/* RESPONSIVE */
/* ========================= */

@media(max-width:1000px){

  .productos-grid{
    grid-template-columns:repeat(2,1fr);
  }

  .cards{
    grid-template-columns:repeat(2,1fr);
  }

  .hero-grid{
    grid-template-columns:1fr;
  }

}

@media(max-width:700px){

  .nav{
    flex-direction:column;
    gap:15px;
  }

  .nav nav{
    flex-wrap:wrap;
    justify-content:center;
  }

  .productos-grid{
    grid-template-columns:1fr;
  }

  .cards{
    grid-template-columns:1fr;
  }

  .hero h2{
    font-size:40px;
  }

  .carrito{
    width:100%;
  }

}
.productos-section {
  padding: 50px 20px;
  background: #f7f7f7;
  text-align: center;
}

.productos-section h2 {
  font-size: 32px;
  margin-bottom: 10px;
  color: #1f3d2b;
}

.productos-section p {
  color: #555;
  margin-bottom: 25px;
}

.buscador-productos {
  width: 100%;
  max-width: 450px;
  padding: 14px;
  border: 1px solid #ccc;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 16px;
}

.filtros-productos {
  margin-bottom: 30px;
}

.filtros-productos button {
  padding: 10px 18px;
  margin: 5px;
  border: none;
  border-radius: 20px;
  background: #1f7a3a;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

.filtros-productos button:hover {
  background: #145c2b;
}

.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: auto;
}

.producto-card {
  background: white;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  transition: transform 0.2s;
}

.producto-card:hover {
  transform: translateY(-5px);
}

.producto-card img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  margin-bottom: 10px;
}

.producto-card h3 {
  font-size: 18px;
  color: #222;
  margin-bottom: 8px;
}

.producto-card .precio {
  font-size: 20px;
  font-weight: bold;
  color: #1f7a3a;
  margin-bottom: 12px;
}

.producto-card button {
  width: 100%;
  padding: 10px;
  background: #ff8c00;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
}

.producto-card button:hover {
  background: #e67c00;
}
/* botn de precios */
.selector-unidad {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border-radius: 10px;
  border: 2px solid #e0e0e0;
  background: white;
  font-size: 15px;
  cursor: pointer;
  outline: none;
  transition: 0.3s;
}

.selector-unidad:focus {
  border-color: #0a8f2d;
}

.cantidad-piezas {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border-radius: 10px;
  border: 2px solid #e0e0e0;
  font-size: 15px;
  outline: none;
  transition: 0.3s;
  box-sizing: border-box;
}

.cantidad-piezas:focus {
  border-color: #0a8f2d;
}

.btn {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #0a8f2d, #13b83f);
  color: white;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 5px 12px rgba(0,0,0,0.15);
}

.btn:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, #087525, #0fa337);
}

.btn:active {
  transform: scale(0.97);
}

/* ========================= */
/* CARRITO PRO */
/* ========================= */

.carrito{
  position:fixed;
  top:0;
  right:0;
  width:370px;
  height:100vh;
  background:white;
  padding:25px;
  box-shadow:-10px 0 25px rgba(0,0,0,.15);
  overflow-y:auto;
  z-index:9999;

  transform:translateX(100%);
  transition:.3s;
}

.carrito.abierto{
  transform:translateX(0);
}

body.dark .carrito{
  background:#1f1f1f;
  color:white;
}

/* HEADER */

.carrito-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:25px;
}

.carrito-header h2{
  font-size:28px;
}

#cerrarCarrito{
  background:none;
  border:none;
  font-size:30px;
  cursor:pointer;
  color:red;
}

/* ITEMS */

#itemsCarrito{
  display:flex;
  flex-direction:column;
  gap:15px;
}

.item-carrito{
  background:#f5f5f5;
  border-radius:15px;
  padding:15px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

body.dark .item-carrito{
  background:#2b2b2b;
}

.item-carrito strong{
  font-size:18px;
}

.item-carrito p{
  margin:0;
  color:#555;
}

body.dark .item-carrito p{
  color:#ddd;
}

/* BOTON ELIMINAR */

.item-carrito button{
  background:#ff3b3b;
  color:white;
  border:none;
  padding:10px;
  border-radius:10px;
  cursor:pointer;
  font-weight:bold;
}

/* TOTAL */

.carrito-total{
  margin-top:25px;
  padding-top:20px;
  border-top:2px solid #ddd;
}

.carrito-total h3{
  font-size:25px;
}

/* BOTON WHATSAPP */

.btn-whatsapp{
  width:100%;
  margin-top:20px;
  background:#25D366;
  color:white;
  border:none;
  padding:15px;
  border-radius:15px;
  font-size:17px;
  font-weight:bold;
  cursor:pointer;
}