/*
 * Terminación visual de la opción TeamPoint.
 * Referencias: HTML de la ficha enviado por el usuario y captura móvil.
 * Se aplica ÚNICAMENTE al abrir una ficha con el diseño TeamPoint elegido
 * en Apariencia, sin modificar los demás diseños del escaparate.
 */

/* La categoría extra forma parte de las migas de TeamPoint, no de la ficha base. */
#productDetail .teampoint-breadcrumb-category { display: none; }

/* El header SIEMPRE conserva el diseño, los SVG y la distribución configurados
   en Apariencia. TeamPoint solo modifica la ficha y su galería. */

/* Eliminar las tarjetas y los bloques de la ficha original. */
html[data-product-detail-layout="teampoint"] body.product-detail-open #productDetail.product-detail-section.active {
    width: 100% !important;
    min-height: 0 !important;
    background: #fff !important;
    border: 0 !important;
    box-shadow: none !important;
}
html[data-product-detail-layout="teampoint"] body.product-detail-open #productDetail > .product-detail-card,
html[data-product-detail-layout="teampoint"] body.product-detail-open #productDetail .product-detail-info {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
}
html[data-product-detail-layout="teampoint"] #productDetail .detail-breadcrumb {
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 9px !important;
    color: #646464 !important;
    font-family: "Roboto Mono", monospace !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}
html[data-product-detail-layout="teampoint"] #productDetail .detail-breadcrumb #detailBreadcrumbStore { display: none !important; }
html[data-product-detail-layout="teampoint"] #productDetail .detail-breadcrumb .teampoint-breadcrumb-category {
    display: inline !important;
    color: #696969 !important;
}
html[data-product-detail-layout="teampoint"] #productDetail .detail-breadcrumb i { display: none !important; }
html[data-product-detail-layout="teampoint"] #productDetail .detail-breadcrumb #detailBreadcrumbHome::after,
html[data-product-detail-layout="teampoint"] #productDetail .detail-breadcrumb .teampoint-breadcrumb-category::after {
    content: "·";
    display: inline-block;
    margin-left: 9px;
    color: #6f6f6f;
}
html[data-product-detail-layout="teampoint"] #productDetail .detail-breadcrumb #detailBreadcrumbName {
    min-width: 0;
    color: #111 !important;
    font-weight: 400 !important;
    text-transform: uppercase;
    text-overflow: ellipsis;
}
html[data-product-detail-layout="teampoint"] #productDetail .product-detail-title {
    color: #090909 !important;
    font-family: "Work Sans", Arial, sans-serif !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
}
html[data-product-detail-layout="teampoint"] #productDetail .product-detail-price,
html[data-product-detail-layout="teampoint"] #productDetail .product-detail-current {
    align-items: baseline !important;
    background: transparent !important;
    box-shadow: none !important;
}
html[data-product-detail-layout="teampoint"] #productDetail .product-detail-price :is(.price-old,.price-new) {
    color: #111 !important;
    font-family: "Roboto Mono", monospace !important;
    font-weight: 400 !important;
}
html[data-product-detail-layout="teampoint"] #productDetail .product-detail-transfer { display: none !important; }
/* Solo «Envío gratis» se destaca en verde; las promociones mantienen su naranja. */
html[data-product-detail-layout="teampoint"] #productDetail .teampoint-shipping-highlight strong { color: #198754 !important; }
html[data-product-detail-layout="teampoint"] #productDetail .teampoint-product-promotion strong { color: #c75d20 !important; }
html[data-product-detail-layout="teampoint"] #productDetail .teampoint-detail-accordions,
html[data-product-detail-layout="teampoint"] #productDetail .teampoint-info-accordion {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
}
html[data-product-detail-layout="teampoint"] #productDetail .teampoint-info-accordion summary {
    color: #111 !important;
    text-transform: uppercase !important;
    font-weight: 400 !important;
}
html[data-product-detail-layout="teampoint"] #productDetail .detail-size-required-notice:not([hidden]) {
    margin-top: 9px;
    color: #111;
    background: #f6f6f6;
    border: 1px solid #ddd;
    border-radius: 0;
    font-family: "Roboto Mono", monospace;
}

@media (max-width: 900px) {
    html[data-product-detail-layout="teampoint"] body.product-detail-open #productDetail.product-detail-section.active {
        max-width: none !important;
        padding: 0 0 36px !important;
    }
    html[data-product-detail-layout="teampoint"] #productDetail > .product-detail-card {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0 !important;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .product-detail-info {
        width: 100% !important;
        padding: 15px 15px 29px !important;
        font-family: "Roboto Mono", "Courier New", monospace !important;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .product-detail-info > .detail-breadcrumb {
        margin: 0 0 12px !important;
        font-size: 10px !important;
        line-height: 1.55 !important;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .product-detail-title {
        margin: 0 0 18px !important;
        font-size: clamp(15px, 4.1vw, 18px) !important;
        line-height: 1.24 !important;
        letter-spacing: -.015em !important;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .product-detail-price {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: baseline !important;
        justify-content: space-between !important;
        gap: 6px 9px !important;
        margin: 0 !important;
        padding: 0 0 19px !important;
        border-bottom: 1px solid #dedede !important;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .product-detail-old-row:not([hidden]) { display: inline-flex !important; }
    html[data-product-detail-layout="teampoint"] #productDetail .product-detail-price :is(.price-old,.price-new) {
        font-size: 12px !important;
        letter-spacing: -.035em !important;
        white-space: nowrap;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .product-detail-current {
        flex: 0 0 auto !important;
        margin-right: auto;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .teampoint-installments:not([hidden]) {
        flex: 0 1 auto !important;
        font-size: clamp(8px, 2.3vw, 10px) !important;
        text-align: right !important;
        line-height: 1.45 !important;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .teampoint-shipping-highlight:not([hidden]) {
        gap: 10px !important;
        margin: 0 !important;
        padding: 21px 0 19px !important;
        font-size: 11px !important;
        line-height: 1.6 !important;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .teampoint-shipping-highlight > .teampoint-line-icon { margin-top: 2px !important; }
    html[data-product-detail-layout="teampoint"] #productDetail .teampoint-product-promotion:not([hidden]) {
        margin: 9px 0 21px !important;
        font-size: 10.5px !important;
        line-height: 1.65 !important;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .teampoint-product-promotion strong {
        font-size: 15px !important;
        line-height: 1.5;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .teampoint-color-variant:not([hidden]),
    html[data-product-detail-layout="teampoint"] #productDetail .detail-size-section.teampoint-color-options:not([hidden]) {
        margin: 18px 0 19px !important;
        padding: 0 !important;
        border: 0 !important;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .teampoint-color-label,
    html[data-product-detail-layout="teampoint"] #productDetail .teampoint-color-options #detailSizeTitle::before {
        font-size: 10px !important;
        font-weight: 400 !important;
        letter-spacing: .12em !important;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .teampoint-color-swatch,
    html[data-product-detail-layout="teampoint"] #productDetail .teampoint-color-options .size-option {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .detail-purchase-title,
    html[data-product-detail-layout="teampoint"] #productDetail .detail-quantity,
    html[data-product-detail-layout="teampoint"] #productDetail #detailBackToProducts { display: none !important; }
    html[data-product-detail-layout="teampoint"] #productDetail .product-detail-info > .detail-purchase-section {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .detail-purchase-row,
    html[data-product-detail-layout="teampoint"] #productDetail .detail-actions { display: block !important; width: 100% !important; }
    html[data-product-detail-layout="teampoint"] body.product-detail-open #productDetail #detailAddToCart,
    html[data-product-detail-layout="teampoint"] body.product-detail-open #productDetail #detailAddToCart:not(:disabled):is(:hover,:focus,:active) {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        min-height: 39px !important;
        padding: 9px 10px !important;
        border: 1px solid #303030 !important;
        border-radius: 4px !important;
        color: #fff !important;
        background: #303030 !important;
        box-shadow: none !important;
        font-family: "Roboto Mono", monospace !important;
        font-size: 10px !important;
        font-weight: 400 !important;
        letter-spacing: .22em !important;
        text-transform: uppercase !important;
    }
    html[data-product-detail-layout="teampoint"] #productDetail #detailAddToCart:disabled { opacity: .5; cursor: not-allowed; }
    html[data-product-detail-layout="teampoint"] #productDetail .teampoint-detail-accordions {
        margin: 24px 0 16px !important;
        padding: 0 !important;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .teampoint-info-accordion summary {
        min-height: 42px !important;
        padding: 10px 0 !important;
        gap: 13px !important;
        font-size: 10px !important;
        line-height: 1.4 !important;
        letter-spacing: .16em !important;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .teampoint-info-accordion summary > .teampoint-line-icon:first-child {
        width: 14px !important;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .teampoint-info-accordion summary .teampoint-chevron { width: 12px !important; }
    html[data-product-detail-layout="teampoint"] #productDetail .product-detail-info > .detail-description-title { display: none !important; }
    html[data-product-detail-layout="teampoint"] #productDetail .product-detail-info > .product-description:not([hidden]) {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 16px 0 20px !important;
        padding: 0 !important;
        color: #303030 !important;
        background: none !important;
        border: 0 !important;
        box-shadow: none !important;
        font-family: "Work Sans", Arial, sans-serif !important;
        font-size: 14px !important;
        font-weight: 400 !important;
        line-height: 1.7 !important;
        letter-spacing: .01em !important;
        white-space: pre-line !important;
        overflow: visible !important;
    }
}

/* SVG solo de línea, como los íconos de envío y pagos de la referencia. */
html[data-product-detail-layout="teampoint"] #productDetail .teampoint-line-icon {
    display: block;
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    overflow: visible;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.6px;
    stroke-linecap: round;
    stroke-linejoin: round;
}
html[data-product-detail-layout="teampoint"] #productDetail .teampoint-line-icon * {
    fill: none !important;
    stroke: currentColor !important;
}
html[data-product-detail-layout="teampoint"] #productDetail .teampoint-info-accordion .teampoint-chevron {
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    margin-left: auto;
    transition: transform .18s ease;
}

/* Referencia TeamPoint (Rio): .btn-variant-no-stock usa una raya diagonal
   sobre el botón, manteniendo su fondo transparente y el borde tenue. */
html[data-product-detail-layout="teampoint"] #productDetail .size-option.sold-out,
html[data-product-detail-layout="teampoint"] #productDetail .size-option.sold-out:hover {
    position: relative !important;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .3) !important;
    border-radius: 2px !important;
    color: rgba(0, 0, 0, .5) !important;
    background: transparent !important;
    text-decoration: none !important;
    opacity: 1 !important;
    cursor: not-allowed;
}
html[data-product-detail-layout="teampoint"] #productDetail .size-option.sold-out::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top left, transparent 49%, rgba(0,0,0,.5) 50%, transparent 52%);
    content: "";
    pointer-events: none;
}
html[data-product-detail-layout="teampoint"] #productDetail .teampoint-color-options .size-option.sold-out {
    background: var(--teampoint-option-color, #fff) !important;
}
html[data-product-detail-layout="teampoint"] #productDetail .teampoint-color-options .size-option.sold-out::after {
    background: linear-gradient(-45deg, rgba(255,255,255,.3) calc(50% - .7px), rgba(0,0,0,.5) calc(50% - .7px), rgba(0,0,0,.5) 50%, rgba(0,0,0,.5) calc(50% + .7px), rgba(255,255,255,.3) calc(50% + .7px));
}
html[data-product-detail-layout="teampoint"] #productDetail .detail-size-section:not(.teampoint-color-options) .size-option {
    min-width: 24px;
    min-height: 24px;
    height: auto;
    padding: 6px 9px;
    border-radius: 2px;
    font-family: "Roboto Mono", monospace;
    font-size: 11px;
    line-height: 1.2;
}
html[data-product-detail-layout="teampoint"] #productDetail .detail-size-section:not(.teampoint-color-options) .size-option.active:not(:disabled) {
    color: #111;
    border: 1px solid rgba(0,0,0,.8);
    background: rgba(0,0,0,.10);
}

/* Paginación original de TeamPoint/Swiper: puntos negros redondos de 6 px,
   inactivos al 20%, activo opaco y fondo blanco translúcido al 20%. */
@media (min-width: 901px) {
    html[data-product-detail-image-layout="teampoint"] #productDetail .product-detail-dots {
        display: none !important; /* PC usa miniaturas laterales, como la referencia. */
    }
}
@media (max-width: 900px) {
    html[data-product-detail-image-layout="teampoint"] #productDetail .product-detail-dots:not([hidden]) {
        display: flex !important;
        position: absolute !important;
        bottom: 20px !important;
        left: 50% !important;
        width: auto !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        margin: 0 !important;
        padding: 6px !important;
        border: 0 !important;
        border-radius: 18px !important;
        background: rgba(255, 255, 255, .20) !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        transform: translateX(-50%) !important;
    }
    html[data-product-detail-image-layout="teampoint"] #productDetail .product-detail-dot,
    html[data-product-detail-image-layout="teampoint"] #productDetail .product-detail-dot.active {
        display: inline-block !important;
        flex: 0 0 6px !important;
        width: 6px !important;
        height: 6px !important;
        min-width: 6px !important;
        min-height: 6px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 100% !important;
        background: #000 !important;
        box-shadow: none !important;
        transform: none !important;
    }
    html[data-product-detail-image-layout="teampoint"] #productDetail .product-detail-dot { opacity: .2 !important; }
    html[data-product-detail-image-layout="teampoint"] #productDetail .product-detail-dot.active { opacity: 1 !important; }
}

/* Diseño 4: precios en la misma fila, incluso en celular.
   La segunda fila es exclusiva de las cuotas, si están habilitadas. */
html[data-product-detail-layout="teampoint"] #productDetail .product-detail-price {
    display: grid !important;
    grid-template-columns: max-content max-content;
    grid-template-areas: "actual anterior" "cuotas cuotas";
    align-items: baseline !important;
    justify-content: start !important;
    column-gap: 10px;
    row-gap: 2px;
}
html[data-product-detail-layout="teampoint"] #productDetail .product-detail-current {
    grid-area: actual;
    display: flex;
    flex-wrap: nowrap !important;
    justify-self: start;
    min-width: 0;
    margin: 0 !important;
    white-space: nowrap;
}
html[data-product-detail-layout="teampoint"] #productDetail .product-detail-old-row:not([hidden]) {
    grid-area: anterior;
    display: inline-flex !important;
    justify-self: start;
    margin: 0 !important;
    white-space: nowrap;
}
html[data-product-detail-layout="teampoint"] #productDetail .product-detail-price .price-new {
    font-size: clamp(23px, 2.2vw, 28px) !important;
    font-weight: 600 !important;
    line-height: 1.25;
    white-space: nowrap;
}
html[data-product-detail-layout="teampoint"] #productDetail .product-detail-price .price-old {
    font-size: clamp(14px, 1.25vw, 17px) !important;
    line-height: 1.25;
    white-space: nowrap;
}
html[data-product-detail-layout="teampoint"] #productDetail .teampoint-installments:not([hidden]) {
    grid-area: cuotas;
    display: block !important;
    width: 100%;
    margin-top: 2px;
    text-align: left !important;
}
@media (max-width: 900px) {
    html[data-product-detail-layout="teampoint"] #productDetail .product-detail-price {
        display: grid !important;
        grid-template-columns: max-content max-content;
        column-gap: 8px;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .product-detail-price .price-new {
        font-size: clamp(20px, 5.8vw, 25px) !important;
    }
    html[data-product-detail-layout="teampoint"] #productDetail .product-detail-price .price-old {
        font-size: clamp(13px, 3.9vw, 17px) !important;
    }
}
