/* Estilos Generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
}

/* Variables de color */
:root {
    --bg-color: #fff;
    --text-color: #333;
    --card-bg: #fff;
    --border-color: #ddd;
    --shadow-color: rgba(0,0,0,0.1);
    --bg-product:#eeeeee;
    --background-image: linear-gradient(to right top, #051937, #004d7a, #008793, #00bf72, #a8eb12);
    --bg-navbar: rgba(255, 255, 255, 0.65);
    --emphasis: #15a000
}

[data-theme="dark"] {
    --bg-color: #0f121d;
    --text-color: #fff;
    --card-bg: #2d2d2d;
    --border-color: #444;
    --shadow-color: rgba(0,0,0,0.3);
    --bg-product:#121627;
    --background-image: linear-gradient(to right top, #a8eb12, #00bf72, #004d7a, #051937);
    --bg-navbar: rgba(0, 0, 0, 0.65);
    --emphasis:#051937;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Ajustar otros elementos para usar variables */
.producto-card,
.modal-content,
.carrito,

.grid-item {
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Botón de tema */
.theme-toggle {
    cursor: pointer;
    margin-left: 1rem;
    font-size: 1.2rem;
}

.theme-toggle i {
    color: var(--text-color);
}


/* Header/Menú */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--bg-navbar);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.1rem 5%;
    
}

a {
    text-decoration: none;
}
.logo img {
    height: 20px;
}

.menu-items {
    display: flex;
    list-style: none;
}

.menu-items li {
    margin: 0 1rem;
}

.menu-items a {
    text-decoration: none;
    color: var(--text-color);
    transition: border-bottom 0.3s ease;
}

.menu-items a:hover {
    border-bottom: 3px solid green;
}

.menu-items a.active {
    border-bottom: 3px solid green;
}

.cart-icon {
    position: relative;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
}

/* Slider Principal */

h1 {
    font-size: 2.3em;
    
    /* Añadir sombra para mejorar el efecto visual */
    text-shadow: 
      3px 3px 0 #003708, /* Sombra principal */
      -1px -1px 0 #00610f, 
      1px -1px 0 #00420a,
      -1px 1px 0 #00c81e,
      1px 1px 0 #00c81e;

}
#main-slider {
    height: 100vh;
    
    background-image: var(--background-image);
}

.slider-container {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.slider-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
    display: flex;
    padding: 2rem;
}

.slide-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
}

.slide-image img {
    max-width: 80%;
}

.slide-info {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color:white;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
}

.prev { left: 0; }
.next { right: 0; }

button {
    padding: 10px;
    border-radius: 25px;
    border: 1px solid white;
    background-color: WHITE;
}

.outline {
    background-color: transparent;
    border: 2px solid white;
    color: white;
}

.outline:hover {
    background-color: black;
    border: 2px solid rgb(0, 0, 0);
    color: white;
}

.cualidades{
    font-size: 0.75em;
}

/* Sección Empresa */
#empresa {
    margin: auto;
    color:white;
    
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    color:red;
}

.grid-item {
    text-align: center;
    padding: 2rem;
    color:white;
}

.grid-item i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color:white;
}

.grid-item:nth-child(1) {
    background-color: #75b409; /* Rojo */
}

.grid-item:nth-child(2) {
    background-color: #017c31; /* Verde azulado */
}

.grid-item:nth-child(3) {
    background-color: #147d92; /* Azul claro */
}

.grid-item:nth-child(4) {
    background-color: #033b8a; /* Naranja */
}

.nosotros {
    color:var(--text-color);
    width: 100%;
    margin: auto;
    display: flex;
}
.mision {
   width: 50%;
    padding:0px 50px 0px 150px;
    margin: auto;
    text-align: justify;

}

.mision img {
    width: 50%;
}
.flor {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
}
.lab {
    width: 50%;
}
/* Sección Productos */
#productos {
    padding: 4rem 5%;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

img.slide{
    width: 85%;
}

img {
    width: 100%; /* Mantiene el tamaño actual para las imágenes fuera del slider */
}

.producto-card {
    padding: 1rem;
    text-align: center;
    background-color: var(--bg-product);
}

.producto-card img{width: 60%;
}
/* Estilo general para los botones dentro de .producto-card */
/* Estilos para la cuadrícula de productos */
.productos-grid .producto-card {
    /* Añade estilos para la tarjeta del producto si es necesario */
    margin: 10px;
    padding: 15px;
    
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

/* Estilo para el botón "Ver más" en productos */
.productos-grid button[onclick^="mostrarModal"] {
    background-color: #15a000; /* Naranja */
    color: white;
    border: none;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 30px; /* Botones más redondeados */
    transition: background-color 0.3s, transform 0.3s;
}

.productos-grid button[onclick^="mostrarModal"]:hover {
    background-color: #000; /* Naranja más oscuro al pasar el ratón */
    transform: translateY(-2px); /* Ligero efecto de elevación */
}

/* Estilo para el botón "Añadir al carrito" en productos */
.productos-grid button[onclick^="agregarAlCarrito"] {
    background-color: #051937; /* Azul */
    color: white;
    border: none;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 30px; /* Botones más redondeados */
    transition: background-color 0.3s, transform 0.3s;
}

.productos-grid button[onclick^="agregarAlCarrito"]:hover {
    background-color: #628f02; /* Azul más oscuro al pasar el ratón */
    transform: translateY(-2px); /* Ligero efecto de elevación */
}

/* Sección Testimonios */
#testimonios {
    text-align: center;
}

.gallery {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100vh;
    background-color:var(--bg-color);
}

.gallery-item {
    position: relative;
    width: 30%;
    height: 90%;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    text-align: center;
}

.gallery-item:hover .overlay {
    opacity: 0; /* Ocultar el overlay al hacer hover */
}


.overlay h2 {
    margin-bottom: 10px;
}

.overlay p {
    padding: 0 20px;
}


/* Footer */
footer {
    background: #333;
    color: white;
    padding: 4rem 5%;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.suscripcion{
    display: flex;
    flex-direction: column;
    margin: auto;
    gap: 5px;
}

.suscripcion button{
    width: 150px;
    background: var(--emphasis);
    color:white;
    padding: 8px 5px;
    margin: auto;
    border: none;
}
input{
    border-radius: 5px;
    border: none;
    padding:3px;
}
.footer-content a {
    color: white;
    text-decoration: none;
}

/* Modal CHECKOUT*/

.pedido {
    padding: 5px;
}
.pedido input {
   gap: 1px;
    padding: 5px;
    margin: 5px;
    border: 1px solid rgb(77, 77, 77);
}

.enviarPedido, .realizarPedido {
    background-color: var(--emphasis);
    color:white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1001;
    overflow-y: auto; /* Permite el scroll vertical */
}

.modal-content {
    margin: auto;
    width: 50%; /* Ocupa todo el ancho */
    min-height: 100vh; /* Altura mínima igual al viewport */
    position: relative;
    padding: 2rem;
    padding-top: 4rem; /* Espacio para el botón de cerrar */
    font-size: 0.85em;
}

.close {
    position: fixed; /* Posición fija */
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    background: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1002; /* Asegura que esté sobre todo el contenido */
    color:var(--text-color);
}

.close:hover {
    background: #f0f0f0;
}

/* Estilos para el contenido del modal */
.modal-producto {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.modal-producto img {
    max-width: 50%;
    height: auto;
}

.modal-producto table {
    width: 100%;
    margin: 1rem 0;
    border-collapse: collapse;
}

.modal-producto table th,
.modal-producto table td {
    border: 1px solid #ddd;
    padding: 0.5rem;
    text-align: left;
}

.modal-producto h2,
.modal-producto h3 {
    margin: 1.5rem 0 1rem;
}

.modal-producto ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.modal-producto .precio {
    font-size: 1.5rem;
    color: #333;
    margin: 1rem 0;
}

.modal-producto button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    cursor: pointer;
    margin: 1rem 0;
    border-radius: 4px;
}

.modal-producto button:hover {
    background: #45a049;
}


/* Carrito */
.carrito {
    position: fixed;
    right: -400px;
    top: 70px;
    width: 400px;
    height: calc(100vh - 70px);
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
}

.carrito-items{
    width: 55%;
    margin-bottom: 1rem;
}
.carrito.active {
    right: 0;
}

.carrito-content {
    padding: 2rem;
    flex: 1;
    overflow-y: auto; /* Permite scroll */
}
.carrito-total {
    padding: 1rem;
    background: var(--bg-color);
    border-top: 1px solid #ddd;
    position: sticky;
    bottom: 0;
}

.item-info input {
    border: 1px solid #5f5f5f;
}
/*CHECKOUT*/

table {
    border: 1px solid #5f5f5f;
    border-collapse: collapse;
}

td, th {
    border: 1px solid #5f5f5f;
    padding:5px;
}

th {
   font-weight: bolder;
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mision {
        padding: 0px 25px 0px 50px ;
    }
}

@media (max-width: 768px) {
    .menu-items {
        display: none;
    }
    
    .nosotros {
        text-align: center;
        width: 100%;
        margin: auto;
        display: flex;
        flex-direction: column;
    }
    .mision {
        width: 90%;
        text-align: justify;
        margin-top: 25px;
        padding:0px 10px 0px 10px;
        }
    
    .mision img {
        width: 80%;
        margin: auto;
    }

    .lab {
        width: 100%;
    }
    .footer-content {
        grid-template-columns: 1fr;
    }
    .producto-card img{
        width: 80%;
    }
    .modal-content {
        width: 90%; /* Ocupa todo el ancho */
    }
}
@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 100%; /* Ocupa todo el ancho */
    }
    .slide {
        flex-direction: column;
    }
    .slide-image {
       width: 80%;
    margin: auto;
        
    }
   
    .modal-producto img {
        max-width: 80%;
        height: auto;
    }

    .slide-info {
        margin: auto;
        align-items: center;
    }
    .productos-grid {
        grid-template-columns: 1fr;
    }
    
    .carrito {
        width: 100%;
        right: -100%;
    }

    .producto-card img{
        width:100%;
    }
    
    .footer-content {
        text-align: center;
    }
    
    .footer-content p {
        font-size: 0.8em;
    }
    .redes-sociales a {
        padding: 15px;
    }

    .gallery {
        flex-direction: column;
        align-items: center;
    }

    .gallery-item {
        position: relative;
        width: 100%; /* Por defecto en dispositivos pequeños */
        height: 300px; /* Ajusta según necesites */
        margin-bottom: 20px;
        overflow: hidden;
    }

    .gallery-item img {
        width: 100%;
        height: 300px;
        object-fit: cover;
        transition: all 0.3s ease;
    }
    

}

/* Menú hamburguesa */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .menu-items {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-navbar);
        padding: 1rem;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .menu-items.active {
        display: block;
    }

    .menu-items li {
        margin: 1rem 0;
        text-align: center;
    }
}
