/* Apariencia > Ficha del producto: colores separados de los de catálogo y menús.
   Se aplican solo las claves editadas. No dependen de "Personalizar el diseño actual".
   El atributo data-product-detail-fields se actualiza en cada vista previa. */

/* Fondo de la ficha (incluidos los diseños original, complete, atlas y teampoint). */
html[data-product-detail-fields~="product_detail_bg"] body.product-detail-open #productDetail,
html[data-product-detail-fields~="product_detail_bg"] #productDetail > .product-detail-card {
    background-color: var(--style-product-detail-bg) !important;
}
html[data-product-detail-fields~="product_detail_info_bg"] #productDetail :is(.product-detail-info,.atlas-detail-aside) {
    background-color: var(--style-product-detail-info-bg) !important;
}
html[data-product-detail-fields~="product_detail_image_bg"] #productDetail :is(.detail-gallery-column,.product-detail-image,.detail-gallery-thumbnails,.detail-gallery-thumbnail,.detail-thumbnail) {
    background-color: var(--style-product-detail-image-bg) !important;
}
html[data-product-detail-fields~="product_detail_panel_bg"] #productDetail :is(.atlas-price-box,.atlas-info-accordion,.atlas-trust-strip,.atlas-shipping-callout,.teampoint-info-accordion,.teampoint-shipping-highlight,.teampoint-product-promotion,.product-related-section,.product-reviews-panel,.product-reviews-list,.product-review-card,.product-reviews-empty) {
    background-color: var(--style-product-detail-panel-bg) !important;
}

/* Tipografía, importes, descuentos y transferencia. */
html[data-product-detail-fields~="product_detail_title"] #productDetail .product-detail-title {
    color: var(--style-product-detail-title) !important;
}
html[data-product-detail-fields~="product_detail_text"] #productDetail :is(.product-description,.detail-block-title,.detail-purchase-title,.detail-description-heading,.detail-description-toggle,.detail-size-heading-row,.teampoint-color-label,.teampoint-info-accordion summary,.atlas-info-accordion summary,.atlas-accordion-body,.product-related-title,.product-reviews-head h2,.product-reviews-summary,.teampoint-product-promotion p,.teampoint-product-promotion strong) {
    color: var(--style-product-detail-text) !important;
}
html[data-product-detail-fields~="product_detail_muted"] #productDetail :is(.size-help,.product-whatsapp-help,.product-whatsapp-help a,.detail-breadcrumb,.detail-breadcrumb button,.detail-breadcrumb span,.atlas-normal-price-label,.atlas-trust-label,.atlas-regular-price-row,.teampoint-installments,.product-reviews-empty) {
    color: var(--style-product-detail-muted) !important;
}
html[data-product-detail-fields~="product_detail_price"] #productDetail :is(.product-detail-price .price-new,.atlas-price-box .product-detail-price .price-new,.atlas-regular-price-row .price-new) {
    color: var(--style-product-detail-price) !important;
}
html[data-product-detail-fields~="product_detail_old_price"] #productDetail :is(.product-detail-price .price-old,.atlas-regular-price-row .price-old) {
    color: var(--style-product-detail-old-price) !important;
}
html[data-product-detail-fields~="product_detail_discount"] #productDetail :is(.product-detail-price .price-off,.teampoint-product-promotion) {
    color: var(--style-product-detail-discount) !important;
}
html[data-product-detail-fields~="product_detail_transfer"] #productDetail :is(.product-detail-transfer,.atlas-transfer-primary,.atlas-transfer-primary strong,.atlas-transfer-primary span,.atlas-shipping-callout i) {
    color: var(--style-product-detail-transfer) !important;
}

/* Contornos y selectores (talles y cantidad). */
html[data-product-detail-fields~="product_detail_border"] #productDetail :is(.product-detail-card,.product-detail-info,.detail-gallery-column,.product-detail-image,.detail-size-section,.size-option,.detail-quantity,.detail-quantity button,.detail-purchase-section,.atlas-info-accordion,.atlas-price-box,.teampoint-info-accordion,.teampoint-product-promotion,.product-related-section,.product-reviews-panel,.product-review-card,#detailBackToProducts) {
    border-color: var(--style-product-detail-border) !important;
}
html[data-product-detail-fields~="product_detail_option_bg"] #productDetail :is(.size-option:not(.active):not(:disabled),.detail-quantity,.detail-quantity button) {
    background-color: var(--style-product-detail-option-bg) !important;
}
html[data-product-detail-fields~="product_detail_option_text"] #productDetail :is(.size-option:not(.active):not(:disabled),.detail-quantity,.detail-quantity button,#detailQtyValue) {
    color: var(--style-product-detail-option-text) !important;
}
html[data-product-detail-fields~="product_detail_option_active_bg"] #productDetail .size-option.active:not(:disabled) {
    background-color: var(--style-product-detail-option-active-bg) !important;
    border-color: var(--style-product-detail-option-active-bg) !important;
}
html[data-product-detail-fields~="product_detail_option_active_text"] #productDetail .size-option.active:not(:disabled) {
    color: var(--style-product-detail-option-active-text) !important;
}

/* Botones de acción: solo la ficha; no cambia la compra en catálogo ni el carrito. */
html[data-product-detail-fields~="product_detail_button_bg"] #productDetail :is(#detailAddToCart:not(:disabled),#detailWriteReview:not(:disabled)) {
    background-color: var(--style-product-detail-button-bg) !important;
    border-color: var(--style-product-detail-button-bg) !important;
}
html[data-product-detail-fields~="product_detail_button_text"] #productDetail :is(#detailAddToCart:not(:disabled),#detailWriteReview:not(:disabled)) {
    color: var(--style-product-detail-button-text) !important;
    -webkit-text-fill-color: var(--style-product-detail-button-text) !important;
}
html[data-product-detail-fields~="product_detail_secondary_bg"] #productDetail #detailBackToProducts {
    background-color: var(--style-product-detail-secondary-bg) !important;
}
html[data-product-detail-fields~="product_detail_secondary_text"] #productDetail #detailBackToProducts {
    color: var(--style-product-detail-secondary-text) !important;
}
