/*
   Capa de adaptacion para texto grande y dispositivos moviles lentos.
   Mantiene el estilo actual, evita desbordes y reduce trabajo grafico cuando hace falta.
*/

html{
    -webkit-text-size-adjust:100%;
    text-size-adjust:100%;
}

body{
    overflow-wrap:break-word;
}

img,
video,
canvas,
svg{
    max-width:100%;
}

.contenedor,
.page,
.checkout-shell,
.checkout-inner,
.portal-wrapper,
.main-content,
.seccion-productos,
.productos-grid,
.producto-card,
.info-producto,
.compact-product-card,
.compact-product-info,
.cart-item,
.item-main,
.summary-stack,
.delivery-form,
.orders-table,
.table-card,
.detail-layout,
.detail-info-card,
.mobile-nav-item,
.btn-categoria{
    min-width:0;
}

button,
a,
input,
select,
textarea,
.btn-categoria,
.category-pill,
.mobile-nav-item,
.btn-ver-mas,
.btn-add-publico,
.checkout-btn,
.btn-confirmar-whatsapp,
.btn-continuar-entrega,
.btn-volver-paso,
.ventas-btn,
.export-btn,
.admin-menu{
    max-width:100%;
}

.btn-categoria,
.category-pill,
.mobile-nav-item,
.mobile-nav-item span,
.btn-ver-mas,
.checkout-btn,
.btn-confirmar-whatsapp,
.btn-continuar-entrega,
.btn-volver-paso,
.ventas-btn,
.export-btn,
.admin-menu,
.chip,
.pill{
    white-space:normal!important;
    overflow-wrap:anywhere;
    word-break:normal;
    line-height:1.15;
}

h1,
h2,
h3,
h4,
p,
strong,
span,
label,
small{
    overflow-wrap:break-word;
}

input,
select,
textarea,
button{
    font:inherit;
}

.producto-card,
.cart-item,
.detail-panel,
.table-card{
    content-visibility:auto;
    contain-intrinsic-size:360px;
}

.compact-product-card,
.compact-rail-track,
.categorias-track,
.slider-track{
    content-visibility:visible!important;
    contain-intrinsic-size:auto!important;
}

.compact-rail-track{
    align-items:flex-start!important;
}

.compact-rail-viewport{
    min-height:0!important;
}

.compact-product-card{
    width:240px!important;
    height:112px!important;
    min-height:112px!important;
    max-height:112px!important;
    flex:0 0 240px!important;
    display:grid!important;
    grid-template-columns:88px minmax(0,1fr)!important;
    align-items:stretch!important;
    overflow:hidden!important;
}

.compact-product-media{
    width:88px!important;
    height:94px!important;
    flex:0 0 88px!important;
}

.compact-product-info{
    min-width:0!important;
    height:94px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:space-between!important;
}

.compact-product-title{
    min-height:0!important;
    max-height:2.7em!important;
}

@media(max-width:768px){
    body{
        overflow-x:hidden;
    }

    .contenedor,
    .page,
    .checkout-shell{
        width:min(100% - 20px, 100%)!important;
    }

    .main-header,
    .header,
    .checkout-brand,
    .logo-container,
    .top-line,
    .dashboard-title{
        min-width:0;
    }

    .logo-sitio,
    .title h1,
    .top-line h1,
    .dashboard-title h1,
    .seccion-titulo{
        max-width:100%;
        line-height:1.08;
    }

    .logo-sitio{
        font-size:clamp(1rem, 5vw, 1.35rem)!important;
    }

    .logo-sitio span{
        font-size:clamp(.48rem, 2.45vw, .66rem)!important;
        line-height:1.18;
    }

    .seccion-titulo,
    .title h1,
    .top-line h1{
        font-size:clamp(1.12rem, 5.4vw, 1.55rem)!important;
    }

    .productos-grid{
        grid-template-columns:repeat(auto-fill,minmax(min(168px,100%),1fr))!important;
    }

    .btn-categoria,
    .category-pill{
        min-height:40px;
        height:auto!important;
        padding:9px 13px!important;
        display:inline-flex;
        align-items:center;
        justify-content:center;
        text-align:center;
        flex:0 0 auto;
    }

    .categorias-container,
    .categorias-carousel-track,
    .slider-track{
        align-items:stretch;
    }

    .compact-rail-track{
        align-items:flex-start!important;
    }

    .compact-product-card{
        width:210px!important;
        height:104px!important;
        min-height:104px!important;
        max-height:104px!important;
        flex:0 0 210px!important;
        grid-template-columns:78px minmax(0,1fr)!important;
    }

    .compact-product-media{
        width:78px!important;
        height:86px!important;
        flex-basis:78px!important;
    }

    .compact-product-info{
        height:86px!important;
    }

    .mobile-bottom-nav{
        grid-template-columns:repeat(auto-fit,minmax(54px,1fr))!important;
        align-items:stretch;
    }

    .mobile-nav-item{
        min-height:56px;
        height:auto!important;
        padding:6px 3px!important;
    }

    .mobile-nav-item span{
        display:block;
        max-width:100%;
        font-size:clamp(.52rem, 2.65vw, .72rem)!important;
        line-height:1.05;
    }

    input,
    select,
    textarea{
        min-height:44px;
    }

    .floating-cart,
    .floating-back,
    .floating-admin-btn,
    .floating-utility-btn{
        backdrop-filter:none!important;
        -webkit-backdrop-filter:none!important;
    }

    .producto-card:hover,
    .compact-product-card:hover,
    .cart-item:hover,
    .btn-categoria:hover,
    .btn-ver-mas:hover,
    .btn-add-publico:hover{
        transform:none!important;
    }

    .producto-card::after,
    .main-header::before,
    .btn-categoria::before,
    .btn-ver-mas::before,
    .btn-add-publico::before{
        animation:none!important;
    }
}

@media(max-width:390px){
    .productos-grid{
        grid-template-columns:minmax(0,1fr)!important;
    }

    .acciones-publico,
    .item-actions,
    .checkout-grid,
    .delivery-form{
        grid-template-columns:1fr!important;
    }
}

@media (prefers-reduced-motion:reduce){
    *,
    *::before,
    *::after{
        animation-duration:.01ms!important;
        animation-iteration-count:1!important;
        transition-duration:.01ms!important;
        scroll-behavior:auto!important;
    }
}

html.performance-lite body::before,
html.performance-lite .producto-card::after,
html.performance-lite .compact-product-card::after,
html.performance-lite .main-header::before,
html.performance-lite .header::before,
html.performance-lite .btn-categoria::before,
html.performance-lite .btn-ver-mas::before,
html.performance-lite .btn-add-publico::before,
html.performance-lite .floating-cart::before,
html.performance-lite .floating-admin-btn::before{
    animation:none!important;
    transition:none!important;
}

html.performance-lite .producto-card,
html.performance-lite .compact-product-card,
html.performance-lite .cart-item,
html.performance-lite .seccion-productos,
html.performance-lite .card,
html.performance-lite .table-card,
html.performance-lite .summary-card,
html.performance-lite .panel{
    box-shadow:0 8px 20px rgba(0,0,0,.08)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
}

html.performance-lite .img-wrapper img,
html.performance-lite .producto-card:hover .img-wrapper img{
    transform:none!important;
    filter:none!important;
}

/*
   20260606 - Escala visual uniforme Confort Home.
   Cambio visual: compacta el sitio sin usar zoom ni transform:scale,
   elimina visualmente los botones de luna y estabiliza proporciones moviles.
*/
:root{
    --ch-page-max:1025px;
    --ch-page-pad:clamp(.72rem,2.8vw,1rem);
    --ch-bottom-nav-h:clamp(49px,11.2vw,55px);
}

html{
    font-size:16px!important;
    -webkit-text-size-adjust:100%!important;
    text-size-adjust:100%!important;
}

body{
    font-size:clamp(.82rem,1.55vw,.92rem)!important;
    line-height:1.32!important;
    overflow-x:hidden!important;
}

#themeToggle,
#mobileThemeBtn,
#floatingThemeToggle,
#floatingThemeBtn,
.floating-theme,
.theme-toggle,
button[aria-label="Cambiar tema"],
button[title="Cambiar tema"],
[data-theme-icon]{
    display:none!important;
}

img,
video,
canvas,
svg{
    max-width:100%!important;
    height:auto;
}

.contenedor,
.logos-carousel,
.checkout-shell,
.checkout-inner,
.portal-wrapper,
.main-content,
.admin-shell,
.page,
.inventory-shell,
.catalog-shell,
.login-shell{
    max-width:min(100% - (var(--ch-page-pad) * 2), var(--ch-page-max))!important;
}

.main-header .header-flex,
.header-flex{
    min-height:clamp(52px,10vw,62px)!important;
    height:clamp(52px,10vw,62px)!important;
    padding-block:.25rem!important;
}

.logo-img-main{
    width:clamp(44px,8vw,58px)!important;
    height:clamp(44px,8vw,58px)!important;
    object-fit:contain!important;
}

.logo-sitio{
    font-size:clamp(1.08rem,2.6vw,1.42rem)!important;
    line-height:1!important;
}

.logo-sitio span{
    font-size:clamp(.52rem,1.2vw,.68rem)!important;
    line-height:1.08!important;
}

.seccion-productos,
.empresas-summary,
.empresas-dropdown-content,
.catalogo-compact-rail,
.category-showcase,
.card,
.panel,
.summary-card,
.table-card,
.detalle-card,
.detail-card,
.checkout-card{
    border-radius:clamp(14px,2.4vw,20px)!important;
}

.seccion-productos{
    padding:clamp(.95rem,2.4vw,1.3rem)!important;
    margin-bottom:clamp(1rem,2.6vw,1.5rem)!important;
}

.empresas-section{
    padding-top:clamp(.85rem,2.2vw,1.35rem)!important;
    padding-bottom:clamp(.35rem,1.2vw,.6rem)!important;
}

.empresas-summary{
    min-height:clamp(56px,9vw,68px)!important;
    padding:clamp(.75rem,1.8vw,.95rem)!important;
}

.empresas-summary-icon{
    width:clamp(38px,7vw,46px)!important;
    height:clamp(38px,7vw,46px)!important;
}

.empresas-summary-text strong{
    font-size:clamp(.82rem,1.8vw,.98rem)!important;
    line-height:1.1!important;
}

.empresas-summary-text span{
    font-size:clamp(.62rem,1.4vw,.76rem)!important;
    line-height:1.15!important;
}

.seccion-titulo,
.title h1,
.top-line h1,
.dashboard-title h1,
.page-title,
.section-title{
    font-size:clamp(1.28rem,3.2vw,1.85rem)!important;
    line-height:1.05!important;
}

.buscador-catalogo{
    min-height:clamp(40px,6vw,48px)!important;
    border-radius:clamp(13px,2vw,17px)!important;
}

.buscador-catalogo input{
    font-size:clamp(.78rem,1.8vw,.9rem)!important;
}

.btn-categoria,
.category-pill{
    min-height:clamp(34px,5.8vw,40px)!important;
    padding:.45rem .9rem!important;
    font-size:clamp(.64rem,1.45vw,.76rem)!important;
    line-height:1.05!important;
    white-space:nowrap!important;
}

.compact-product-card{
    width:197px!important;
    height:92px!important;
    min-height:92px!important;
    max-height:92px!important;
    flex:0 0 197px!important;
    grid-template-columns:68px minmax(0,1fr) 34px!important;
    gap:.45rem!important;
    padding:.5rem!important;
}

.compact-product-media,
.compact-product-card img{
    width:68px!important;
    height:72px!important;
    max-height:72px!important;
    object-fit:contain!important;
}

.compact-product-info{
    height:72px!important;
}

.compact-product-title,
.compact-product-card h4,
.compact-product-card strong{
    font-size:.72rem!important;
    line-height:1.12!important;
    max-height:2.25em!important;
}

.compact-product-price{
    font-size:.82rem!important;
    line-height:1!important;
}

.compact-product-action,
.compact-product-card .btn-add-publico,
.compact-product-card .btn-ver-mas{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    min-height:34px!important;
    border-radius:12px!important;
}

.productos-grid,
.category-showcase-grid{
    gap:clamp(.72rem,1.8vw,1rem)!important;
}

.producto-card{
    border-radius:clamp(14px,2vw,18px)!important;
}

.img-wrapper,
.producto-card .img-wrapper,
.product-image{
    height:auto!important;
    aspect-ratio:1 / .78!important;
    padding:clamp(.45rem,1.5vw,.65rem)!important;
}

.info-producto{
    padding:clamp(.7rem,1.8vw,.95rem)!important;
}

.info-producto h3,
.producto-card h3,
.producto-card h4{
    font-size:clamp(.78rem,1.8vw,.94rem)!important;
    line-height:1.16!important;
    min-height:auto!important;
}

.precio-tag,
.price-final,
.producto-card .precio{
    font-size:clamp(.96rem,2.2vw,1.14rem)!important;
}

.mobile-bottom-nav{
    min-height:var(--ch-bottom-nav-h)!important;
    max-height:var(--ch-bottom-nav-h)!important;
    height:var(--ch-bottom-nav-h)!important;
    padding:clamp(3px,1vw,5px)!important;
    border-radius:clamp(16px,4vw,21px)!important;
    grid-template-columns:repeat(auto-fit,minmax(0,1fr))!important;
}

.mobile-nav-item{
    min-height:calc(var(--ch-bottom-nav-h) - 8px)!important;
    height:calc(var(--ch-bottom-nav-h) - 8px)!important;
    padding:.18rem .25rem!important;
    border-radius:clamp(12px,3.2vw,17px)!important;
    font-size:clamp(.5rem,2.25vw,.62rem)!important;
    line-height:1.05!important;
    gap:.12rem!important;
}

.mobile-nav-item i{
    font-size:clamp(.86rem,3.5vw,1.02rem)!important;
}

@media(max-width:768px){
    :root{
        --ch-page-max:44rem;
        --ch-bottom-nav-h:clamp(48px,12vw,54px);
    }

    body{
        font-size:.88rem!important;
        padding-bottom:calc(var(--ch-bottom-nav-h) + .65rem + env(safe-area-inset-bottom))!important;
    }

    .contenedor,
    .checkout-shell,
    .checkout-inner,
    .page,
    .portal-wrapper,
    .main-content,
    .admin-shell,
    .catalog-shell,
    .login-shell{
        width:min(100% - (var(--ch-page-pad) * 2), var(--ch-page-max))!important;
        max-width:min(100% - (var(--ch-page-pad) * 2), var(--ch-page-max))!important;
        margin-left:auto!important;
        margin-right:auto!important;
    }

    .compact-product-card{
        width:172px!important;
        height:85px!important;
        min-height:85px!important;
        max-height:85px!important;
        flex-basis:172px!important;
        grid-template-columns:58px minmax(0,1fr) 31px!important;
        gap:.4rem!important;
        padding:.42rem!important;
    }

    .compact-product-media,
    .compact-product-card img{
        width:58px!important;
        height:64px!important;
        max-height:64px!important;
    }

    .compact-product-info{
        height:64px!important;
    }

    .compact-product-title,
    .compact-product-card h4,
    .compact-product-card strong{
        font-size:.66rem!important;
    }

    .compact-product-price{
        font-size:.74rem!important;
    }

    .compact-product-action,
    .compact-product-card .btn-add-publico,
    .compact-product-card .btn-ver-mas{
        width:31px!important;
        height:31px!important;
        min-width:31px!important;
        min-height:31px!important;
    }
}

@media(max-width:360px){
    :root{
        --ch-page-pad:.55rem;
        --ch-bottom-nav-h:46px;
    }

    .compact-product-card{
        width:160px!important;
        flex-basis:160px!important;
    }
}

@media(min-width:769px){
    body{
        font-size:.82rem!important;
    }

    .compact-product-card{
        width:197px!important;
        flex-basis:197px!important;
    }
}

/* Candado tablet/desktop: evita que el menu inferior movil aparezca como barra blanca superior. */
.mobile-bottom-nav{
    display:none!important;
    visibility:hidden!important;
    pointer-events:none!important;
}

@media(max-width:768px){
    .mobile-bottom-nav{
        display:grid!important;
        visibility:visible!important;
        pointer-events:auto!important;
        position:fixed!important;
        left:10px!important;
        right:10px!important;
        top:auto!important;
        bottom:calc(8px + env(safe-area-inset-bottom))!important;
        z-index:9999!important;
    }
}

@media(min-width:769px){
    .mobile-bottom-nav,
    html.device-mobile .mobile-bottom-nav{
        display:none!important;
        visibility:hidden!important;
        pointer-events:none!important;
    }
}
