:root {
    --fuenteHeading: 'PT Sans', sans-serif;
    --fuenteParrafo: 'Open Sans', sans-serif;
    --primario: #54b427;
    --blanco: #ffffff;
    --negro: #000000;
}

html {
    box-sizing: border-box;
    font-size: 62.5%; /*1rem = 10px*/
}
*, *::before, *::after {
    box-sizing: inherit;
}
body {
    font-family: var(--fuenteParrafo);
    font-size: 1.6rem;
    line-height: 2;
}

/*GLOBALES*/ 
.contenedor {
    max-width: 120rem;
    width: 90%;
    margin: 0 auto; /*ESTO CENTRA EL CONTENIDO HORIZONTALMENTE EN LA PANTALLA*/
}
.contenedor2 {
    max-width: 120rem;
    width: 90%;
    margin: 0 auto; /*ESTO CENTRA EL CONTENIDO HORIZONTALMENTE EN LA PANTALLA*/
}
a {
    text-decoration: none;
}
h1, h2, h3, h4 {
    font-family: var(--fuenteHeading);
}
h1 {
    font-size: 4.8rem;
}
h2 {
    font-size: 4rem;
}
@media (max-width: 480px) {
    h2 {
        font-size: 3.8rem;
        line-height: 5rem;
    }
}
h3 {
    font-size: 3.2rem;
    line-height: 3.8rem;
}
h4 {
    font-size: 2.8rem;
}
img {
    max-width: 100%;
}

/*UTILIDADES*/
.no-margin {
    margin: 0;
}
.no-padding {
    padding: 0;
}
.centrar-texto {
    text-align: center;
}
.justificar {
    text-align: justify;
}
 /*Header*/
 .header {
    background-image: url(../img/invernaderos1.png);
    background-position-y: -18rem !important;
    height: 50rem;
    background-size: cover; /*Se usa para que cubra todo el espacio*/
    background-repeat: no-repeat; /*De esta forma no se repite la imagen en el fondo*/
    background-position: center center; /*Centra vertical y horizontalmente*/
 }
 .header2 {
    background-image: url(../img/nosotros1.png);
    background-position-y: -18rem !important;
    height: 50rem;
    background-size: cover; /*Se usa para que cubra todo el espacio*/
    background-repeat: no-repeat; /*De esta forma no se repite la imagen en el fondo*/
    background-position: center center; /*Centra vertical y horizontalmente*/
 }
 .header3 {
    background-image: url(../img/invernaderos2.png);
    background-position-y: -18rem !important;
    height: 50rem;
    background-size: cover; /*Se usa para que cubra todo el espacio*/
    background-repeat: no-repeat; /*De esta forma no se repite la imagen en el fondo*/
    background-position: center center; /*Centra vertical y horizontalmente*/
 }
 .header4 {
    background-image: url(../img/bsf_drop.jpg);
    background-position-y: -10rem !important;
    height: 50rem;
    background-size: cover; /*Se usa para que cubra todo el espacio*/
    background-repeat: no-repeat; /*De esta forma no se repite la imagen en el fondo*/
    background-position: center center; /*Centra vertical y horizontalmente*/
 }
 .header5 {
    background-image: url(../img/planta1.jpg);
    background-position-y: -10rem !important;
    height: 50rem;
    background-size: cover; /*Se usa para que cubra todo el espacio*/
    background-repeat: no-repeat; /*De esta forma no se repite la imagen en el fondo*/
    background-position: center center; /*Centra vertical y horizontalmente*/ 
 }
 .header6 {
        background-image: url(../img/msn_home.webp);
        background-position-y: -8rem !important;
        height: 50rem;
        background-size: cover; /*Se usa para que cubra todo el espacio*/
        background-repeat: no-repeat; /*De esta forma no se repite la imagen en el fondo*/
        background-position: center center; /*Centra vertical y horizontalmente*/
    }
     .header7 {
    background: linear-gradient(135deg, #000000, #717171); /* degradado moderno */
    height: 10rem;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;

    display: flex;
    align-items: center;
    justify-content: center;

    color: white;
    font-size: 2rem;
    font-weight: bold;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

 .header__texto {
    color: whitesmoke;
    text-align: center;
    margin-top: 5rem;
 }
 /* PRODUCTOS */
 .productos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 8rem;
  }

  .producto {
    border: 1px solid #000000;
    border-radius: 3rem;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }

  .carrusel {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
  }

  .carrusel-inner {
    display: flex;
    width: 100%;
    height: 100%;
    animation: deslizar 12s infinite;
  }

  .carrusel-item {
    width: 100%;
    flex-shrink: 0;
  }

  .carrusel-item img,
  .carrusel-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  @keyframes deslizar {
    0%   { transform: translateX(0%); }
    33%  { transform: translateX(0%); }
    38%  { transform: translateX(-100%); }
    66%  { transform: translateX(-100%); }
    71%  { transform: translateX(-200%); }
    100% { transform: translateX(-200%); }
  }

  .producto h4 {
    margin: 0;
    padding: 0.5rem 1rem;
  }

  .producto p {
    padding: 0 1rem 1rem;
    text-align: justify;
  }

 @media (min-width: 768px) {
    .header__texto {
        margin-top: 15rem;
    }
 }
 .social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem; /* separación entre iconos */
  margin-bottom: 0.4rem;
}

.social-links a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: #f5f5f5;
  color: #333;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.social-links a:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* Colores específicos de cada red */
.social-links .whatsapp { color: #25D366; }
.social-links .facebook { color: #1877F2; }
.social-links .instagram { 
  background: linear-gradient(45deg, #fd1d1d, #fcb045, #833ab4);
  color: #fff;
}
.social-links .tiktok { color: #000; }

 /* MÓVILES */
 @media(max-width: 480px) {
    .header__texto {
        margin-top: 8rem;
    }
    .header__texto h2 {
        font-size: 2rem;
    }
    .header__texto p {
        font-size: 1.5rem !important;
    }
    .header {
        height: 60rem;
        width: 100%;
        margin-bottom: -18rem;
    }
    /* NOSOTROS MOVIL */
    .header2 {
        height: 45rem;
        width: 100%;
        margin-bottom: -12rem;
        background-position-y: -12rem !important;
    }
    /* ACABA */
    .header3 {
        height: 45rem;
        width: 100%;
        margin-bottom: -12rem;
        background-position-y: -12rem !important;
    }
    .header4 {
        background-image: url(../img/bsf_drop.jpg);
        background-position-y: -1rem !important;
        height: 50rem;
        background-size: cover; /*Se usa para que cubra todo el espacio*/
        background-repeat: no-repeat; /*De esta forma no se repite la imagen en el fondo*/
        background-position: center center; /*Centra vertical y horizontalmente*/
    }
   .header5 {
    background-image: url(../img/planta1.jpg);
    background-position-y: -10rem !important;
    height: 50rem;
    background-size: cover; /*Se usa para que cubra todo el espacio*/
    background-repeat: no-repeat; /*De esta forma no se repite la imagen en el fondo*/
    background-position: center center; /*Centra vertical y horizontalmente*/ 
 }
 .header6 {
        background-image: url(../img/msn_home.webp);
        background-position-y: -1rem !important;
        height: 50rem;
        background-size: cover; /*Se usa para que cubra todo el espacio*/
        background-repeat: no-repeat; /*De esta forma no se repite la imagen en el fondo*/
        background-position: center center; /*Centra vertical y horizontalmente*/
    }
.header7 {
    background: linear-gradient(135deg, #000000, #717171); /* degradado moderno */
    height: 10rem;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    margin-bottom: 2rem;

    display: flex;
    align-items: center;
    justify-content: center;

    color: white;
    font-size: 2rem;
    font-weight: bold;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
}
.contenedor video {
    margin-top: -8rem;
}
    .productos {
    display: inline-block;
    padding: 3rem;
  }
    .productos h1 {
        margin-top: -4rem;
    }
    .producto {
        margin-top: 3rem;
    }
 .contenedor2 {
    max-width: 120rem;
    width: 90%;
    margin: 0 auto; /*ESTO CENTRA EL CONTENIDO HORIZONTALMENTE EN LA PANTALLA*/
    margin-top: -8rem;
    display: block !important;
}
.contenedor2 h3 {
    margin-bottom: 2.5rem !important;
}
.contenedor2 img {
    margin-bottom: 3rem;
}
    .logo__nombre {
        font-size: 4rem;
    }
    .navegacion {
        justify-content: center;
        display: flex;
        gap: 2rem;
        font-weight: 600;
    }
    .navegacion__enlace {
        background-color: rgba(0, 0, 0, 0.856);
        border-radius: 1rem;
        padding: 1rem;
        padding-top: 0rem;
        padding-bottom: 0rem;

    }
    .navegacion__enlace2 {
        background-color: rgba(255, 255, 255, 0.856);
        border-radius: 1rem;
        padding: 1rem;
        padding-top: 0rem;
        padding-bottom: 0rem;

    }
    .blog h3 {
       display: flex;
       justify-content: center;
    }
    .sidebar h3 {
        display: flex;
       justify-content: center;
    }
    .barra p {
        margin-left: 4rem !important;
    }
 }
@media (min-width: 768px) {
    .img-nosotros {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 5rem;
 }
}
 
 @media (min-width: 768px) {
    .barra {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
 }
.logo {
    color: var(--blanco);
}

.logo__nombre {
    font-weight: normal;
}
.logo__bold {
    font-weight: bold;
}
@keyframes parpadeo {
    0% { opacity: 1; }
    100% { opacity: 0.7; }
}

.navegacion__enlace {
    display: block; /*PARA QUE ELEMENTOS SE POSICIONEN UNO DEBAJO DEL OTRO*/
    text-align: center;
    font-size: 2rem;
    color: var(--blanco);
}
.navegacion__enlace--activo, .navegacion__enlace:hover, .navegacion__enlace2:hover {
    font-weight: bold;
    color: rgb(62, 204, 6);
    animation: parpadeo 0.5s infinite alternate;
    transition: 300ms ease-in-out;
}

@media (min-width: 768px) {
    .navegacion {
        display: flex;
        gap: 2rem;
    }
}

@media (min-width: 768px) {
    .contenido-principal {
        display: grid;
        grid-template-columns: 2fr 1fr;
        column-gap: 4rem;
    }
}
.entrada {
    border-bottom: 1px solid rgb(36, 3, 3);
    margin-bottom: 2rem;
}
.entrada:last-of-type {
    border: none;
    margin-bottom: 0;
}
.boton {
    display: block;
    font-family: var(--fuenteHeading);
    color: var(--blanco);
    text-align: center;
    padding: 1rem 3rem;
    font-size: 1.8rem;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 2rem;
}
@media (min-width: 768px) {
    .boton {
        display: inline-block; /*No funciona el margin ni el widht con inline, por lo que se debe usar inline-block*/
    }
}
.boton--primario {
    background-color: var(--negro);
}
.boton--primario:hover {
    background-color: rgb(164, 149, 39);
    transition: ease 0.5s;
}
.boton--secundario {
    background-color: var(--primario);
}
.boton--secundario:hover {
    background-color: rgb(0, 0, 0);
    transition: ease 0.5s;
}
.cursos {
    list-style: none;
}
.widget-curso {
    border-bottom: 1px solid rgb(197, 188, 188);
}
.widget-curso:last-of-type {
    border: none;
    margin-bottom: 0;
}
.widget-curso__label {
    font-family: var(--fuenteHeading);
    font-weight: bold;
}
.widget-curso__info {
    font-weight: normal;
}
.footer {
    background-color: var(--negro);
}
@media (min-width: 768px) {
    .barra {
        margin-left: 1.2rem;
    }
    .navegacion__enlace:last-of-type{
        margin-right: 1.3rem;
    }
}

/*Contacto*/
.error {
    background-color: rgb(185,0,0);
    text-align: center;
    padding: 1rem;
    color: var(--blanco);
    text-transform: uppercase;
}
.enviado {
    background-color: rgb(4, 133, 25);
    text-align: center;
    padding: 1rem;
    color: var(--blanco);
    text-transform: uppercase;
}
@media (max-width:480px) {
    .contacto-bg {
    background-image: url(../img/acuaponia7.jpg);
    height: 30rem;
    margin-bottom: -20rem;
    background-size: cover;
    background-repeat: no-repeat;
    background-position-y: -10rem !important;
}
}
.contacto-bg {
    background-image: url(../img/acuaponia7.jpg);
    height: 30rem;
    background-size: cover;
    background-repeat: no-repeat;
    background-position-y: -20rem;
}

.formulario {
    background-color: var(--blanco);
    margin: -5rem auto 0 auto;
    width: 90%;
    padding: 3rem;
}
@media (min-width: 768px) {
    .formulario {
        background-color: var(--blanco);
        margin: -5rem auto 0 auto;
        width: 95%;
        padding: 3rem;
    }
}
.formulario legend {
    font-family: var(--fuenteParrafo);
    font-weight: bold;
    text-align: center;
    margin-bottom: 2rem;
}
.formulario fieldset {
    border: none;
}
@media (min-width: 768px) {
    .contenedor-campos {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto auto 20rem;
        column-gap: 1.5rem;
 }
 .campo:nth-child(3) {
    grid-column: 1/3; /*De esta forma se define el área la cuál abarcará nuestro objeto*/
}
.campo-mensaje:nth-child(4) {
    grid-column: 1/3;
}   
}
.campo {
    margin-bottom: 1rem;
}
.campo label, .campo-mensaje {
    color: var(--negro);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}
.contenedor textarea {
    height: 10rem;
    resize: none;
}
.input {
    width: 100%;
    border-style: double;
    border-radius: 1rem;
    padding: 1rem;
}
.enviar {
    position: relative;
}
@media (max-width: 480px) {
    .enviar {
        position: relative;
        top: 0.1rem;
    }  
}
.enviar .boton {
    width: 100%;
    background-color: var(--negro);
}
@media (min-width: 768px) {
    .enviar .boton {
        width: auto;
            
    }
    .enviar .boton:hover {
        background-color: rgb(36, 3, 3);
        cursor: pointer;
    }
}
.entrada__imagen {
    width: 60%;
    display: block;
    margin: auto;
}
/* Cambia el color de la barra del timer */
.my-timer .swal2-timer-progress-bar {
  background: #00cc99 !important;  /* Cambia este color */
}
.carrito-icono {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    cursor: pointer;
    font-weight: bold;
    z-index: 1000;
}

/* #carrito {
    position: fixed;
    border-radius: 3rem;
    right: 1rem;
    top: 4rem;
    background-color: #ffffff;
    border: 1px solid #ccc;
    padding: 1rem;
    width: 300px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.514);
    z-index: 999;
} */
 #carrito {
    position: fixed;
    right: 20px;
    top: 70px;
    width: 300px;
    max-height: 80vh; /* evita que crezca más del 80% de la altura visible */
    overflow-y: auto;  /* permite hacer scroll vertical si hay muchos productos */
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 15px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.667);
    z-index: 1000;
    border-radius: 13px;
}

/* mejora el scroll visual */
#carrito::-webkit-scrollbar {
    width: 8px;
}
#carrito::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

#btn-pagar {
  display: none; /* Oculto por defecto */
  background-color: #28a745;
  color: white;
  font-weight: bold;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.oculto {
    display: none;
}

.carrito-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.carrito-item img {
    width: 100%;
    height: 55px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-right: 1rem;
}

.boton--pagar, .boton--paypal {
    background-color: #28a745;
    color: white;
    padding: 0.5rem;
    margin-top: 1rem;
    border: none;
    border-radius: 1rem;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.804);
}

.boton--paypal {
    background-color: #0070ba;
}
input,
select,
textarea {
  font-size: 16px; /* Evita el zoom en iOS */
}

.modal {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    background: #fefefe;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1100;
    width: 90%;
    max-width: 480px;
    font-family: 'Segoe UI', sans-serif;
    transition: all 0.3s ease;
}

.modal-title {
    text-align: center;
    margin-bottom: 1.5rem;
    margin-top: -0.5rem;
    font-size: 2.5rem;
    font-weight: 600;
    color: #333;
}

.modal input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    border: none;
    border-radius: 0.75rem;
    background: #f2f2f2;
    box-shadow: inset 2px 2px 6px rgba(0, 0, 0, 0.05),
                inset -2px -2px 6px rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    color: #000000;
    outline: none;
    transition: 0.2s;
}

.modal input:focus {
    background: #eaeaea;
    box-shadow: 0 0 0 2px #89c4f4;
}
.modal select {
    display: block;
    width: 100%;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 0.6rem;
    font-size: 1rem;
    background-color: white;
    transition: border-color 0.3s ease;
}

.modal select:focus {
    border-color: #4CAF50;
}

.modal-botones {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.boton {
    padding: 1rem 2rem;
    font-size: 1.25rem;
    font-weight: 600;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background 0.3s ease;
    min-width: 180px;
}

.boton--pagar {
    margin-top: 2rem;
    margin-bottom: -0.5rem;
    background-color: #2d89ef;
    color: white;
}

.boton--pagar:hover {
    background-color: #1b6fc2;
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.642);
    z-index: 1000;
}

 .producto-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1rem auto;
}

.input-cantidad {
    width: 80px;
    padding: 0.4rem;
    margin-bottom: 0.5rem;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
}

.precio-producto {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.boton--agregar {
    background-color: #007bff;
    color: white;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.boton--agregar:hover {
    background-color: #0056b3;
}
.carrito-controles {
    display: flex;
    align-items: center;
    gap: 5px;
}

.carrito-controles button {
    background-color: #ddd;
    border: none;
    padding: 3px 8px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
}

.carrito-controles button:hover {
    background-color: #ccc;
}

.promo-popup {
  border: 3px solid black !important;
  box-shadow: 0 0 20px 5px rgba(177, 164, 19, 0.749);
  border-radius: 12px;
}
.promo-button {
  font-size: 1.4rem !important;
  font-weight: bold;
  padding: 0.75rem 1.5rem !important;
  color: black !important;
  background-color: #259f0d !important;
  border-radius: 3px !important;
}
.swal2-title {
    margin-top: -2rem;
    color: black !important; /* Aplica al título y texto */
    font-size: 2rem;
    font-weight: bolder;
}
.swal2-html-container {
  color: black !important; /* Aplica al título y texto */
  font-size: 1.25rem;
}
.swal2-timer-progress-bar {
  background: rgb(64, 148, 16) !important; /* Cambia el color de la barra */
  height: 3px;
}
@media (max-width: 600px) {
  .swal2-popup.promo-popup {
    width: 90% !important;
  }
  .swal2-title {
    font-size: 1.5rem;
  }
  .swal2-html-container {
    font-size: 1rem;
  }
  .promo-button {
    font-size: 1.1rem !important;
    padding: 0.6rem 1rem !important;
  }
}
/* CHATBOT */
#chatbot-icon {
  position: fixed;
  bottom: 20px;
  left: 20px;  /* Ícono a la izquierda */
  cursor: pointer;
  z-index: 9999;
  border-radius: 100%; /* Ícono redondeado */
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.826);
  transition: transform 0.3s ease;
}

#chatbot-icon:hover {
  transform: scale(1.1);
}

#chatbot-window {
  display: none;
  position: fixed;
  bottom: 90px;
  left: 20px; /* Ventana también a la izquierda */
  width: 300px;
  max-height: 400px;
  background: #f5f5f5;
  border: 2px solid #28a745;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.25);
  font-family: Arial, sans-serif;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.chat-header {
  background: #28a745;
  color: white;
  padding: 0.75rem;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  font-weight: bold;
  text-align: center;
}

.chat-body {
  padding: 1rem;
  overflow-y: auto;
  flex-grow: 1;
  font-size: 0.9rem;
  line-height: 1.3;
}

.chat-body p {
  margin: 0.5rem 0;
}

#chat-input {
  border: none;
  border-top: 1px solid #ccc;
  padding: 0.75rem;
  font-size: 1rem;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  box-sizing: border-box;
  outline: none;
}
