/* style.css */
* { margin:0; padding:0; box-sizing:border-box; font-family:'Arial',sans-serif; }
:root {
  --primary-color: #527e58;
  --secondary-color: #b9c4cc;
  --text-color: #333;
  --white: #fff;
}

/* ===== Global ===== */
body { padding-top: 60px; /* espacio para header fijo */ }
a { text-decoration:none; color:inherit; }
section { padding:4rem 2rem; }

/* ===== Header & Nav ===== */
header {
  background: var(--primary-color);
  position: fixed; top:0; width:100%; z-index:1000;
}
nav {
  display:flex; align-items:center; justify-content:space-between;
  max-width:1200px; margin:0 auto; padding:0.5rem 1rem;
}
.logo-container { display:flex; align-items:center; gap:0.5rem; }
.logo-img { height:40px; }
.brand-name { color:var(--white); font-size:1.25rem; font-weight:bold; }
.menu-toggle {
  display:none; background:none; border:none; font-size:1.5rem;
  color:var(--white); cursor:pointer;
}
.nav-links { display:flex; gap:1.5rem; }
.nav-links a {
  color:var(--white); font-weight:500; padding:0.25rem;
}
.nav-links a.active,
.nav-links a:hover { border-bottom:2px solid var(--white); }

/* ===== Hero & Carousel ===== */
.hero { background: var(--secondary-color); text-align:center; }
.carousel {
  position:relative; overflow:hidden; max-width:800px; margin:2rem auto;
}
.carousel-track { display:flex; transition:transform .5s ease; }
.carousel-track img { width:100%; flex-shrink:0; }
.carousel-btn {
  position:absolute; top:50%; transform:translateY(-50%);
  background:rgba(0,0,0,0.3); border:none; font-size:2rem;
  color:var(--white); cursor:pointer; padding:0 .5rem;
}
.carousel-btn.prev { left:0; }
.carousel-btn.next { right:0; }
.featured { max-width:1200px; margin:2rem auto; }
.featured h2 { margin-bottom:1rem; }

/* ===== Productos ===== */
.products-grid {
  display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr));
  gap:2rem; align-items:start; margin:10px auto; max-width:1200px;
}
.products-grid .product-card {
  background: linear-gradient(145deg, #ffffff, #f1f1f1);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.products-grid .product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* Tarjeta en sección featured (inicio) */
.featured .product-card {
  background: linear-gradient(145deg, #bfcad2, #a3adb5);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.product-image-container { position:relative; }
.product-image { width:100%; display:block; }
.product-overlay {
  position:absolute; inset:0; background:rgba(0,0,0,0.4);
  display:flex; align-items:center; justify-content:center; opacity:0;
  transition:opacity .3s;
}
.product-image-container:hover .product-overlay { opacity:1; }
.product-info { padding:1rem; text-align:center; }
.product-info h3 { margin-bottom:.5rem; color:var(--text-color); }
.product-info p { color:var(--text-color); }

/* ===== Botones ===== */
.view-all,
.view-more-btn,
button[type="submit"] {
  display:inline-block; background:var(--primary-color);
  color:var(--white); border:none; padding:.5rem 1rem;
  border-radius:4px; cursor:pointer; transition:background .2s;
  font-weight:500;
}
.view-all:hover,
.view-more-btn:hover,
button[type="submit"]:hover { background:#3e5e43; }

/* ===== Modal ===== */
.modal {
  position:fixed; top:0; left:0; right:0; bottom:0;
  background:rgba(0,0,0,0.6); display:none;
  align-items:center; justify-content:center; z-index:10000;
}
.modal.active { display:flex; }
.modal-content {
  background:var(--white); padding:1rem; border-radius:8px; position:relative;
}
.close-modal {
  position:absolute; top:.5rem; right:.5rem; background:none;
  border:none; font-size:1.5rem; cursor:pointer;
}
.modal-image {
  max-width:90vw; max-height:80vh;
}

/* ===== Info Sections ===== */
.info-section {
  background:#f9f9f9; max-width:800px; margin:0 auto;
}
.info-section h2 { margin-bottom:1rem; color:var(--text-color); }
.info-section p { line-height:1.6; margin-bottom:1rem; }

/* ===== Contact Form ===== */
.contact-form {
  display:grid; gap:1rem; margin-top:1rem;
}
.contact-form input,
.contact-form textarea {
  width:100%; padding:.5rem; border:1px solid #ccc; border-radius:4px;
  font-family:'Arial',sans-serif;
}

/* ===== Footer ===== */
footer {
  background:var(--text-color); color:var(--white); padding:2rem 1rem;
}
.footer-content { text-align:center; }

/* ===== Responsive ===== */
@media(max-width:768px) {
  .menu-toggle { display:block; }
  .nav-links {
    position:absolute; top:60px; right:0; background:var(--primary-color);
    flex-direction:column; width:200px; display:none;
  }
  .nav-links.open { display:flex; }
  .products-grid {
    grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
  }
  .carousel-btn { font-size:1.5rem; }
}

/* ===== Botones de categoría ===== */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 2rem;
}
.category-btn {
  padding: 0.5rem 1rem;
  border: 2px solid var(--primary-color);
  background: var(--white);
  color: var(--primary-color);
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.category-btn.active,
.category-btn:hover {
  background: var(--primary-color);
  color: var(--white);
}


/* ===== Carrusel en cada tarjeta ===== */
.card-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 3;       /* mantiene una relación ancho:alto */
  border-radius: 8px 8px 0 0;
}
.card-track {
  display: flex;
  transition: transform 0.3s ease;
  height: 100%;
  align-items: anchor-center;
}
.card-slide {
  flex-shrink: 0;
  width: 100%;
  height: 110%;
  object-fit: contain;       /* muestra toda la imagen */
  object-position: center;   /* centra la imagen en el contenedor */
}
/* Flechas */
.card-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.prev-btn { left: 8px; }
.next-btn { right: 8px; }


/* ===== Sección de Contacto ===== */
.contact-section {
  display: flex;
  justify-content: center;
  padding: 4rem 1rem;
  background: var(--secondary-color);
}

.contact-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-card h2 {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  text-align: center;
  font-size: 2rem;
}

.contact-card p {
  margin-bottom: 1.5rem;
  color: var(--text-color);
  text-align: center;
  line-height: 1.5;
}

.contact-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 600px) {
  .contact-info {
    grid-template-columns: repeat(3, 1fr);
  }
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.info-item .icon {
  width: 32px;
  height: 32px;
  color: var(--primary-color);
  flex-shrink: 0;
}

.info-item h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-color);
}

.info-item p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-color);
  line-height: 1.3;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

.btn-submit {
  align-self: center;
  padding: 0.75rem 2rem;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-submit:hover {
  background: #3e5e43;
}

