@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* Variables globales */
:root {
  --primary: #4CAF50;
  --secondary: #388e3c;
  --accent: #FFC107;
  --text: #333;
  --light: #f9f9f9;
  --dark: #2c3e50;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --trans: all 0.3s ease;
}

/* Reset y estilos base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  margin-bottom: 15px;
  font-weight: 600;
}

a {
  text-decoration: none;
  color: var(--text);
  transition: var(--trans);
}

ul {
  list-style: none;
}

/* Botones */
.btn {
  display: inline-block;
  background-color: var(--primary);
  color: white;
  padding: 12px 25px;
  border-radius: 30px;
  font-weight: 600;
  text-transform: uppercase;
  transition: var(--trans);
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.btn:hover {
  background-color: var(--secondary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.btn-small {
  padding: 8px 18px;
  font-size: 12px;
}

 /* Fondo borroso */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(8px);
  background-color: rgba(0, 0, 0, 0.3);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-box {
  background: white;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: fadeIn 0.3s ease-in-out;
}

.modal-box img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin-top: 10px;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.btn-full {
  width: 100%;
}

/* Títulos de sección */
.section-title {
  text-align: center;
  margin-bottom: 40px;
  font-size: 32px;
  color: var(--dark);
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--primary);
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* Header y navegación */
header {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo h1 {
  font-size: 28px;
  margin: 0;
  display: flex;
  align-items: center;
}

.logo .mf {
  color: #000;
  font-weight: bold;
  margin-right: 4px;
}

.logo .verde {
  color: #008000;
  font-weight: bold;
}

.logo span {
  color: var(--primary);
}

nav ul {
  display: flex;
}

nav ul li {
  margin-left: 25px;
}

nav ul li a {
  font-weight: 500;
  position: relative;
  padding-bottom: 5px;
}

nav ul li a::after {
  content: '';
  width: 0;
  height: 2px;
  background-color: var(--primary);
  position: absolute;
  bottom: 0;
  left: 0;
  transition: var(--trans);
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

nav ul li a.active {
  color: var(--primary);
}

.categoria {
  cursor: pointer;
}

/* Carrusel */
.hero {
  background-color: var(--light);
  padding: 0;
  overflow: hidden;
}

.carousel-container {
  position: relative;
  overflow: hidden;
  height: 500px;
}

.carousel-slide {
  display: none;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: var(--light);
  transition: opacity 0.6s ease-in-out;
  opacity: 0;
}

.carousel-slide.active {
  display: flex;
  opacity: 1;
}

.carousel-slide .content {
  flex: 1;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.carousel-slide .image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide img {
  max-width: 100%;
  height: auto;
  max-height: 400px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.carousel-slide h2 {
  font-size: 42px;
  margin-bottom: 20px;
}

.carousel-slide p {
  font-size: 18px;
  margin-bottom: 30px;
}

.carousel-controls {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.prev-btn, .next-btn {
  background-color: rgba(255, 255, 255, 0.7);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--trans);
}

.prev-btn:hover, .next-btn:hover {
  background-color: var(--primary);
  color: white;
}

.carousel-dots {
  display: flex;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--trans);
}

.dot.active {
  background-color: var(--primary);
}

/* Categorías */
.categorias {
  padding: 80px 0;
  background-color: var(--light);
}

.categoria-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.categoria {
  background-color: white;
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 30px;
  text-align: center;
  flex: 1;
  min-width: 250px;
  transition: var(--trans);
}

.categoria:hover {
  transform: translateY(-10px);
}

.categoria-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 30px;
}

/* Productos */
.productos {
  padding: 80px 0;
  background-color: white;
}

.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.producto {
  background-color: var(--light);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--trans);
}

.producto:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.producto-img {
  position: relative;
  overflow: hidden;
}

.producto-img img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.producto:hover .producto-img img {
  transform: scale(1.05);
}

.producto-tag {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: var(--accent);
  color: var(--dark);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.producto-info {
  padding: 20px;
}

.product-desc {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
  height: 40px;
  overflow: hidden;
}

.producto-precio {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 15px;
}

.btn-comprar {
  width: 100%;
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--trans);
  display: block; 
  text-align: center;
  text-decoration: none; /* Necesario para <a> */
  box-sizing: border-box; 
  font-family: inherit;
}

.btn-comprar:hover {
  background-color: var(--secondary);
}

/* Reset básico para <button> */
button.btn-comprar {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  line-height: inherit;
}

/* Sobre Nosotros */
.about {
  padding: 80px 0;
  background-color: var(--light);
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
}

.about-text {
  flex: 1;
  min-width: 300px;
  max-width: 60%;
}

.about-text .section-title {
  text-align: left;
}

.about-text .section-title::after {
  left: 0;
  transform: none;
}

.about-features li {
  margin-bottom: 15px;
}

.about-features li i {
  color: var(--primary);
  margin-right: 10px;
}

.about-image {
  flex: 0 0 35%;
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.about-image:hover img {
  transform: scale(1.02);
}

/* Testimonios */
.testimonios {
  padding: 80px 0;
  background-color: white;
}

.testimonios-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.testimonio {
  background-color: var(--light);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 30px;
  display: flex;
  gap: 20px;
  flex: 1;
  min-width: 300px;
  transition: var(--trans);
}

.testimonio:hover {
  transform: translateY(-5px);
}

.testimonio-imagen img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
}

.testimonio-contenido {
  flex: 1;
}

.testimonio-contenido p {
  font-style: italic;
  margin-bottom: 15px;
  color: #555;
  position: relative;
}

.testimonio-autor {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.estrellas {
  color: var(--accent);
}

/* Contacto */
.contacto {
  padding: 80px 0;
  background-color: var(--light);
}

.contacto-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.contacto-info, .contacto-form {
  flex: 1;
  min-width: 300px;
}

.contacto-item {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
}

.contacto-item i {
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-right: 20px;
}

.contacto-redes {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.contacto-redes a {
  width: 40px;
  height: 40px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contacto-form {
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: 'Montserrat', sans-serif;
}

.form-group textarea {
  height: 150px;
  resize: none;
}

/* Footer */
footer {
  background-color: var(--dark);
  color: white;
  padding: 60px 0 0;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col {
  flex: 1;
  min-width: 250px;
}

.footer-col h4 {
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  background-color: var(--primary);
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: white;
  opacity: 0.8;
}

.footer-col ul li a:hover {
  opacity: 1;
  color: var(--primary);
  padding-left: 5px;
}

.footer-form {
  display: flex;
  margin-top: 20px;
}

.footer-form input {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 30px 0 0 30px;
}

.btn-footer {
  padding: 0 20px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 0 30px 30px 0;
  cursor: pointer;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  text-align: center;
}

/* Mapa */
.contacto-mapa h3 {
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 1.2em;
}

/* Responsive */
@media screen and (max-width: 992px) {
  .carousel-slide {
    flex-direction: column;
    padding: 20px;
  }
  
  .carousel-slide .content {
    padding: 20px;
    text-align: center;
  }
  
  .about-content {
    flex-direction: column;
  }
  
  .about-text, .about-image {
    max-width: 100%;
  }
}

@media screen and (max-width: 768px) {
  header .container {
    flex-direction: column;
    padding: 15px;
  }
  
  nav ul {
    margin-top: 15px;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .carousel-container {
    min-height: 450px;
  }
  
  .testimonio {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .contacto-item {
    flex-direction: column;
    text-align: center;
  }
  
  .contacto-item i {
    margin-right: 0;
    margin-bottom: 15px;
  }
}

@media screen and (max-width: 576px) {
  .btn {
    padding: 10px 20px;
    font-size: 12px;
  }
  
  .categoria {
    min-width: 100%;
  }
  
  .productos-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-form {
    flex-direction: column;
  }
  
  .footer-form input {
    border-radius: 30px;
    margin-bottom: 10px;
  }
  
  .btn-footer {
    width: 100%;
    border-radius: 30px;
    padding: 12px;
  }
}

/* Estilos adicionales para el catálogo en productos.html*/
.catalog-hero {
  background: linear-gradient(135deg, #2c5530 0%, #4a7c59 100%);
  color: white;
  text-align: center;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.catalog-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
  animation: float 20s infinite linear;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
  }
}

.catalog-hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.catalog-hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  position: relative;
  z-index: 2;
}

.products-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.filter-bar {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 3rem;
  border: 2px solid #e8f5e8;
}

.filter-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 0.8rem 1.5rem;
  border: 2px solid #4a7c59;
  background: white;
  color: #4a7c59;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-btn:hover,
.filter-btn.active {
  background: #4a7c59;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(74, 124, 89, 0.3);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.product-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  border: 3px solid transparent;
  position: relative;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  border-color: #4a7c59;
}

.product-card.highlighted {
  border-color: #f39c12;
  box-shadow: 0 0 30px rgba(243, 156, 18, 0.3);
  animation: highlight-glow 2s ease-in-out;
}

@keyframes highlight-glow {
  0%,
  100% {
    box-shadow: 0 0 30px rgba(243, 156, 18, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(243, 156, 18, 0.6);
  }
}

/* .product-card.highlighted::before {
  content: "⭐ PRODUCTO DESTACADO";
  position: absolute;
  top: 15px;
  right: -90px;
  background: #f39c12;
  color: white;
  padding: 8px 40px;
  font-size: 0.8rem;
  font-weight: bold;
  transform: rotate(45deg);
  z-index: 10;
  letter-spacing: 1px;
} */

.product-image {
  height: 250px;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.2s ease;
}

.product-image:hover img {
  transform: scale(1.03);
}
.product-info {
  padding: 2rem;
}

.product-category {
  display: inline-block;
  background: #4a7c59;
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.product-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2c5530;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.product-description {
  color: #666;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.product-features {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.product-features li {
  padding: 0.5rem 0;
  color: #4a7c59;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-features li::before {
  content: "✓";
  background: #4a7c59;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

.product-actions {
  display: flex;
  gap: 1rem;
}

.btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #4a7c59 0%, #2c5530 100%);
  color: white;
  padding: 1rem;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(74, 124, 89, 0.4);
}

.btn-secondary {
  padding: 1rem;
  border: 2px solid #4a7c59;
  background: white;
  color: #4a7c59;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.btn-secondary:hover {
  background: #4a7c59;
  color: white;
  transform: scale(1.1);
}

.back-to-home {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #4a7c59;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(74, 124, 89, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
}

.back-to-home:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 30px rgba(74, 124, 89, 0.4);
}

@media (max-width: 768px) {
  .catalog-hero h1 {
    font-size: 2rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .filter-buttons {
    justify-content: center;
  }

  .filter-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .product-actions {
    flex-direction: column;
  }
}
