@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap');

:root{
    --green:#5e8877;
    --green-dark:#4d7162;
    --text:#2e2e2e;
    --title:#4f7b6b;
    --section-pad: 64px;
    --section-pad-mobile: 44px;
    --ease: cubic-bezier(.2,.8,.2,1);
}

/* Evitar desbordamientos horizontales en dispositivos móviles */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Roboto', sans-serif;
    background: #fff;
    color: var(--text);
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, .oswald {
    font-family: 'Oswald', sans-serif;
    letter-spacing: .02em;
    line-height: 1.08;
}

p, li, a, span, label, input, textarea, button {
    font-family: 'Roboto', sans-serif;
}

a, button {
    transition:
        background-color .28s var(--ease),
        color .28s var(--ease),
        transform .28s var(--ease),
        box-shadow .28s var(--ease),
        opacity .28s var(--ease);
}

.topbar{
    background: var(--green);
    color: white;
    text-align: center;
    padding: 10px 15px;
    position: relative;
    line-height: 1.2;
}

.topbar h2{
    margin: 0;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: .10em;
}

.topbar span{
    position: absolute;
    right: 18px;
    bottom: 6px;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: .06em;
}

header{
    position: sticky;
    top: 0;
    z-index: 50;
    background: white;
    border-bottom: 1px solid #efefef;
    box-shadow: 0 1px 12px rgba(0,0,0,.04);
}

.container{
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.header-wrap{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
}

.logo img{
    height: 74px;
    width: auto;
    display: block;
    object-fit: contain;
}

nav{
    display: flex;
    gap: 26px;
    align-items: center;
}

nav a{
    text-decoration: none;
    color: var(--green);
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: .04em;
}

nav a:hover{ color: #000; transform: translateY(-1px); }

.header-right{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.call-btn{
    background: var(--green);
    color: #fff;
    text-decoration: none;
    padding: 11px 20px;
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    letter-spacing: .05em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.call-btn:hover{
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,.12);
}

.social{
    display: flex;
    gap: 14px;
    font-size: 20px;
    color: #000;
}

.social a{
    color: inherit;
    text-decoration: none;
}

.social a:hover{
    color: var(--green);
    transform: translateY(-1px);
}

.hero{
    position: relative;
    min-height: 72vh;
    overflow: hidden;
}

.hero-carousel{
    position: relative;
    width: 100%;
    height: 72vh;
    min-height: 72vh;
    overflow: hidden;
}

.hero-track{
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide{
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .8s ease;
}

.hero-slide.active{
    opacity: 1;
    z-index: 1;
}

.hero-overlay{
    width: min(760px, calc(100% - 40px));
    background: rgba(255,255,255,.82);
    padding: 46px 34px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.12);
}

.hero h3{
    margin: 0 0 10px 0;
    color: var(--title);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .10em;
    line-height: 1.1;
}

.hero .sub{
    margin: 8px 0 24px;
    color: var(--title);
    font-family: 'Oswald', sans-serif;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: .04em;
    line-height: 1.15;
}

.hero .cta{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--green);
    color: white;
    text-decoration: none;
    padding: 12px 22px;
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    letter-spacing: .06em;
    min-width: 240px;
    min-height: 46px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.hero .cta:hover{
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,.12);
}

.arrow{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 74px;
    font-weight: 300;
    text-decoration: none;
    opacity: .9;
    z-index: 5;
    padding: 0 10px;
    transition: transform .28s var(--ease), opacity .28s var(--ease);
}

.arrow.left{ left: 24px; }
.arrow.right{ right: 24px; }

.arrow:hover{
    opacity: 1;
    transform: translateY(-50%) scale(1.06);
}

.dots{
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 14px;
    z-index: 5;
}

.dots span{
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    opacity: .95;
}

.benefits{
    background: #fff;
    padding: 14px 0 10px;
}

.benefits-inner{
    width: min(1540px, calc(100% - 46px));
    margin: 0 auto;
    background: linear-gradient(90deg, #8f9ea8 0%, #7fa090 34%, #a6a6a6 100%);
    color: #fff;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    min-height: 84px;
}

.benefit{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 12px;
    border-right: 1px solid rgba(255,255,255,.12);
    font-family: 'Oswald', sans-serif;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: .03em;
    white-space: nowrap;
}

.benefit:last-child{ border-right: none; }

.benefit i{
    font-size: 26px;
    opacity: .95;
}

section.block{
    padding: var(--section-pad) 0;
}

.section-title{
    text-align: center;
    color: var(--green);
    font-size: 48px;
    margin: 0 0 24px;
    letter-spacing: .03em;
}

.categories{
    background: #f8f8f8;
}

.category-grid{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.category-card{
    background: white;
    padding: 22px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--green);
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
    font-family: 'Oswald', sans-serif;
    font-size: 22px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    letter-spacing: .03em;
}

.category-card:hover{
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
    transform: translateY(-3px);
}

.category-img-wrap{
    width: 120px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    background: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #e8e8e8;
    flex-shrink: 0;
}

.category-img-wrap img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.about-box{
    background: white;
    border: 1px solid #eee;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
    max-width: 1000px;
    margin: 0 auto;
}

.about-box p{
    font-size: 18px;
    line-height: 1.75;
    margin: 0 0 14px 0;
}

.about-box a{
    color: var(--green);
    text-decoration: none;
}

.about-box a:hover{ text-decoration: underline; }

.testimonial-wrap{
    width: min(900px, calc(100% - 32px));
    margin: 0 auto;
    background: #f5f5f5;
    border-left: 5px solid var(--green);
    padding: 24px 26px;
}

.testimonial-wrap h3{
    margin: 0 0 8px 0;
    font-size: 24px;
    font-family: 'Oswald', sans-serif;
    letter-spacing: .02em;
}

.testimonial-wrap p{
    margin: 0;
    font-size: 18px;
    line-height: 1.7;
}

.testimonials-list{
    display: grid;
    gap: 18px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 34px;
    align-items: start;
}

.contact-box{
    background: white;
    border: 1px solid #eee;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
}

.contact-box h3{
    margin-top: 0;
    color: var(--green);
    font-size: 30px;
    letter-spacing: .03em;
}

.contact-box p{
    font-size: 18px;
    line-height: 1.75;
    margin: 0 0 14px 0;
}

.contact-box a{
    color: var(--green);
    text-decoration: none;
}

.contact-box a:hover{ text-decoration: underline; }

.map-wrap{
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
    background: #f2f2f2;
}

.map-wrap iframe{
    width: 100%;
    height: 100%;
    display: block;
}

.map-share-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    background: var(--green);
    color: #fff;
    text-decoration: none;
    padding: 12px 18px;
    font-family: 'Oswald', sans-serif;
    letter-spacing: .05em;
    min-height: 46px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.map-share-btn:hover{
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,.12);
}

.ml-carousel{
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    padding: 10px 0 35px;
}

.ml-track{
    display: flex;
    transition: transform .5s ease;
    width: 100%;
}

.ml-slide{
    min-width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 8px;
    box-sizing: border-box;
}

.ml-card{
    width: 100%;
    background: white;
    border: 1px solid #eee;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
}

.ml-image-wrap{
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f2f2f2;
    border-radius: 8px;
    margin-bottom: 12px;
}

.ml-image-wrap img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.ml-card h4{
    margin: 0 0 8px 0;
    font-family: 'Oswald', sans-serif;
    font-size: 24px;
    color: var(--green);
    letter-spacing: .02em;
}

.ml-card p{
    margin: 0 0 12px 0;
    font-size: 16px;
    line-height: 1.6;
}

.ml-card a{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--green);
    color: white;
    text-decoration: none;
    padding: 10px 14px;
    font-family: 'Oswald', sans-serif;
    letter-spacing: .05em;
    min-height: 44px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.ml-card a:hover{
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,.12);
}

.ml-arrow{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: rgba(255,255,255,.95);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--green);
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    cursor: pointer;
    transition: transform .28s var(--ease), box-shadow .28s var(--ease), background-color .28s var(--ease);
}

.ml-arrow:hover{
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 8px 18px rgba(0,0,0,.15);
}

.ml-prev{ left: 8px; }
.ml-next{ right: 8px; }

.ml-dots{
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

.ml-dots span{
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cfcfcf;
    display: inline-block;
    transition: background-color .28s var(--ease), transform .28s var(--ease);
}

.ml-dots span.active{
    background: var(--green);
    transform: scale(1.15);
}

footer{
    background: #000;
    color: #fff;
    text-align: center;
    padding: 22px 16px;
    margin-top: 0;
}

.whatsapp-float{
    position: fixed;
    width: 62px;
    height: 62px;
    bottom: 22px;
    right: 22px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    box-shadow: 0 8px 22px rgba(0,0,0,.25);
    z-index: 9999;
    text-decoration: none;
    transition: transform .28s var(--ease), box-shadow .28s var(--ease), opacity .28s var(--ease);
}

.whatsapp-float:hover{
    transform: scale(1.06);
    box-shadow: 0 10px 24px rgba(0,0,0,.28);
}

/* ================================================= */
/* 📱 MEDIA QUERIES / ADAPTABILIDAD MÓVIL PERFECTA   */
/* ================================================= */

.mobile-menu {
    display: none;
}

@media (max-width: 1100px){
    nav{ display: none; }
    
    .mobile-menu{ 
        display: inline-flex !important; 
        align-items: center !important; 
        justify-content: center !important; 
        width: 48px !important; 
        height: 48px !important; 
        border: none !important; 
        background: var(--green) !important; 
        color: #fff !important; 
        font-size: 22px !important; 
        border-radius: 6px !important;
        cursor: pointer !important;
        margin: 8px auto !important;
    }

    .benefits-inner{ grid-template-columns: repeat(2, 1fr); }
    .benefit{ font-size: 26px; }
    .category-grid{ grid-template-columns: repeat(2, 1fr); }
    .contact-grid{ grid-template-columns: 1fr; }
    
    .header-wrap{
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .header-right{ 
        align-items: center !important; 
        width: 100% !important;
    }
}

@media (max-width: 700px){
    section.block{ padding: var(--section-pad-mobile) 0; }
    .topbar h2{ font-size: 20px; }
    .topbar span{ position: static; display: block; margin-top: 4px; }
    .hero{ min-height: 60vh; }
    .hero-carousel{ height: 60vh; min-height: 60vh; }
    .hero-overlay{ padding: 28px 16px; width: min(92%, 760px); }
    .hero h3{ font-size: 18px; }
    .hero .sub{ font-size: 17px; }
    .hero .cta{ font-size: 16px; min-width: 200px; padding: 11px 18px; }
    .call-btn{ font-size: 16px; padding: 10px 18px; min-height: 42px; }
    .benefits-inner{ grid-template-columns: 1fr; }
    .benefit{ justify-content: flex-start; font-size: 24px; padding: 14px 12px; }
    .category-grid{ grid-template-columns: 1fr; }
    .section-title{ font-size: 36px; margin-bottom: 20px; }
    .contact-box h3{ font-size: 28px; }
    .ml-card img{ height: 190px; }
    .ml-arrow{ width: 38px; height: 38px; }
    .whatsapp-float{ width: 56px; height: 56px; bottom: 16px; right: 16px; font-size: 30px; }
    .category-img-wrap{ width: 100px; }
    .about-box, .contact-box{ padding: 22px; }
    
    /* Corrección de tablas y grillas en pantallas chicas */
    .admin-grid,
    div[style*="grid-template-columns"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }

    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
    }
}

/* ================================================= */
/* 📱 ESTILOS ADICIONALES PARA LA TIENDA MÓVIL (ML)  */
/* ================================================= */
@media (max-width: 900px) {
    .prod-img-wrap {
        height: 160px !important;
        background: #fff !important;
    }
    .prod-img-wrap img {
        object-fit: contain !important; /* Imágenes acopladas sin recortarse */
        padding: 8px;
    }
}