/**
 * np_prodtallas — layout PLP para Hummingbird / Bootstrap 5.3.
 *
 * Esta hoja es la única responsable de tallas, colores y COMPRAR.
 * La card, su imagen, metadatos, precios y promociones pertenecen al tema.
 */

.product-tallas.doxie-layout {
    --np-pt-arrow-w: 22px;
    --np-pt-gap: 4px;
    --np-pt-size-chip: 32px;
    --np-pt-track-w: calc(100% - (var(--np-pt-arrow-w) * 2));
    position: relative;
    z-index: 5;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
    margin: 0.15rem 0 0;
    box-sizing: border-box;
}

.product-tallas.doxie-layout .doxie-section {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
}

.product-tallas.doxie-layout .doxie-section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0.75rem;
    margin: 0;
}

.product-tallas.doxie-layout .doxie-section-title {
    display: block;
    margin: 0;
    padding: 0;
    color: #111;
    font-size: 0.625rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
}

.product-tallas.doxie-layout .doxie-slider-wrapper {
    position: relative;
    display: grid;
    grid-template-columns: var(--np-pt-arrow-w) minmax(0, 1fr) var(--np-pt-arrow-w);
    align-items: center;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
    box-sizing: border-box;
}

.product-tallas.doxie-layout .doxie-slider-track {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--np-pt-gap);
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.product-tallas.doxie-layout .doxie-sizes-group {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: var(--np-pt-gap);
    width: max-content;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.product-tallas.doxie-layout .doxie-sizes-group[hidden],
.product-tallas.doxie-layout .doxie-slider-track > [hidden] {
    display: none !important;
}

.product-tallas.doxie-layout .doxie-slider-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    width: var(--np-pt-arrow-w);
    min-width: var(--np-pt-arrow-w);
    min-height: 2rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #3b7461;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}

.product-tallas.doxie-layout .doxie-slider-arrow-left {
    grid-column: 1;
}

.product-tallas.doxie-layout .doxie-slider-arrow-right {
    grid-column: 3;
}

.product-tallas.doxie-layout .doxie-slider-arrow .material-icons {
    width: 1rem;
    height: 1rem;
    font-size: 1rem;
    line-height: 1;
}

.product-tallas.doxie-layout .doxie-slider-arrow.doxie-active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.product-tallas.doxie-layout .doxie-slider-arrow.doxie-active:hover {
    background-color: #f3f3f3;
    color: #111;
}

.product-tallas.doxie-layout .doxie-slider-arrow:focus-visible,
.product-tallas.doxie-layout .doxie-size-item:focus-visible,
.product-tallas.doxie-layout .doxie-color-item-wrapper:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

.product-tallas.doxie-layout .doxie-size-item {
    display: inline-flex;
    flex: 0 0 var(--np-pt-item-size, var(--np-pt-size-chip));
    align-items: center;
    justify-content: center;
    width: var(--np-pt-item-size, var(--np-pt-size-chip));
    min-width: var(--np-pt-item-size, var(--np-pt-size-chip));
    max-width: var(--np-pt-item-size, var(--np-pt-size-chip));
    height: 2rem;
    margin: 0;
    padding: 0 0.25rem;
    border: 1px solid #d0d0d0;
    border-radius: 0;
    background: #fff;
    color: #111 !important;
    font: inherit;
    font-size: 0.6875rem;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.product-tallas.doxie-layout .doxie-size-item:hover:not(:disabled) {
    border-color: #111;
    background-color: #111;
    color: #fff !important;
}

.product-tallas.doxie-layout .doxie-size-item.select {
    border: 2px solid #111;
    background-color: #fff;
    color: #111 !important;
    font-weight: 600;
}

.product-tallas.doxie-layout .doxie-size-item.doxie-size-disabled,
.product-tallas.doxie-layout .doxie-size-item:disabled {
    position: relative;
    border-color: #ddd;
    background-color: #eee;
    color: #999 !important;
    cursor: not-allowed;
    opacity: 1;
}

.product-tallas.doxie-layout .doxie-size-item.doxie-size-disabled::after,
.product-tallas.doxie-layout .doxie-size-item:disabled::after {
    position: absolute;
    inset: 50% -0.2rem auto;
    border-top: 1px solid #aaa;
    content: "";
    transform: rotate(-38deg);
}

.product-tallas.doxie-layout .doxie-color-item-wrapper {
    position: relative;
    display: inline-flex;
    flex: 0 0 var(--np-pt-item-size, var(--np-color-thumb-h, 48px));
    align-items: center;
    justify-content: center;
    width: var(--np-pt-item-size, var(--np-color-thumb-h, 48px));
    min-width: var(--np-pt-item-size, var(--np-color-thumb-h, 48px));
    max-width: var(--np-pt-item-size, var(--np-color-thumb-h, 48px));
    height: var(--np-pt-item-size, var(--np-color-thumb-h, 48px));
    min-height: var(--np-pt-item-size, var(--np-color-thumb-h, 48px));
    max-height: var(--np-pt-item-size, var(--np-color-thumb-h, 48px));
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: inherit;
    cursor: pointer;
    box-sizing: border-box;
}

.product-tallas.doxie-layout .doxie-color-item {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    margin: 0;
    padding: 0;
    border: 1px solid #d0d0d0;
    border-radius: 0;
    background-color: #fff;
    object-fit: contain;
    object-position: center;
    box-sizing: border-box;
}

.product-tallas.doxie-layout .doxie-color-item.selected-image {
    border: 2px solid #111;
}

.product-tallas.doxie-layout .doxie-slider-wrapper.doxie-slider-overlay-arrows {
    grid-template-columns: minmax(0, 1fr);
}

.product-tallas.doxie-layout .doxie-slider-wrapper.doxie-slider-overlay-arrows .doxie-slider-track {
    grid-column: 1;
}

.product-tallas.doxie-layout .doxie-slider-wrapper.doxie-slider-overlay-arrows .doxie-slider-arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 1.5rem;
    min-width: 1.5rem;
    background-color: rgb(255 255 255 / 92%);
}

.product-tallas.doxie-layout .doxie-slider-wrapper.doxie-slider-overlay-arrows .doxie-slider-arrow-left {
    left: 0;
}

.product-tallas.doxie-layout .doxie-slider-wrapper.doxie-slider-overlay-arrows .doxie-slider-arrow-right {
    right: 0;
}

.products-list .product-tallas.doxie-layout .doxie-slider-track,
.products-list .product-tallas.doxie-layout .doxie-sizes-group {
    justify-content: flex-start;
}

/* Alinear COMPRAR: reserva el slot de tallas solo cuando la opción está activa. */
body.np-pt-align-buy-nosize .product-tallas.doxie-layout[data-np-pt-has-colors="1"] {
    display: grid;
    grid-template-areas:
        "sizes"
        "colors";
    grid-template-rows: minmax(4.25rem, auto) auto;
    gap: 0.5rem;
}

body.np-pt-align-buy-nosize .product-tallas.doxie-layout .doxie-section-sizes {
    grid-area: sizes;
}

body.np-pt-align-buy-nosize .product-tallas.doxie-layout .doxie-section-colors {
    grid-area: colors;
}

.product-tallas.doxie-layout + .np-pt-cart-form,
.product-tallas.np-prodtallas-oos + .np-pt-cart-form {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 2.65rem;
    margin: 0.5rem 0 0.15rem;
    padding: 0;
}

.np-pt-cart-form .customAddToCart {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: var(--np-pt-track-w, calc(100% - 44px));
    max-width: 100%;
    min-height: 2rem;
    margin: 0;
    padding: 0.35rem 0.65rem;
    border: 1px solid #111;
    border-radius: 0;
    background-color: #111;
    color: #fff !important;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    box-shadow: none;
    box-sizing: border-box;
    transition: color 0.15s ease, background-color 0.15s ease, opacity 0.2s ease;
}

.np-pt-cart-form .customAddToCart.is-np-pt-visible {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.np-pt-cart-form .customAddToCart:hover:not(:disabled) {
    border-color: #333;
    background-color: #333;
    color: #fff !important;
}

.np-pt-cart-form .customAddToCart:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
    box-shadow: none;
}

.np-pt-cart-form .customAddToCart:disabled {
    cursor: wait;
    opacity: 0.65;
}

.np-pt-cart-form .customAddToCart .material-icons {
    width: 1rem;
    height: 1rem;
    margin: 0;
    color: inherit !important;
    font-size: 1rem;
    line-height: 1;
}

/* Shell y estado de carga: acotados al componente, sin alterar la card. */
.product-tallas.doxie-layout.np-pt-shell,
.product-tallas.doxie-layout.np-pt-loading,
.product-tallas.doxie-layout:not([data-np-pt-ready="1"]) {
    min-height: var(--np-pt-block-h, 5.5rem);
}

.product-tallas.doxie-layout.np-pt-shell::before,
.product-tallas.doxie-layout.np-pt-loading::before,
.product-tallas.doxie-layout:not([data-np-pt-ready="1"])::before {
    position: absolute;
    inset: 0;
    z-index: 6;
    background: rgb(255 255 255 / 72%);
    content: "";
    pointer-events: none;
}

.product-tallas.doxie-layout.np-pt-shell::after,
.product-tallas.doxie-layout.np-pt-loading::after,
.product-tallas.doxie-layout:not([data-np-pt-ready="1"])::after {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 7;
    width: 1.65rem;
    height: 1.65rem;
    margin: -0.825rem 0 0 -0.825rem;
    border: 0.18rem solid rgb(0 0 0 / 12%);
    border-top-color: #111;
    border-radius: 50%;
    content: "";
    animation: np-pt-spin 0.7s linear infinite;
    pointer-events: none;
}

@keyframes np-pt-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Sin stock. */
.product-tallas.np-prodtallas-oos {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 4.75rem;
    margin: 0;
    padding: 0.85rem 0.5rem;
    box-sizing: border-box;
}

.np-prodtallas-oos-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: #c96666;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    text-align: center;
}

.np-prodtallas-oos-status .material-icons {
    color: inherit;
    font-size: 1.25rem;
    line-height: 1;
}

/* Indicador de color configurable. */
.np-pt-color-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    z-index: 2;
    width: 10px;
    height: 10px;
    border: 1.5px solid rgb(255 255 255 / 95%);
    border-radius: 50%;
    background-color: transparent;
    background-position: center;
    background-size: cover;
    box-shadow: 0 0 0 1px rgb(0 0 0 / 25%);
    pointer-events: none;
    box-sizing: border-box;
}

.np-pt-color-dot.is-empty {
    display: none;
}

body.np-pt-color-dot-style-corner .np-pt-color-dot {
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

body.np-pt-color-dot-hover .np-pt-color-dot {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.15s ease, opacity 0.15s ease;
}

body.np-pt-color-dot-hover .doxie-color-item-wrapper:hover > .np-pt-color-dot:not(.is-empty),
body.np-pt-color-dot-hover .doxie-color-item-wrapper:focus-visible > .np-pt-color-dot:not(.is-empty),
body.np-pt-color-dot-hover .product-miniature.is-np-pt-touch .np-pt-color-dot:not(.is-empty) {
    visibility: visible;
    opacity: 1;
}

@media (min-width: 768px) {
    .product-tallas.doxie-layout {
        --np-pt-arrow-w: 32px;
        --np-pt-size-chip: 36px;
    }

    .product-tallas.doxie-layout .doxie-section-title {
        font-size: 0.75rem;
    }

    .product-tallas.doxie-layout .doxie-size-item {
        font-size: 0.8125rem;
    }

    .np-pt-cart-form .customAddToCart {
        width: var(--np-pt-track-w, calc(100% - 64px));
    }
}

@media (max-width: 767.98px) {
    .np-pt-color-dot {
        top: 1px;
        right: 1px;
        width: 8px;
        height: 8px;
    }

    .np-pt-cart-form .customAddToCart {
        padding-inline: 0.5rem;
        font-size: 0.6875rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-tallas.doxie-layout .doxie-slider-arrow,
    .product-tallas.doxie-layout .doxie-size-item,
    .np-pt-cart-form .customAddToCart,
    .np-pt-color-dot {
        transition: none;
    }

    .product-tallas.doxie-layout.np-pt-shell::after,
    .product-tallas.doxie-layout.np-pt-loading::after,
    .product-tallas.doxie-layout:not([data-np-pt-ready="1"])::after {
        animation: none;
    }
}
