/*
 * UPSEX — organización superior de producto
 * Solo tablet y PC.
 * No modifica móvil, banner Bold, confianza, pestañas,
 * relacionados, otras secciones ni footer.
 */

@media screen and (min-width: 768px) {

    /*
     * Imagen obligatoriamente izquierda.
     * Información obligatoriamente derecha.
     */
    html body.product-product
    #content > .product-details > .row {
        display: grid !important;
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr) !important;
        align-items: start !important;
        column-gap: 24px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    html body.product-product
    #content > .product-details > .row >
    .product-image-details {
        grid-column: 1 !important;
        grid-row: 1 !important;
        float: none !important;
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        transform: none !important;
        overflow: hidden !important;
    }

    html body.product-product
    #content > .product-details > .row >
    .product-info-details {
        grid-column: 2 !important;
        grid-row: 1 !important;
        float: none !important;
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        transform: none !important;
        overflow: visible !important;
    }

    html body.product-product
    .product-image-details .product-zoom-image,
    html body.product-product
    .product-image-details .txp-gallery-stage-v2,
    html body.product-product
    .product-image-details #wrap {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        left: auto !important;
        right: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        transform: none !important;
        overflow: hidden !important;
    }

    html body.product-product
    .product-image-details img {
        display: block !important;
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
        object-fit: contain !important;
    }

    html body.product-product
    .product-info-details > .inner {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    /*
     * Bloque que ordena:
     * descuento, datos, precio y compra.
     */
    html body.product-product
    .upsex-product-purchase-order-v2 {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 12px 0 0 !important;
        padding: 0 !important;
    }

    /*
     * 1. Aprovecha el descuento.
     */
    html body.product-product
    .upsex-product-purchase-order-v2
    .upsex-order-discount-v2 {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 14px !important;
        box-sizing: border-box !important;
    }

    /*
     * 2. Marca, SKU y stock libres, sin tarjeta ni fondo.
     */
    html body.product-product
    .upsex-product-purchase-order-v2
    .txp-product-meta-list-v10 {
        display: block !important;
        width: 100% !important;
        margin: 0 0 13px !important;
        padding: 0 2px !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        color: #422b25 !important;
    }

    html body.product-product
    .txp-product-meta-list-v10
    .txp-product-meta-row-v10 {
        display: grid !important;
        grid-template-columns: 78px minmax(0, 1fr) !important;
        align-items: center !important;
        gap: 7px !important;
        width: 100% !important;
        min-height: 27px !important;
        margin: 0 !important;
        padding: 2px 0 !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        font-family: Manrope, Arial, sans-serif !important;
        font-size: 14px !important;
        line-height: 1.35 !important;
    }

    html body.product-product
    .txp-product-meta-list-v10
    .txp-product-meta-label-v10 {
        margin: 0 !important;
        color: #715c52 !important;
        font-size: 13px !important;
        font-weight: 700 !important;
    }

    html body.product-product
    .txp-product-meta-list-v10
    .txp-product-meta-value-v10,
    html body.product-product
    .txp-product-meta-list-v10 a,
    html body.product-product
    .txp-product-meta-list-v10 span {
        max-width: 100% !important;
        margin-left: 0 !important;
    }

    /*
     * 3. Precio.
     */
    html body.product-product
    .upsex-product-purchase-order-v2
    .txp-price-summary-v6 {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 14px !important;
        padding: 10px 13px !important;
        box-sizing: border-box !important;
        background: #fff9eb !important;
        border: 1px solid rgba(183, 137, 22, .25) !important;
        border-radius: 12px !important;
        box-shadow: none !important;
    }

    /*
     * 4. Cantidad y dominio.
     */
    html body.product-product
    .upsex-buy-controls-v2 {
        display: grid !important;
        grid-template-columns:
            minmax(130px, 158px)
            minmax(0, 1fr) !important;
        grid-template-areas:
            "quantity brand"
            "actions actions" !important;
        align-items: stretch !important;
        gap: 10px 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    html body.product-product
    .upsex-buy-controls-v2
    .txp-buy-row-v11 {
        grid-area: quantity !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 76px !important;
        margin: 0 !important;
        padding: 5px 0 !important;
        box-sizing: border-box !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    html body.product-product
    .upsex-buy-controls-v2
    .txp-buy-row-v11 label,
    html body.product-product
    .upsex-buy-controls-v2
    .txp-buy-row-v11 .control-label {
        display: block !important;
        width: 100% !important;
        margin: 0 0 5px !important;
        padding: 0 !important;
        text-align: center !important;
        color: #594038 !important;
        font-family: Manrope, Arial, sans-serif !important;
        font-size: 12px !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
    }

    html body.product-product
    .upsex-buy-controls-v2
    .txp-quantity-stepper-v11 {
        width: 100% !important;
        max-width: 148px !important;
        min-height: 45px !important;
        margin: 0 auto !important;
    }

    /*
     * Dominio: mismo alto aproximado que cantidad.
     */
    html body.product-product
    .upsex-domain-tile-v2 {
        grid-area: brand !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        min-height: 76px !important;
        max-height: 76px !important;
        margin: 0 !important;
        padding: 8px 12px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        background:
            linear-gradient(
                115deg,
                #fff9e7 0%,
                #fff3ce 54%,
                #f3e7ff 100%
            ) !important;
        border: 1px solid rgba(184, 138, 0, .22) !important;
        border-radius: 12px !important;
        box-shadow: none !important;
        font-family: Manrope, Arial, sans-serif !important;
        font-size: clamp(18px, 2vw, 26px) !important;
        font-weight: 850 !important;
        line-height: 1 !important;
        letter-spacing: -.7px !important;
        text-align: center !important;
        white-space: nowrap !important;
    }

    html body.product-product
    .upsex-domain-tile-v2
    .upsex-domain-main-v2 {
        color: #442b24 !important;
    }

    html body.product-product
    .upsex-domain-tile-v2
    .upsex-domain-extension-v2 {
        color: #b88a00 !important;
    }

    /*
     * Botones completos debajo de cantidad y dominio.
     */
    html body.product-product
    .upsex-buy-controls-v2
    .txp-actions-stack-v12 {
        grid-area: actions !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 9px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    html body.product-product
    .upsex-buy-controls-v2
    .txp-actions-stack-v12 #button-cart,
    html body.product-product
    .upsex-buy-controls-v2
    .txp-actions-stack-v12 button,
    html body.product-product
    .upsex-buy-controls-v2
    .txp-actions-stack-v12 a {
        float: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        min-height: 52px !important;
        height: auto !important;
        margin: 0 !important;
        padding: 11px 16px !important;
        box-sizing: border-box !important;
        border-radius: 12px !important;
        font-family: Manrope, Arial, sans-serif !important;
        font-size: 13px !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        text-align: center !important;
        white-space: normal !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
    }

    /*
     * No permitir que antiguos estilos fullwide desplacen
     * las dos columnas superiores.
     */
    html body.product-product
    #content > .product-details,
    html body.product-product
    #content > .product-details > .row,
    html body.product-product
    .product-image-details,
    html body.product-product
    .product-info-details,
    html body.product-product
    .product-info-details > .inner {
        clip: auto !important;
        clip-path: none !important;
    }
}

@media screen and (min-width: 768px) and (max-width: 900px) {

    html body.product-product
    #content > .product-details > .row {
        column-gap: 14px !important;
    }

    html body.product-product
    .upsex-buy-controls-v2 {
        grid-template-columns:
            minmax(112px, 136px)
            minmax(0, 1fr) !important;
        gap: 9px !important;
    }

    html body.product-product
    .upsex-domain-tile-v2 {
        padding-left: 7px !important;
        padding-right: 7px !important;
        font-size: 17px !important;
        letter-spacing: -.45px !important;
    }

    html body.product-product
    .upsex-buy-controls-v2
    .txp-actions-stack-v12 #button-cart,
    html body.product-product
    .upsex-buy-controls-v2
    .txp-actions-stack-v12 button,
    html body.product-product
    .upsex-buy-controls-v2
    .txp-actions-stack-v12 a {
        min-height: 49px !important;
        font-size: 12px !important;
    }
}
