/* ================= VARIABLES ================= */
:root {
    --verde-toc: #51b827;
    --verde-oscuro: #2e7d32;
    --verde-header: #1b5e20;
    --gris-fondo: #f5f5f5;
    --gris-borde: #e0e0e0;
    --blanco: #ffffff;
    --texto-principal: #333333;
    --texto-secundario: #666666;
    --fuente-titulos: 'Montserrat', sans-serif;
    --fuente-texto: 'Roboto', sans-serif;
    --sombra-basica: 0 2px 5px rgba(0, 0, 0, 0.1);
    --transicion: all 0.2s ease-in-out;
}

/* ================= RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--blanco);
    color: var(--texto-principal);
    font-family: var(--fuente-texto);
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

h1, h2, h3, h4, h5 {
    font-family: var(--fuente-titulos);
}

/* ================= HEADER ================= */
.top-bar {
    background: var(--verde-header);
    color: var(--blanco);
    padding: 8px 20px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-contact {
    display: flex;
    gap: 20px;
}

.top-bar-contact i {
    margin-right: 5px;
    color: var(--verde-toc);
}

header {
    background: var(--blanco);
    box-shadow: var(--sombra-basica);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--verde-toc);
}

.nav-container {
    max-width: 1200px;
    margin: auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 28px;
    font-weight: 800;
    color: var(--verde-header);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    font-family: var(--fuente-titulos);
    font-weight: 600;
    font-size: 14px;
    color: var(--texto-principal);
    text-transform: uppercase;
    transition: var(--transicion);
}

.nav-links a:hover {
    color: var(--verde-toc);
}

.btn-catalogo {
    background: var(--verde-toc);
    color: var(--blanco) !important;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 700 !important;
}

.btn-catalogo:hover {
    background: var(--verde-oscuro);
}

.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--verde-header);
}

/* ================= ESTRUCTURA GENERAL ================= */
section {
    padding: 60px 20px;
}

.container {
    max-width: 1200px;
    margin: auto;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--verde-header);
    text-transform: uppercase;
    display: inline-block;
    position: relative;
    padding-bottom: 10px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--verde-toc);
}

.section-header p {
    font-size: 16px;
    color: var(--texto-secundario);
    margin-top: 15px;
}

/* ================= HERO ================= */
#hero {
    background: var(--gris-fondo);
    padding: 40px 20px;
    border-bottom: 1px solid var(--gris-borde);
}

.hero-wrapper {
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 50px;
    background: var(--blanco);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--sombra-basica);
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 42px;
    font-weight: 800;
    color: var(--verde-header);
    line-height: 1.2;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-text h1 span {
    color: var(--verde-toc);
}

.hero-text p {
    font-size: 18px;
    color: var(--texto-secundario);
    margin-bottom: 30px;
}

.hero-text ul {
    margin-bottom: 30px;
}

.hero-text li {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-text li i {
    color: var(--verde-toc);
    font-size: 20px;
}

.btn-main {
    display: inline-block;
    background: var(--verde-header);
    color: var(--blanco);
    padding: 15px 30px;
    font-family: var(--fuente-titulos);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    transition: var(--transicion);
}

.btn-main:hover {
    background: var(--verde-toc);
}

.hero-img {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
}

.hero-carousel {
    position: relative;
    width: 100%;
    max-width: 520px;
    height: 360px;
    margin: auto;
    overflow: hidden;
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.hero-carousel::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 2px solid rgba(81, 184, 39, 0.2);
    pointer-events: none;
}

.carousel-slide {
    position: absolute;
    top: 20px;
    left: 20px;
    width: calc(100% - 40px);
    height: calc(100% - 40px);
    object-fit: contain;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

/* ================= PRODUCTOS ================= */
#productos {
    background: var(--gris-fondo);
    border-top: 1px solid var(--gris-borde);
    border-bottom: 1px solid var(--gris-borde);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--blanco);
    border: 1px solid var(--gris-borde);
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transicion);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--verde-toc);
}

.product-img-wrapper {
    height: 250px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--gris-borde);
    background: var(--blanco);
}

.product-img-wrapper img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-sku {
    font-size: 12px;
    color: var(--verde-toc);
    font-weight: 700;
    margin-bottom: 5px;
}

.product-info h4 {
    font-size: 18px;
    color: var(--verde-header);
    margin-bottom: 10px;
}

.product-info p {
    font-size: 14px;
    color: var(--texto-secundario);
    margin-bottom: 20px;
    flex-grow: 1;
}

.product-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.btn-ver-producto {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--verde-toc);
    border: 2px solid var(--verde-toc);
    color: var(--blanco);
    padding: 10px;
    font-family: var(--fuente-titulos);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    border-radius: 4px;
    transition: var(--transicion);
    cursor: pointer;
}

.btn-ver-producto:hover {
    background: var(--verde-oscuro);
    border-color: var(--verde-oscuro);
}

.btn-cotizar {
    display: block;
    width: 100%;
    text-align: center;
    background: transparent;
    border: 2px solid var(--verde-header);
    color: var(--verde-header);
    padding: 10px;
    font-family: var(--fuente-titulos);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    border-radius: 4px;
    transition: var(--transicion);
}

.btn-cotizar:hover {
    background: var(--verde-header);
    color: var(--blanco);
}

/* ================= NOSOTROS ================= */
#nosotros {
    background: var(--blanco);
}

.nosotros-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.nosotros-img {
    width: 100%;
    padding: 25px;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    text-align: center;
}

.nosotros-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    display: block;
}

.nosotros-text h3 {
    font-size: 28px;
    color: var(--verde-header);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.nosotros-text p {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--texto-secundario);
}

/* ================= MAYORISTAS ================= */
#mayoristas {
    background: var(--verde-header);
    color: var(--blanco);
    text-align: center;
    padding: 80px 20px;
}

.mayoristas-content {
    max-width: 800px;
    margin: auto;
}

.mayoristas-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.mayoristas-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn-whatsapp {
    display: inline-block;
    background: #25d366;
    color: var(--blanco);
    padding: 15px 40px;
    font-family: var(--fuente-titulos);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    transition: var(--transicion);
}

.btn-whatsapp:hover {
    background: #1ebe57;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* ================= FOOTER ================= */
footer {
    background: #222222;
    color: #aaaaaa;
    padding: 60px 20px 20px;
    font-size: 14px;
}

.footer-grid {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--blanco);
    font-size: 18px;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--verde-toc);
    display: inline-block;
    padding-bottom: 5px;
}

.footer-col p {
    margin-bottom: 10px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    transition: var(--transicion);
}

.footer-links a:hover {
    color: var(--verde-toc);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #777;
    font-size: 13px;
}

/* ================= MODAL PRODUCTO ================= */
.modal-producto {
    display: none;
}

.modal-producto.active {
    display: block;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 2000;
}

.modal-contenido {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(920px, 92%);
    max-height: 88vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    z-index: 2001;
    padding: 30px;
}

.modal-cerrar {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    color: #444;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.modal-img {
    position: relative;
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    padding: 18px;
}

.zoom-container {
    position: relative;
    width: 100%;
    height: 340px;
    overflow: hidden;
    border-radius: 10px;
    cursor: zoom-in;
    background: #fff;
}

.zoom-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.1s ease;
    display: block;
}

/* ================= CONTROLES GALERIA ================= */

.galeria-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    width: 100%;
    padding: 0 20px;
}

.galeria-btn {
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: rgba(27, 94, 32, 0.95);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
}

.galeria-btn:hover {
    background: var(--verde-toc);
    transform: scale(1.08);
}

.modal-sku {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--verde-toc);
    font-weight: 700;
    font-size: 14px;
}

.modal-info h3 {
    font-size: 30px;
    color: var(--verde-header);
    margin-bottom: 14px;
}

.modal-info p {
    font-size: 16px;
    color: var(--texto-secundario);
    margin-bottom: 18px;
}

.modal-ficha {
    background: #f6fbf3;
    border: 1px solid rgba(81, 184, 39, 0.25);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 22px;
}

.modal-ficha h4 {
    color: var(--verde-header);
    margin-bottom: 10px;
    font-size: 18px;
}

.ficha-lista {
    padding-left: 18px;
    margin-top: 10px;
}

.ficha-lista li {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--texto-secundario);
    line-height: 1.5;
    position: relative;
}

.ficha-lista li::marker {
    color: var(--verde-toc);
}

body.modal-abierto {
    overflow: hidden;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 992px) {
    .hero-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .hero-text li {
        justify-content: center;
    }

    .nosotros-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--blanco);
        padding: 20px;
        border-bottom: 3px solid var(--verde-toc);
        box-shadow: var(--sombra-basica);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding: 25px 18px;
    }

    .hero-text h1 {
        font-size: 32px;
    }

    .hero-img {
        width: 100%;
        flex: none;
    }

    .hero-carousel {
        width: 100%;
        max-width: 100%;
        height: 280px;
        padding: 14px;
    }

    .carousel-slide {
        top: 14px;
        left: 14px;
        width: calc(100% - 28px);
        height: calc(100% - 28px);
    }

    .section-header h2 {
        font-size: 26px;
    }

    .modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-contenido {
        width: 94%;
        padding: 22px;
    }

    .modal-info h3 {
        font-size: 24px;
    }

    .zoom-container {
        height: 260px;
    }

    .galeria-btn {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
}
