/*
 * Producto WooCommerce - The Body Shop
 * Ruta: avalancha/assets/css/producto.css
 * Unifica estructura, galería, variaciones, AJAX y modal del single product.
 */

html,
body {
    width: 100%;
}

body.template-product {
    overflow-x: hidden;
    background: #fafafa;
}

body.template-product product-images,
body.template-product zoom-images,
body.template-product product-thumbs,
body.template-product product-form,
body.template-product collapsible-elements,
body.template-product grid-slider,
body.template-product loyalty-points-pdp,
body.template-product product-modal,
body.template-product ticker-bar,
body.template-product announcement-bar {
    display: block;
}

body.template-product #MainContent,
body.template-product .main-content,
body.template-product .shopify-section.section-overlay-header,
body.template-product .related__wrapper {
    background: #fafafa;
}

body.template-product .shopify-section,
body.template-product .index-product,
body.template-product .product__wrapper,
body.template-product .product__wrapper__inner,
body.template-product .product__images,
body.template-product .product__content,
body.template-product .form__wrapper,
body.template-product .form__width {
    box-sizing: border-box;
}

body.template-product .index-product.section-padding {
    padding-top: 0;
    padding-bottom: 36px;
}

body.template-product .product__wrapper {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
}

body.template-product .product__wrapper__inner {
    width: 100%;
}

body.template-product .breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 12px 0 28px;
    font-size: 11px;
    line-height: 1.4;
}

body.template-product .product__page {
    display: grid !important;
    grid-template-columns: minmax(0, 56%) minmax(340px, 44%);
    gap: 72px;
    align-items: flex-start;
    width: 100%;
}

body.template-product .product__images {
    position: relative;
    width: 100%;
    min-width: 0;
}

body.template-product .product__badges {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
}

body.template-product .product__slides {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

body.template-product .product__slide,
body.template-product .product__slide.media--hidden,
body.template-product .product__slide.media--active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
}

body.template-product .product__slide:first-child {
    grid-column: 1 / -1;
}

body.template-product .product__photo,
body.template-product .image-wrapper,
body.template-product .product-item__image,
body.template-product .product-item__bg {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
}

body.template-product .lazy-image,
body.template-product .lazy-image.is-loaded,
body.template-product .tbs-image-ready {
    opacity: 1 !important;
    visibility: visible !important;
    background: transparent !important;
}

body.template-product .lazy-image::before,
body.template-product .lazy-image::after,
body.template-product .image-wrapper::before,
body.template-product .image-wrapper::after {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.template-product .product__photo img,
body.template-product .image-wrapper img,
body.template-product img.tbs-product-image,
body.template-product .product__slides img,
body.template-product .product__thumbs img,
body.template-product .product-item__image img,
body.template-product .product-bundle__item-image img,
body.template-product .ingredient-image img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    opacity: 1 !important;
    visibility: visible !important;
    filter: none !important;
    transform: none !important;
}

body.template-product .product__thumbs {
    display: none !important;
}

body.template-product .product__content {
    min-width: 0;
    padding-top: 20px;
}

body.template-product .form__wrapper {
    width: 100%;
    max-width: 420px;
    margin-left: 0;
}

body.template-product .form__width {
    width: 100%;
}

body.template-product .is-sticky {
    position: sticky;
    top: calc(var(--header-height, 127px) + 24px);
}

body.template-product .product__title {
    margin-top: 0;
    line-height: .98;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

body.template-product .product__description__content p {
    margin-top: 0;
}

body.template-product .product__price__wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

body.template-product .product__price [data-product-price],
body.template-product .product__price .woocommerce-Price-amount {
    font-weight: 700;
}

body.template-product .bundle-variant h3,
body.template-product .radio__legend__option-name {
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

body.template-product .bundles {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

body.template-product .bundles .single-product,
body.template-product .bundles .bundle-product {
    min-height: 126px;
}

body.template-product .tbs-hidden-variation-selects {
    display: none !important;
}

body.template-product .radio__buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

body.template-product .radio__button label {
    display: flex;
    width: 100%;
    min-height: 68px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: 1px solid currentColor;
    text-align: center;
    cursor: pointer;
}

body.template-product .radio__button input:checked+label {
    background: #004236;
    border-color: #004236;
    color: #fff;
}

body.template-product .tbs-product-form .quantity,
body.template-product .tbs-product-form input.qty {
    display: none !important;
}

body.template-product .product__submit__buttons,
body.template-product .product__submit__item,
body.template-product .single_add_to_cart_button {
    width: 100%;
}

body.template-product .single_add_to_cart_button {
    position: relative;
    min-height: 48px;
    cursor: pointer !important;
}

body.template-product .single_add_to_cart_button.disabled,
body.template-product .single_add_to_cart_button:disabled {
    cursor: not-allowed !important;
    opacity: .72;
}

body.template-product .single_add_to_cart_button.is-loading {
    cursor: default !important;
    pointer-events: none;
    opacity: .92;
}

body.template-product .single_add_to_cart_button .btn__text {
    display: inline-block;
    max-width: calc(100% - 36px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

body.template-product .single_add_to_cart_button .btn__loader {
    display: none;
    width: 18px;
    height: 18px;
    margin-left: 10px;
    vertical-align: middle;
}

body.template-product .single_add_to_cart_button.is-loading .btn__loader {
    display: inline-block !important;
}

body.template-product .single_add_to_cart_button.is-loading .btn__loader.sf-hidden {
    display: inline-block !important;
}

body.template-product .single_add_to_cart_button .svg-loader {
    display: block;
    width: 18px;
    height: 18px;
    animation: tbs-product-spin .8s linear infinite;
}

body.template-product .single_add_to_cart_button .svg-loader circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

@keyframes tbs-product-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

body.template-product .tbs-product-error {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #b81c23;
    color: #b81c23;
    background: #fff;
    font-size: 13px;
}

body.template-product .loyalty-points-guest {
    border: 1px solid rgba(0, 66, 54, .18);
    padding: 12px 16px;
    background: #fff;
}

body.template-product .loyalty-points-guest p {
    margin: 0;
}

body.template-product .accordion__title {
    cursor: pointer;
}

body.template-product .product-accordion summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.template-product .product-accordion .icon-minus {
    display: none;
}

body.template-product .product-accordion details[open] .icon-plus {
    display: none;
}

body.template-product .product-accordion details[open] .icon-minus {
    display: inline-block;
}

body.template-product .related__products {
    max-width: 1180px;
    margin: 0 auto;
    padding-left: 32px;
    padding-right: 32px;
}

body.template-product #product-recommendations {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
    overflow: visible !important;
}

body.template-product #product-recommendations .grid-item {
    width: auto !important;
    min-width: 0 !important;
}

body.template-product .product-item__view-product .btn {
    width: 100%;
}


@media (max-width: 980px) {

    body.template-product .product__wrapper,
    body.template-product .related__products {
        padding-left: 20px;
        padding-right: 20px;
    }

    body.template-product .product__page {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    body.template-product .form__wrapper {
        max-width: none;
    }

    body.template-product .is-sticky {
        position: static;
    }

    body.template-product #product-recommendations {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }
}

@media (max-width: 560px) {

    body.template-product .product__wrapper,
    body.template-product .related__products {
        padding-left: 16px;
        padding-right: 16px;
    }

    body.template-product .product__slides {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    body.template-product .product__slide:not(:first-child) {
        display: none !important;
    }

    body.template-product .product__thumbs {
        display: flex !important;
        gap: 8px;
        margin-top: 12px;
        overflow-x: auto;
    }

    body.template-product .product__thumbs .tbs-gallery-thumb {
        flex: 0 0 64px;
        width: 64px;
        border: 1px solid transparent;
        padding: 0;
        background: transparent;
        cursor: pointer;
    }

    body.template-product .product__thumbs .tbs-gallery-thumb.is-active {
        border-color: currentColor;
    }

    body.template-product .radio__buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.template-product .bundles {
        flex-wrap: wrap;
    }

    body.template-product .single_add_to_cart_button .btn__text {
        white-space: normal;
    }

    body.template-product #product-recommendations {
        grid-template-columns: 1fr;
    }
}


/* Fix final: drawer + ajax loader + imagen principal de variación */
body.template-product,
body.template-product .single_add_to_cart_button,
body.template-product .single_add_to_cart_button * {
    cursor: auto;
}

body.template-product .single_add_to_cart_button:not(:disabled) {
    cursor: pointer !important;
}

body.template-product .single_add_to_cart_button.is-loading,
body.template-product .single_add_to_cart_button.is-loading * {
    cursor: default !important;
}

body.template-product .single_add_to_cart_button.is-loading {
    pointer-events: none !important;
}

body.template-product .single_add_to_cart_button .btn__loader.sf-hidden {
    display: none !important;
}

body.template-product .single_add_to_cart_button.is-loading .btn__loader,
body.template-product .single_add_to_cart_button.is-loading .btn__loader.sf-hidden {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

body.template-product .single_add_to_cart_button.is-loading .svg-loader {
    animation: tbs-product-spin .8s linear infinite !important;
}






body.template-product .product__slide[data-tbs-gallery-slide="0"] img {
    opacity: 1 !important;
    visibility: visible !important;
    transition: opacity .2s ease;
}

/* Cart drawer WooCommerce */
#cart-drawer.drawer--cart {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483646 !important;
    display: block !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#cart-drawer.drawer--cart.is-open {
    visibility: visible !important;
    pointer-events: auto !important;
}

#cart-drawer.drawer--cart .drawer__inner {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    z-index: 2147483647 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: var(--DRAWER-WIDTH, 508px) !important;
    height: 100dvh !important;
    background: #f8f3e9 !important;
    color: var(--COLOR-TEXT, #373737) !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    transform: translateX(100%) !important;
    transition: transform .28s ease !important;
}

#cart-drawer.drawer--cart.is-open .drawer__inner {
    transform: translateX(0) !important;
}

#cart-drawer.drawer--cart .drawer__underlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483645 !important;
    display: block !important;
    background: rgba(0, 0, 0, .42) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity .25s ease, visibility .25s ease !important;
}

#cart-drawer.drawer--cart.is-open .drawer__underlay {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

body.cart-is-open #cart-drawer.drawer--cart:not(.is-open) .drawer__underlay {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.cart-is-open {
    overflow: hidden !important;
}

#cart-drawer .drawer__body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

#cart-drawer .drawer__foot {
    flex: 0 0 auto !important;
    background: #f8f3e9 !important;
    border-top: 1px solid rgba(55, 55, 55, .12) !important;
}

#cart-drawer .drawer__head {
    position: sticky !important;
    top: 0 !important;
    z-index: 4 !important;
    background: #f8f3e9 !important;
}

#cart-drawer .cart__title {
    position: relative !important;
    padding-right: 44px !important;
}

#cart-drawer .drawer__close {
    cursor: pointer !important;
    border: 0 !important;
}

#cart-drawer .drawer__items.sf-hidden,
#cart-drawer .drawer__empty.sf-hidden,
#cart-drawer .drawer__foot.sf-hidden {
    display: none !important;
}

#cart-drawer:not(.is-empty) .drawer__items {
    display: block !important;
}

#cart-drawer:not(.is-empty) .drawer__empty {
    display: none !important;
}

#cart-drawer.is-empty .drawer__empty {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#cart-drawer.is-empty .drawer__foot {
    display: none !important;
}

#cart-drawer .cart__item {
    display: flex !important;
    align-items: center !important;
    padding: var(--inner, 16px) !important;
    border-bottom: 1px solid rgba(55, 55, 55, .08) !important;
}

#cart-drawer .cart__item__image a {
    display: block !important;
    width: 93px !important;
}

#cart-drawer .cart__item__image img {
    display: block !important;
    width: 93px !important;
    height: 93px !important;
    object-fit: contain !important;
}

#cart-drawer .cart__item__content {
    width: calc(100% - 93px) !important;
    padding-left: 12px !important;
}

#cart-drawer .cart__quantity-counter {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}

#cart-drawer .cart__quantity {
    position: relative !important;
    width: 96px !important;
}

#cart-drawer .cart__quantity-field {
    width: 100% !important;
    height: 36px !important;
    text-align: center !important;
}

#cart-drawer .cart__quantity button {
    position: absolute !important;
    top: 50% !important;
    width: 32px !important;
    height: 36px !important;
    transform: translateY(-50%) !important;
    border: 0 !important;
    background: transparent !important;
    cursor: pointer !important;
}

#cart-drawer .cart__quantity-minus {
    left: 0 !important;
}

#cart-drawer .cart__quantity-plus {
    right: 0 !important;
}

@media (max-width: 560px) {
    #cart-drawer.drawer--cart .drawer__inner {
        max-width: none !important;
    }

    #cart-drawer .cart__item__image a,
    #cart-drawer .cart__item__image img {
        width: 82px !important;
        height: 82px !important;
    }

    #cart-drawer .cart__item__content {
        width: calc(100% - 82px) !important;
    }
}

/* Cart drawer WooCommerce - errores y controles AJAX */
#cart-drawer .cart__errors {
    display: none;
    margin: 12px 20px;
    padding: 12px 14px;
    border: 1px solid #b81c23;
    background: #fff6f6;
    color: #b81c23;
}

#cart-drawer .cart__errors.is-visible {
    display: block !important;
}

#cart-drawer .cart__errors__inner {
    position: relative;
}

#cart-drawer .cart__errors__heading {
    margin: 0 32px 4px 0;
    font-size: 13px;
    font-weight: 700;
    color: #b81c23;
}

#cart-drawer .cart__errors__content {
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
}

#cart-drawer .cart__errors__close {
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #b81c23;
}

#cart-drawer .qty-btn.is-loading,
#cart-drawer .qty-btn:disabled {
    opacity: .45;
    cursor: wait;
    pointer-events: none;
}

/* Cart drawer WooCommerce - loader de cantidad */
#cart-drawer .cart__item {
    position: relative !important;
}

#cart-drawer .cart__item.is-updating {
    pointer-events: none !important;
}

#cart-drawer .cart__item.is-updating::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 3 !important;
    display: block !important;
    background: rgba(255, 255, 255, .72) !important;
}

#cart-drawer .cart__item.is-updating::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    z-index: 4 !important;
    width: 28px !important;
    height: 28px !important;
    margin: -14px 0 0 -14px !important;
    border: 3px solid rgba(0, 66, 54, .2) !important;
    border-top-color: #004236 !important;
    border-radius: 999px !important;
    animation: tbs-cart-drawer-spin .75s linear infinite !important;
}

#cart-drawer.is-updating .drawer__foot {
    pointer-events: none !important;
    opacity: .72 !important;
}

#cart-drawer .cart__quantity-counter.is-updating,
#cart-drawer .cart__quantity-counter.is-updating * {
    cursor: wait !important;
}

@keyframes tbs-cart-drawer-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   Producto mobile v3 - corrige imágenes principales ocultas
   Motivo: .image-wrapper img del CSS base queda absolute;
   al eliminar padding/alto fantasma el contenedor colapsaba.
   ========================================================= */
@media only screen and (max-width: 749px) {
    body.template-product .index-product.section-padding {
        padding-top: 0 !important;
        padding-bottom: 24px !important;
    }

    body.template-product .product__wrapper,
    body.template-product .related__products {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    body.template-product .breadcrumbs {
        margin: 8px 0 14px !important;
        padding: 0 !important;
        font-size: 10px !important;
        line-height: 1.35 !important;
    }

    body.template-product .product__page {
        display: block !important;
        gap: 0 !important;
    }

    body.template-product product-images.product__images {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 0 18px !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    body.template-product .product__slides,
    body.template-product [data-fader-mobile] .product__slides,
    body.template-product .template-product .index-product .product__images .product__slides {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        transform: none !important;
    }

    body.template-product .product__slide {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }

    body.template-product .product__slide:first-child,
    body.template-product .product__slide.media--active {
        display: block !important;
        position: relative !important;
        inset: auto !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    body.template-product .product__slide.media--hidden:not(:first-child),
    body.template-product .product__slide:not(:first-child):not(.media--active) {
        display: none !important;
        position: absolute !important;
        inset: 0 auto auto 100% !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    body.template-product .product__photo {
        position: relative !important;
        display: block !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        overflow: hidden !important;
        filter: none !important;
    }

    body.template-product .product__photo .image-wrapper,
    body.template-product .product__photo figure.image-wrapper {
        position: relative !important;
        inset: auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        aspect-ratio: auto !important;
        overflow: hidden !important;
    }

    body.template-product .product__photo img,
    body.template-product .product__slides img,
    body.template-product .product__slides img.tbs-product-image {
        position: static !important;
        inset: auto !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 360px !important;
        margin: 0 auto !important;
        object-fit: contain !important;
        opacity: 1 !important;
        visibility: visible !important;
        filter: none !important;
        transform: none !important;
    }

    body.template-product .product__thumbs {
        display: flex !important;
        gap: 8px !important;
        width: 100% !important;
        min-height: 0 !important;
        margin: 10px 0 18px !important;
        padding: 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x proximity !important;
    }

    body.template-product .product__thumbs .tbs-gallery-thumb {
        display: block !important;
        flex: 0 0 58px !important;
        width: 58px !important;
        height: 58px !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 2px !important;
        border: 1px solid transparent !important;
        background: #ffffff !important;
        cursor: pointer !important;
        scroll-snap-align: start !important;
    }

    body.template-product .product__thumbs .tbs-gallery-thumb.is-active,
    body.template-product .product__thumbs .tbs-gallery-thumb.is-selected {
        border-color: #004236 !important;
    }

    body.template-product .product__thumbs .image-wrapper,
    body.template-product .product__thumbs .pswp__thumb {
        position: relative !important;
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        aspect-ratio: auto !important;
        overflow: hidden !important;
    }

    body.template-product .product__thumbs img {
        position: static !important;
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }

    body.template-product .product__content {
        padding-top: 0 !important;
    }

    body.template-product .form__wrapper,
    body.template-product .form__width {
        max-width: none !important;
        width: 100% !important;
    }

    body.template-product .product__block.block-padding,
    body.template-product .product__head {
        margin-top: 0 !important;
    }

    body.template-product .product__title {
        margin: 0 !important;
        font-size: clamp(24px, 8vw, 34px) !important;
        line-height: 1 !important;
    }

    body.template-product .product__description,
    body.template-product .pdp-price-wrap,
    body.template-product .bundle-variant,
    body.template-product .product__form__holder,
    body.template-product .product__block--buttons,
    body.template-product collapsible-elements,
    body.template-product .shopify-block.shopify-app-block {
        margin-bottom: 14px !important;
    }

    body.template-product .product__description__content p,
    body.template-product .accordion__content p {
        margin: 0 0 10px !important;
    }

    body.template-product .product-accordion summary {
        min-height: 42px !important;
        padding: 12px 0 !important;
    }

    body.template-product .related__wrapper {
        padding-top: 26px !important;
        padding-bottom: 28px !important;
    }

    body.template-product .related__products .tabs,
    body.template-product .related__products .tab-content {
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        content-visibility: visible !important;
    }

    body.template-product #product-recommendations {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    body.template-product #product-recommendations .grid-item {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
    }

    body.template-product #product-recommendations .product-item__image,
    body.template-product #product-recommendations .product-item__bg {
        position: relative !important;
        display: block !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        overflow: hidden !important;
        filter: none !important;
    }

    body.template-product #product-recommendations .image-wrapper,
    body.template-product #product-recommendations figure.image-wrapper {
        position: relative !important;
        inset: auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 18px !important;
        background: #ffffff !important;
        aspect-ratio: auto !important;
        overflow: hidden !important;
    }

    body.template-product #product-recommendations .product-item__image img,
    body.template-product #product-recommendations .image-wrapper img {
        position: static !important;
        inset: auto !important;
        display: block !important;
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 220px !important;
        margin: 0 auto !important;
        object-fit: contain !important;
        opacity: 1 !important;
        visibility: visible !important;
        filter: none !important;
        transform: none !important;
    }

    body.template-product #product-recommendations .product-information {
        padding: 12px 0 0 !important;
        background: #fafafa !important;
    }
}

/* =========================================================
   Fix v4 mobile producto: relacionados con imagen visible
   ========================================================= */
body.template-product .related__products .tabs-wrapper {
    overflow: visible !important;
}

body.template-product .related__products .tabs {
    display: block !important;
    margin: 0 0 28px !important;
    padding: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
    text-align: center !important;
}

body.template-product .related__products .tabs>li.tab-link {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #004236 !important;
    cursor: default !important;
}

body.template-product .related__products .tabs>li.tab-link span {
    display: block !important;
    color: #004236 !important;
    font-family: var(--FONT-STACK-HEADING, Recoleta, Georgia, serif) !important;
    font-size: clamp(24px, 6.5vw, 34px) !important;
    font-weight: 500 !important;
    line-height: 1.05 !important;
    letter-spacing: -0.02em !important;
    text-transform: none !important;
}

body.template-product #product-recommendations .tbs-related-card {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    background: transparent !important;
}

body.template-product #product-recommendations .tbs-related-card__image-link {
    display: block !important;
    width: 100% !important;
    margin: 0 0 14px !important;
    text-decoration: none !important;
}

body.template-product #product-recommendations .tbs-related-card__image,
body.template-product #product-recommendations .product-item__image.tbs-related-card__image {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 !important;
    padding: 18px !important;
    background: #ffffff !important;
    overflow: hidden !important;
    opacity: 1 !important;
    visibility: visible !important;
    filter: none !important;
}

body.template-product #product-recommendations .tbs-related-card__img,
body.template-product #product-recommendations .product-item__image .tbs-related-card__img {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 240px !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    opacity: 1 !important;
    visibility: visible !important;
    filter: none !important;
    transform: none !important;
}

body.template-product #product-recommendations .tbs-related-card__content,
body.template-product #product-recommendations .product-information.tbs-related-card__content {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.template-product #product-recommendations .tbs-related-card__title {
    margin: 0 0 7px !important;
    color: #004236 !important;
    font-family: var(--FONT-STACK-HEADING, Recoleta, Georgia, serif) !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    line-height: 1.18 !important;
    letter-spacing: -0.01em !important;
}

body.template-product #product-recommendations .tbs-related-card__price {
    margin: 0 0 12px !important;
}

body.template-product #product-recommendations .tbs-related-card__price .price {
    color: #373737 !important;
    font-family: var(--FONT-STACK-BODY, "Aktiv Grotesk", Arial, sans-serif) !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
}

body.template-product #product-recommendations .tbs-related-card__button,
body.template-product #product-recommendations .product-item__view-product .tbs-related-card__button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 42px !important;
    padding: 12px 18px !important;
    border: 1px solid #b9c0bc !important;
    background: #ffffff !important;
    color: #004236 !important;
    font-family: var(--FONT-STACK-BODY, "Aktiv Grotesk", Arial, sans-serif) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
}

@media (max-width: 749px) {
    body.template-product .related__wrapper {
        padding-top: 30px !important;
        padding-bottom: 34px !important;
    }

    body.template-product .related__products {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    body.template-product .related__products .tabs {
        margin-bottom: 22px !important;
        text-align: left !important;
    }

    body.template-product .related__products .tabs>li.tab-link span {
        font-size: 26px !important;
        line-height: 1.05 !important;
    }

    body.template-product #product-recommendations {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    body.template-product #product-recommendations .tbs-related-card {
        display: grid !important;
        grid-template-columns: 96px minmax(0, 1fr) !important;
        gap: 12px !important;
        align-items: start !important;
        padding: 12px !important;
        border: 1px solid rgba(0, 66, 54, 0.12) !important;
        background: #ffffff !important;
    }

    body.template-product #product-recommendations .tbs-related-card__image-link {
        grid-column: 1 !important;
        grid-row: 1 / span 2 !important;
        margin: 0 !important;
    }

    body.template-product #product-recommendations .tbs-related-card__image,
    body.template-product #product-recommendations .product-item__image.tbs-related-card__image {
        width: 96px !important;
        height: 96px !important;
        min-height: 96px !important;
        aspect-ratio: 1 / 1 !important;
        padding: 8px !important;
        background: #fafafa !important;
    }

    body.template-product #product-recommendations .tbs-related-card__img,
    body.template-product #product-recommendations .product-item__image .tbs-related-card__img {
        max-width: 100% !important;
        max-height: 100% !important;
    }

    body.template-product #product-recommendations .tbs-related-card__content,
    body.template-product #product-recommendations .product-information.tbs-related-card__content {
        grid-column: 2 !important;
        grid-row: 1 !important;
        align-self: start !important;
    }

    body.template-product #product-recommendations .tbs-related-card__title {
        font-size: 15px !important;
        line-height: 1.18 !important;
    }

    body.template-product #product-recommendations .tbs-related-card__price {
        margin-bottom: 10px !important;
    }

    body.template-product #product-recommendations .tbs-related-card__button-wrap {
        grid-column: 1 / -1 !important;
        margin-top: 2px !important;
    }
}

/* =========================================================
   Product dynamic ACF fields
========================================================= */
body.template-product .tbs-product-summary-data {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: -4px;
}

body.template-product .tbs-product-summary-data__item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 10px;
    border: 1px solid rgba(0, 66, 54, 0.18);
    background: #fff;
    color: #004236;
    font-family: var(--FONT-STACK-BODY, Arial, sans-serif);
    font-size: 12px;
    line-height: 1.2;
}

body.template-product .tbs-product-summary-data__item strong {
    font-weight: 700;
}

body.template-product .tbs-product-highlights {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.template-product .tbs-product-highlights li {
    position: relative;
    margin: 0;
    padding-left: 18px;
    color: #373737;
    font-family: var(--FONT-STACK-BODY, Arial, sans-serif);
    font-size: 14px;
    line-height: 1.45;
}

body.template-product .tbs-product-highlights li::before {
    content: "";
    position: absolute;
    top: 0.62em;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #004236;
}

body.template-product .tbs-product-specs {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
}

body.template-product .tbs-product-specs__row {
    display: grid;
    grid-template-columns: minmax(95px, 38%) minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(0, 66, 54, 0.12);
}

body.template-product .tbs-product-specs__row:first-child {
    padding-top: 0;
}

body.template-product .tbs-product-specs__row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

body.template-product .tbs-product-specs dt,
body.template-product .tbs-product-specs dd {
    margin: 0;
    color: #373737;
    font-family: var(--FONT-STACK-BODY, Arial, sans-serif);
    font-size: 13px;
    line-height: 1.35;
}

body.template-product .tbs-product-specs dt {
    color: #004236;
    font-weight: 700;
}

@media (max-width: 560px) {
    body.template-product .tbs-product-summary-data {
        gap: 6px;
    }

    body.template-product .tbs-product-summary-data__item {
        padding: 6px 8px;
        font-size: 11px;
    }

    body.template-product .tbs-product-specs__row {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

/* =========================================================
   Fix variaciones mobile: mantener visible la slide activa
   y permitir que JS fuerce la imagen de variación en slide 0
   ========================================================= */
@media only screen and (max-width: 749px) {
    body.template-product .product__slides .product__slide {
        display: none !important;
        position: absolute !important;
        inset: 0 auto auto 100% !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    body.template-product .product__slides .product__slide.media--active {
        display: block !important;
        position: relative !important;
        inset: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    body.template-product .product__slides .product__slide.media--active .product__photo,
    body.template-product .product__slides .product__slide.media--active .image-wrapper,
    body.template-product .product__slides .product__slide.media--active img {
        opacity: 1 !important;
        visibility: visible !important;
    }

    body.template-product .product__thumbs [data-tbs-gallery-thumb].is-active,
    body.template-product .product__thumbs [data-tbs-gallery-thumb].is-selected {
        border-color: #004236 !important;
    }
}

/* =========================================================
   Single product - relacionados como Productos destacados home
   Carrusel real, 4 productos desktop, 2 tablet/mobile
   ========================================================= */
body.template-product .tbs-related-carousel-section,
body.template-product #shopify-section-template--woocommerce-product__related {
    display: block !important;
    width: 100% !important;
    padding: 58px 0 74px !important;
    background: #fafafa !important;
    color: #004236 !important;
    overflow: hidden !important;
}

body.template-product .tbs-related-carousel-wrapper {
    position: relative !important;
    width: min(100%, 1180px) !important;
    margin: 0 auto !important;
    padding: 0 32px !important;
    box-sizing: border-box !important;
}

body.template-product .tbs-related-carousel-heading {
    margin: 0 0 34px !important;
    text-align: center !important;
}

body.template-product .tbs-related-carousel-title {
    margin: 0 !important;
    color: #004236 !important;
    font-family: var(--FONT-STACK-HEADING, Recoleta, Georgia, "Times New Roman", serif) !important;
    font-size: clamp(28px, 2.3vw, 42px) !important;
    font-weight: 700 !important;
    line-height: 1.05 !important;
    letter-spacing: -0.035em !important;
    text-align: center !important;
    text-transform: none !important;
}

body.template-product .tbs-related-carousel-viewport {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body.template-product #product-recommendations.tbs-related-carousel-track,
body.template-product .tbs-related-carousel-track {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: stretch !important;
    gap: 28px !important;
    width: auto !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    transform: translate3d(0, 0, 0);
    transition: transform .42s ease !important;
    will-change: transform;
}

body.template-product .tbs-related-carousel-card {
    position: relative !important;
    display: flex !important;
    flex: 0 0 calc((100% - 84px) / 4) !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    flex-direction: column !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    color: #004236 !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

body.template-product .tbs-related-carousel-card__image-link,
body.template-product .tbs-related-carousel-card__title-link {
    display: block !important;
    color: inherit !important;
    text-decoration: none !important;
    background-image: none !important;
    box-shadow: none !important;
}

body.template-product .tbs-related-carousel-card__figure {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.template-product .tbs-related-carousel-card__figure::before,
body.template-product .tbs-related-carousel-card__figure::after {
    content: none !important;
    display: none !important;
}

body.template-product .tbs-related-carousel-card__img,
body.template-product .tbs-related-carousel-card__figure img {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
    opacity: 1 !important;
    visibility: visible !important;
    filter: none !important;
    transform: none !important;
    transition: transform .35s ease !important;
}

body.template-product .tbs-related-carousel-card:hover .tbs-related-carousel-card__img,
body.template-product .tbs-related-carousel-card:focus-within .tbs-related-carousel-card__img {
    transform: scale(1.035) !important;
}

body.template-product .tbs-related-carousel-card__content {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 18px 0 0 !important;
    background: transparent !important;
    color: #004236 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.template-product .tbs-related-carousel-card__title {
    display: block !important;
    margin: 0 0 8px !important;
    color: #004236 !important;
    font-family: var(--FONT-STACK-HEADING, Recoleta, Georgia, "Times New Roman", serif) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em !important;
    text-align: left !important;
}

body.template-product .tbs-related-carousel-card__price {
    margin: 0 0 16px !important;
    color: #004236 !important;
    font-family: var(--FONT-STACK-BODY, "Aktiv Grotesk", Arial, sans-serif) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

body.template-product .tbs-related-carousel-card__price del {
    margin-right: 8px !important;
    color: #777777 !important;
    font-weight: 400 !important;
}

body.template-product .tbs-related-carousel-card__price ins {
    color: #c10000 !important;
    text-decoration: none !important;
}

body.template-product .tbs-related-carousel-card__button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 42px !important;
    margin-top: auto !important;
    padding: 12px 22px !important;
    border: 1px solid #004236 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    color: #004236 !important;
    font-family: var(--FONT-STACK-BODY, "Aktiv Grotesk", Arial, sans-serif) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: .04em !important;
    text-align: center !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    background-image: none !important;
    box-shadow: none !important;
    transition: background .2s ease, color .2s ease, border-color .2s ease !important;
}

body.template-product .tbs-related-carousel-card__button:hover,
body.template-product .tbs-related-carousel-card__button:focus {
    border-color: #004236 !important;
    background: #004236 !important;
    color: #ffffff !important;
    outline: none !important;
}

body.template-product .tbs-related-carousel-arrow {
    position: absolute !important;
    top: calc(50% + 18px) !important;
    z-index: 5 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    border: 1px solid rgba(0, 66, 54, .16) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .94) !important;
    color: #004236 !important;
    cursor: pointer !important;
    transform: translateY(-50%) !important;
    box-shadow: none !important;
}

body.template-product .tbs-related-carousel-arrow span {
    display: block !important;
    width: 11px !important;
    height: 11px !important;
    border-top: 2px solid currentColor !important;
    border-left: 2px solid currentColor !important;
}

body.template-product .tbs-related-carousel-arrow--prev {
    left: 8px !important;
}

body.template-product .tbs-related-carousel-arrow--prev span {
    transform: translateX(2px) rotate(-45deg) !important;
}

body.template-product .tbs-related-carousel-arrow--next {
    right: 8px !important;
}

body.template-product .tbs-related-carousel-arrow--next span {
    transform: translateX(-2px) rotate(135deg) !important;
}

body.template-product .tbs-related-carousel-arrow[disabled] {
    opacity: .35 !important;
    cursor: default !important;
    pointer-events: none !important;
}

body.template-product .tbs-related-carousel-dots {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin: 24px 0 0 !important;
    padding: 0 !important;
}

body.template-product .tbs-related-carousel-dot {
    display: block !important;
    width: 7px !important;
    height: 7px !important;
    min-width: 7px !important;
    padding: 0 !important;
    border: 1px solid #004236 !important;
    border-radius: 999px !important;
    background: transparent !important;
    cursor: pointer !important;
}

body.template-product .tbs-related-carousel-dot.is-active {
    background: #004236 !important;
}

@media (max-width: 980px) {

    body.template-product .tbs-related-carousel-section,
    body.template-product #shopify-section-template--woocommerce-product__related {
        padding: 48px 0 58px !important;
    }

    body.template-product .tbs-related-carousel-wrapper {
        padding: 0 20px !important;
    }

    body.template-product .tbs-related-carousel-track {
        gap: 22px !important;
    }

    body.template-product .tbs-related-carousel-card {
        flex-basis: calc((100% - 22px) / 2) !important;
    }
}

@media (max-width: 560px) {

    body.template-product .tbs-related-carousel-section,
    body.template-product #shopify-section-template--woocommerce-product__related {
        padding: 42px 0 50px !important;
    }

    body.template-product .tbs-related-carousel-wrapper {
        padding: 0 16px !important;
    }

    body.template-product .tbs-related-carousel-heading {
        margin-bottom: 24px !important;
    }

    body.template-product .tbs-related-carousel-title {
        font-size: 26px !important;
    }

    body.template-product .tbs-related-carousel-track {
        gap: 16px !important;
    }

    body.template-product .tbs-related-carousel-card {
        flex-basis: calc((100% - 16px) / 2) !important;
    }

    body.template-product .tbs-related-carousel-card__title,
    body.template-product .tbs-related-carousel-card__price {
        font-size: 13px !important;
    }

    body.template-product .tbs-related-carousel-card__button {
        min-height: 36px !important;
        padding: 10px 12px !important;
        font-size: 10px !important;
    }

    body.template-product .tbs-related-carousel-arrow {
        display: none !important;
    }
}

/* =========================================================
   Single product - imagen/galería sticky en desktop
   Mantiene la columna de imágenes visible durante el scroll.
   Si el producto tiene galería, la galería completa viaja junto.
   ========================================================= */

@media (min-width: 981px) {
    body.template-product .product__page {
        align-items: flex-start !important;
    }

    body.template-product product-images.product__images,
    body.template-product .product__images {
        position: sticky !important;
        top: var(--tbs-product-sticky-top, 24px) !important;
        align-self: flex-start !important;
        z-index: 2 !important;
        max-height: calc(100dvh - var(--tbs-product-sticky-top, 24px) - 24px) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain !important;
        scrollbar-width: thin !important;
        scrollbar-color: rgba(0, 66, 54, 0.35) transparent !important;
    }

    body.template-product product-images.product__images::-webkit-scrollbar,
    body.template-product .product__images::-webkit-scrollbar {
        width: 6px !important;
    }

    body.template-product product-images.product__images::-webkit-scrollbar-thumb,
    body.template-product .product__images::-webkit-scrollbar-thumb {
        background: rgba(0, 66, 54, 0.35) !important;
        border-radius: 999px !important;
    }

    body.template-product product-images.product__images::-webkit-scrollbar-track,
    body.template-product .product__images::-webkit-scrollbar-track {
        background: transparent !important;
    }

    body.template-product .product__images .product__slides,
    body.template-product .product__images .product__thumbs {
        position: relative !important;
        z-index: 1 !important;
    }
}

@media (max-width: 980px) {

    body.template-product product-images.product__images,
    body.template-product .product__images {
        position: relative !important;
        top: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
}