/* UBD Modular Bonito 1.7.1 · carga segmentada por página */
/* =========================================================
   Modular Bonito 1.5.9 · Ajustes finales de publicación
   Capa visual y de textos. No altera formularios ni precios.
   ========================================================= */

/* Marca compacta. */
#ubd-modular-bonito .ubd-mod-brand strong,
.ubd-catalog-shell-header .ubd-catalog-shell-brand strong {
    white-space: nowrap !important;
}
/* =========================================================
   CATEGORÍA · Descripción visible y compacta en modo experto
   ========================================================= */
html.ubd-category-ready body#category {
    overflow-anchor: none !important;
}

html.ubd-category-ready:not(.ubd-catalog-simple) body#category .tv-category-block-wrapper {
    display: grid !important;
    margin-bottom: 12px !important;
    border-radius: 18px !important;
}
html.ubd-category-ready:not(.ubd-catalog-simple) body#category #category-description {
    display: block !important;
}
html.ubd-category-ready:not(.ubd-catalog-simple) body#category #ubd-simple-category-description {
    display: none !important;
}
html.ubd-category-ready:not(.ubd-catalog-simple) body#category .tv-category-cover {
    min-height: 86px !important;
    padding: 12px !important;
}
html.ubd-category-ready:not(.ubd-catalog-simple) body#category .tv-category-cover img {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
}
html.ubd-category-ready:not(.ubd-catalog-simple) body#category #category-description > article {
    padding: clamp(13px, 2.2vw, 20px) !important;
}
html.ubd-category-ready:not(.ubd-catalog-simple) body#category #category-description h1 {
    margin-bottom: 7px !important;
    font-size: clamp(27px, 4.2vw, 42px) !important;
    line-height: .96 !important;
}
html.ubd-category-ready:not(.ubd-catalog-simple) body#category #category-description h2 {
    margin: 10px 0 5px !important;
    font-size: 15px !important;
}
html.ubd-category-ready:not(.ubd-catalog-simple) body#category #category-description p {
    margin: 0 0 7px !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
}

/* En sencillo la portada/descripcion de categoría permanece fuera para conservar la vista ligera. */
html.ubd-category-ready.ubd-catalog-simple body#category .tv-category-block-wrapper,
html.ubd-category-ready.ubd-catalog-simple body#category #category-description,
html.ubd-category-ready.ubd-catalog-simple body#category #ubd-simple-category-description {
    display: none !important;
}

html.ubd-category-ready body#category #js-product-list,
html.ubd-category-ready body#category #js-product-list .products {
    overflow-anchor: none !important;
}

/* =========================================================
   CATEGORÍA · Solo queda Ordenar por
   ========================================================= */
html.ubd-category-ready body#category .products-selection {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    min-height: 0 !important;
    padding: 8px !important;
}
html.ubd-category-ready body#category .products-selection.ubd-toolbar-sort-only > * {
    display: none !important;
}
html.ubd-category-ready body#category .products-selection.ubd-toolbar-sort-only > .ubd-sort-column {
    display: block !important;
    width: min(100%, 360px) !important;
    max-width: 360px !important;
    margin-left: auto !important;
}
html.ubd-category-ready body#category .tv-left-search-totle-product,
html.ubd-category-ready body#category .tv_search_filter_wrapper,
html.ubd-category-ready body#category .tv-total-product,
html.ubd-category-ready body#category .tvcmsproduct-grid-list,
html.ubd-category-ready body#category .tvproduct-view,
html.ubd-category-ready body#category #search_filter_toggler,
html.ubd-category-ready body#category .filter-button {
    display: none !important;
}
html.ubd-category-ready body#category .products-selection .sort-by-row {
    display: flex !important;
    width: 100% !important;
    justify-content: flex-end !important;
}
html.ubd-category-ready body#category .products-selection .products-sort-order {
    width: min(100%, 270px) !important;
}

/* =========================================================
   PRODUCTOS NUEVOS · Etiqueta limpia, sin cuadro negro detrás
   ========================================================= */
html.ubd-category-ready body#category #js-product-list .product-flags,
html.ubd-category-ready body#category #js-product-list .product-flags::before,
html.ubd-category-ready body#category #js-product-list .product-flags::after {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    content: none !important;
}
html.ubd-category-ready body#category #js-product-list .product-flag,
html.ubd-category-ready body#category #js-product-list .product-flag.new,
html.ubd-category-ready body#category #js-product-list .product-flag.new-product {
    border: 0 !important;
    outline: 0 !important;
    background: rgba(255,255,255,.92) !important;
    box-shadow: 0 5px 14px rgba(24,51,58,.10) !important;
}
html.ubd-category-ready body#category #js-product-list .product-flag::before,
html.ubd-category-ready body#category #js-product-list .product-flag::after,
html.ubd-category-ready body#category #js-product-list .product-flag.new::before,
html.ubd-category-ready body#category #js-product-list .product-flag.new::after {
    display: none !important;
    content: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* =========================================================
   1.6.4 · CATEGORÍA MÓVIL
   Submenú tipo stories + productos grandes como home
   ========================================================= */
@media (max-width: 699px) {
    /* Submenú / subcategorías compactas */
    html.ubd-category-ready body#category #subcategories,
    html.ubd-category-ready body#category .ubd-story-submenu {
        margin: 0 0 12px !important;
        padding: 14px 12px !important;
        border: 1px solid rgba(24, 51, 58, .08) !important;
        border-radius: 18px !important;
        background: rgba(255,255,255,.94) !important;
        box-shadow: 0 10px 22px rgba(24,51,58,.06) !important;
        overflow: hidden !important;
    }

    html.ubd-category-ready body#category #subcategories .h6,
    html.ubd-category-ready body#category #subcategories .subcategory-heading,
    html.ubd-category-ready body#category #subcategories h2,
    html.ubd-category-ready body#category .ubd-story-submenu .ubd-story-heading {
        margin: 0 0 10px !important;
        padding: 0 !important;
        color: #2a3337 !important;
        font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
        font-size: 13px !important;
        font-weight: 900 !important;
        letter-spacing: .08em !important;
        text-transform: uppercase !important;
    }

    html.ubd-category-ready body#category #subcategories ul,
    html.ubd-category-ready body#category #subcategories .subcategory-list,
    html.ubd-category-ready body#category .ubd-story-submenu .ubd-story-row {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 10px !important;
        align-items: flex-start !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 2px 2px 4px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        list-style: none !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: x proximity !important;
    }

    html.ubd-category-ready body#category #subcategories ul::-webkit-scrollbar,
    html.ubd-category-ready body#category #subcategories .subcategory-list::-webkit-scrollbar,
    html.ubd-category-ready body#category .ubd-story-submenu .ubd-story-row::-webkit-scrollbar {
        display: none !important;
    }

    html.ubd-category-ready body#category #subcategories ul > li,
    html.ubd-category-ready body#category #subcategories .subcategory-list > li,
    html.ubd-category-ready body#category .ubd-story-submenu .ubd-story-cell {
        flex: 0 0 74px !important;
        width: 74px !important;
        min-width: 74px !important;
        max-width: 74px !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
        text-align: center !important;
        scroll-snap-align: start !important;
    }

    html.ubd-category-ready body#category #subcategories ul > li > a,
    html.ubd-category-ready body#category #subcategories .subcategory-list > li > a,
    html.ubd-category-ready body#category .ubd-story-submenu .ubd-story-link {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 7px !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        color: #24383d !important;
        text-decoration: none !important;
    }

    html.ubd-category-ready body#category #subcategories .subcategory-image,
    html.ubd-category-ready body#category .ubd-story-submenu .ubd-story-media {
        display: grid !important;
        place-items: center !important;
        width: 66px !important;
        height: 66px !important;
        margin: 0 auto !important;
        padding: 5px !important;
        overflow: hidden !important;
        border-radius: 50% !important;
        background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,240,232,.96)) !important;
        box-shadow: 0 10px 24px rgba(24,51,58,.10) !important;
        border: 2px solid rgba(231,146,60,.28) !important;
    }

    html.ubd-category-ready body#category #subcategories .subcategory-image img,
    html.ubd-category-ready body#category .ubd-story-submenu .ubd-story-media img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        margin: 0 auto !important;
        object-fit: contain !important;
        object-position: center center !important;
        border-radius: 50% !important;
    }

    html.ubd-category-ready body#category #subcategories ul > li h5,
    html.ubd-category-ready body#category #subcategories ul > li h6,
    html.ubd-category-ready body#category #subcategories ul > li .subcategory-name,
    html.ubd-category-ready body#category .ubd-story-submenu .ubd-story-name {
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 2 !important;
        overflow: hidden !important;
        min-height: 26px !important;
        margin: 0 !important;
        color: #24383d !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        text-align: center !important;
        text-wrap: balance !important;
        text-transform: none !important;
    }

    html.ubd-category-ready body#category #subcategories ul > li h5 a,
    html.ubd-category-ready body#category #subcategories ul > li h6 a,
    html.ubd-category-ready body#category #subcategories ul > li .subcategory-name a {
        color: inherit !important;
        text-decoration: none !important;
    }

    /* Productos de categoría grandes, como en home */
    html.ubd-category-ready body#category #js-product-list .tvproduct-wrapper.grid,
    html.ubd-category-ready body#category #js-product-list .tvproduct-wrapper.grid-2 {
        min-height: 348px !important;
    }

    html.ubd-category-ready body#category #js-product-list .tvproduct-image {
        min-height: 236px !important;
        padding: 10px 7px 4px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    html.ubd-category-ready body#category #js-product-list .product-thumbnail {
        height: 224px !important;
        display: grid !important;
        place-items: center !important;
    }

    html.ubd-category-ready body#category #js-product-list .product-thumbnail img {
        max-width: 98% !important;
        max-height: 216px !important;
        width: auto !important;
        height: auto !important;
        margin: 0 auto !important;
        object-fit: contain !important;
        object-position: center center !important;
    }

    html.ubd-category-ready body#category #js-product-list .tvproduct-info-box-wrapper,
    html.ubd-category-ready body#category #js-product-list .product-description,
    html.ubd-category-ready body#category #js-product-list .tvproduct-info,
    html.ubd-category-ready body#category #js-product-list .tvall-product-info {
        margin: 0 8px 8px !important;
        padding: 10px 11px 11px !important;
        min-height: 92px !important;
    }
}

@media (max-width: 390px) {
    html.ubd-category-ready body#category #subcategories ul > li,
    html.ubd-category-ready body#category #subcategories .subcategory-list > li,
    html.ubd-category-ready body#category .ubd-story-submenu .ubd-story-cell {
        flex-basis: 70px !important;
        width: 70px !important;
        min-width: 70px !important;
        max-width: 70px !important;
    }

    html.ubd-category-ready body#category #subcategories .subcategory-image,
    html.ubd-category-ready body#category .ubd-story-submenu .ubd-story-media {
        width: 62px !important;
        height: 62px !important;
    }

    html.ubd-category-ready body#category #js-product-list .tvproduct-wrapper.grid,
    html.ubd-category-ready body#category #js-product-list .tvproduct-wrapper.grid-2 {
        min-height: 332px !important;
    }

    html.ubd-category-ready body#category #js-product-list .tvproduct-image {
        min-height: 222px !important;
    }

    html.ubd-category-ready body#category #js-product-list .product-thumbnail {
        height: 210px !important;
    }

    html.ubd-category-ready body#category #js-product-list .product-thumbnail img {
        max-height: 202px !important;
    }
}

/* =========================================================
   1.6.5 · SUBMENÚ MÓVIL SOLO TEXTO
   Conserva los enlaces originales en el DOM, pero presenta una fila
   compacta y clara sin imágenes ni espacios vacíos de carrusel.
   ========================================================= */
@media (max-width: 699px) {
    html.ubd-category-ready body#category .ubd-submenu-text-ready {
        margin: 0 0 14px !important;
        padding: 16px 14px 14px !important;
        overflow: hidden !important;
        border: 1px solid rgba(24, 51, 58, .08) !important;
        border-radius: 20px !important;
        background: rgba(255,255,255,.98) !important;
        box-shadow: 0 12px 26px rgba(24,51,58,.065) !important;
    }

    html.ubd-category-ready body#category .ubd-submenu-text-ready .ubd-submenu-heading {
        display: block !important;
        margin: 0 0 12px !important;
        padding: 0 !important;
        color: #26383d !important;
        font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
        font-size: 12px !important;
        font-weight: 900 !important;
        line-height: 1.2 !important;
        letter-spacing: .12em !important;
        text-transform: uppercase !important;
    }

    html.ubd-category-ready body#category .ubd-submenu-native-track,
    html.ubd-category-ready body#category .ubd-submenu-native-item,
    html.ubd-category-ready body#category .ubd-submenu-native-image {
        display: none !important;
    }

    html.ubd-category-ready body#category .ubd-submenu-text-nav {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        gap: 8px !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 1px 2px 5px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: x proximity !important;
        mask-image: linear-gradient(to right, transparent 0, #000 7px, #000 calc(100% - 14px), transparent 100%) !important;
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 7px, #000 calc(100% - 14px), transparent 100%) !important;
    }

    html.ubd-category-ready body#category .ubd-submenu-text-nav::-webkit-scrollbar {
        display: none !important;
    }

    html.ubd-category-ready body#category .ubd-submenu-text-nav a {
        flex: 0 0 auto !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 48px !important;
        max-width: 180px !important;
        margin: 0 !important;
        padding: 10px 15px !important;
        border: 1px solid rgba(24,51,58,.08) !important;
        border-radius: 16px !important;
        background: linear-gradient(180deg, #fff 0%, #f8f2eb 100%) !important;
        color: #18333a !important;
        font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
        font-size: 13px !important;
        font-weight: 800 !important;
        line-height: 1.18 !important;
        letter-spacing: .015em !important;
        text-align: center !important;
        text-decoration: none !important;
        text-wrap: balance !important;
        box-shadow: 0 7px 17px rgba(24,51,58,.07) !important;
        scroll-snap-align: start !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    html.ubd-category-ready body#category .ubd-submenu-text-nav a:nth-child(5n+1) {
        box-shadow: inset 0 -3px 0 rgba(231,146,60,.42), 0 7px 17px rgba(24,51,58,.07) !important;
    }
    html.ubd-category-ready body#category .ubd-submenu-text-nav a:nth-child(5n+2) {
        box-shadow: inset 0 -3px 0 rgba(231,130,82,.42), 0 7px 17px rgba(24,51,58,.07) !important;
    }
    html.ubd-category-ready body#category .ubd-submenu-text-nav a:nth-child(5n+3) {
        box-shadow: inset 0 -3px 0 rgba(239,194,94,.52), 0 7px 17px rgba(24,51,58,.07) !important;
    }
    html.ubd-category-ready body#category .ubd-submenu-text-nav a:nth-child(5n+4) {
        box-shadow: inset 0 -3px 0 rgba(147,181,109,.48), 0 7px 17px rgba(24,51,58,.07) !important;
    }
    html.ubd-category-ready body#category .ubd-submenu-text-nav a:nth-child(5n) {
        box-shadow: inset 0 -3px 0 rgba(93,160,132,.48), 0 7px 17px rgba(24,51,58,.07) !important;
    }

    html.ubd-category-ready body#category .ubd-submenu-text-nav a:focus-visible {
        outline: 3px solid rgba(231,146,60,.38) !important;
        outline-offset: 2px !important;
    }

    /* ======================================================
       Productos de categoría: misma presencia visual del home
       ====================================================== */
    html.ubd-category-ready body#category #js-product-list .tvproduct-wrapper.grid,
    html.ubd-category-ready body#category #js-product-list .tvproduct-wrapper.grid-2 {
        min-height: 430px !important;
        border-radius: 24px !important;
    }

    html.ubd-category-ready body#category #js-product-list .tvproduct-image {
        flex: 1 1 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 312px !important;
        padding: 8px 5px 2px !important;
        overflow: visible !important;
    }

    html.ubd-category-ready body#category #js-product-list .product-thumbnail {
        display: grid !important;
        place-items: center !important;
        width: 100% !important;
        height: 302px !important;
        overflow: visible !important;
    }

    html.ubd-category-ready body#category #js-product-list .product-thumbnail img.tvproduct-defult-img,
    html.ubd-category-ready body#category #js-product-list .product-thumbnail img:not(.tvproduct-hover-img) {
        display: block !important;
        width: auto !important;
        height: auto !important;
        max-width: 100% !important;
        max-height: 294px !important;
        margin: auto !important;
        object-fit: contain !important;
        object-position: center center !important;
        transform: scale(1.035) !important;
        transform-origin: center center !important;
    }

    html.ubd-category-ready body#category #js-product-list .product-thumbnail img.tvproduct-hover-img {
        display: none !important;
    }

    html.ubd-category-ready body#category #js-product-list .tvproduct-info-box-wrapper,
    html.ubd-category-ready body#category #js-product-list .product-description,
    html.ubd-category-ready body#category #js-product-list .tvproduct-info,
    html.ubd-category-ready body#category #js-product-list .tvall-product-info {
        flex: 0 0 auto !important;
        min-height: 102px !important;
        margin: 0 9px 9px !important;
        padding: 11px 11px 12px !important;
        border-radius: 19px !important;
    }

    html.ubd-category-ready body#category #js-product-list .product-title h6 {
        margin-bottom: 7px !important;
        font-size: 18px !important;
        line-height: .98 !important;
    }

    html.ubd-category-ready body#category #js-product-list .product-price-and-shipping .price,
    html.ubd-category-ready body#category #js-product-list .tv-product-price .price {
        font-size: 17px !important;
    }
}

@media (max-width: 390px) {
    html.ubd-category-ready body#category #js-product-list .tvproduct-wrapper.grid,
    html.ubd-category-ready body#category #js-product-list .tvproduct-wrapper.grid-2 {
        min-height: 405px !important;
    }

    html.ubd-category-ready body#category #js-product-list .tvproduct-image {
        min-height: 286px !important;
    }

    html.ubd-category-ready body#category #js-product-list .product-thumbnail {
        height: 278px !important;
    }

    html.ubd-category-ready body#category #js-product-list .product-thumbnail img.tvproduct-defult-img,
    html.ubd-category-ready body#category #js-product-list .product-thumbnail img:not(.tvproduct-hover-img) {
        max-height: 270px !important;
    }

    html.ubd-category-ready body#category #js-product-list .product-title h6 {
        font-size: 16px !important;
    }
}

@media (max-width: 699px) {
    html.ubd-category-ready body#category .ubd-submenu-text-ready {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    html.ubd-category-ready body#category .ubd-submenu-native-shell {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
}
