/* ==========================================================================
   1. SELECT2 & WOOVR (VARIACIONES Y DROPDOWNS)
   ========================================================================== */

/* Bloquear el tamaño y fondo del contenedor de WooVR para que no parpadee en gris */
body.single-product .woovr-variation-dropdown,
body.single-product .woovr-variation-selector {
    min-height: 50px !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
    border: none !important;
}

/* Selector principal Select2 y reseteo de esqueleto */
body.single-product .select2-container--default .select2-selection--single {
    height: 50px !important; 
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    position: relative;
    transition: all 0.3s ease-in-out;
}

/* Hover y Focus: Unificamos sombra y borde */
body.single-product .select2-container--default.select2-container--focus .select2-selection--single,
body.single-product .select2-container--default:hover .select2-selection--single {
    border-color: var(--price-color) !important;
    box-shadow: 0 0 0 1px var(--price-color) !important;
}

/* Texto de la selección principal */
body.single-product .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--title-color) !important;
    line-height: 50px !important;
    padding-left: 15px !important;
    padding-right: 35px !important; /* Espacio para la flecha */
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
}

/* Limpieza de flechas nativas de Select2 y otros plugins */
.select2-container--default .select2-selection--single .select2-selection__arrow b,
.woovr-variation-selector .select-wrap::after,
.wpc-composite-select::after {
    display: none !important;
}

/* Flecha personalizada unificada */
.select2-container--default .select2-selection--single::after {
    content: "";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0; 
    height: 0; 
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--price-color);
    pointer-events: none;
}

.select2-dropdown {
    border: 1px solid var(--price-color) !important;
    border-radius: 5px !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
    z-index: 99999 !important;
    overflow: hidden;
}

.select2-results__option {
    padding: 12px 15px !important;
    border-bottom: 1px solid #f9f9f9;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--price-color) !important;
    color: #ffffff !important;
}

/* Ajuste de filas internas de WooVR en Select2 */
.woovr-select2-option {
    display: flex !important;
    align-items: center;
    width: 100%;
}

.woovr-select2-text {
    flex-grow: 1; /* Empuja el precio/badge a la derecha */
}

/* Toque de identidad LTE para Badges en línea */
.lte-sale-badge-inline {
    background-color: var(--price-color) !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 2px 6px !important;
    border-radius: 5px !important;
    margin-left: 10px;
    text-transform: uppercase;
}

/* WooVR: Limpieza de interacciones */
.woovr-variations .woovr-variation:hover {
    background-color: transparent !important;
    box-shadow: none !important;
}


/* ==========================================================================
   2. COMPONENTES WPC (BUNDLES, COMPOSITE Y COMPONENTES)
   ========================================================================== */

/* Estructura de filas y alineación */
.woosb-product, .wooco-product, .woofs-product {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 15px 0 !important;
    border-bottom: 1px solid #f2f2f2 !important;
}

/* Detalles y centrado vertical */
.woosb-product-details, .wooco-product-details, .woofs-product-details, .woofs-title {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

/* Miniaturas de producto unificadas */
.woosb-product-image img, .wooco-product-image img, .woofs-product-image img {
    width: 70px !important;
    height: 70px !important;
    object-fit: cover;
    border-radius: 8px !important;
    border: 1px solid #eee !important;
}

/* Títulos y enlaces de productos del bundle */
.woosb-name, .woosb-product-title a, 
.wooco_component_product_selection_list_item_name, .wooco-product-title a,
.woofs-title a, .woofs-title-inner a, .woofs-qty {
    font-weight: 600 !important;
    color: var(--body-text-color) !important;
    font-size: 15px !important;
    text-decoration: none !important;
    line-height: 1.3 !important;
}

/* Hover de marca para enlaces */
.woosb-name:hover, .woosb-product-title a:hover, 
.wooco-product-title a:hover, .woofs-title a:hover {
    color: var(--price-color) !important;
}

/* Encabezados y títulos de sección de los plugins */
.woosb-wrap > h4, 
.woosb-title-pack,
.wooco_component_product_title,
.wooco_component_title,
.wooco_components .wooco_component .wooco_component_name,
.woosb-before-text.woosb-text,
.woofs-before-text.woofs-text {
    display: block !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: var(--title-color) !important;
    margin-bottom: 20px !important;
    margin-top: 25px !important;
    line-height: 1.4 !important;
    border-left: 4px solid var(--price-color) !important;
    padding-left: 15px !important;
    text-align: left !important;
}

/* Heredar estilos en textos antes del plugin */
.woofs-before-text *, .woofs-text * {
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
}

/* Selectores Full Width */
.woosb-product-variations, .wooco-product-variations, 
.woovr-variation-select, .wpc-composite-select, .select2-container {
    width: 100% !important;
}

/* Ocultar elementos innecesarios */
.wooco_component_product_qty_btn, .wooco-product-qty, .woosb-product-qty, .woofs-availability, .wooco_summary {
    display: none !important;
}

/* Bordes y estados de Composite Products */
.wooco_component_product_selection_list_item {
    border: 1px solid #e5e5e5 !important;
    transition: all 0.2s ease-in-out !important;
    border-radius: 5px !important;
}

.wooco_item_selected, 
.wooco_component_product_selection_item.wooco_item_selected {
    border-color: var(--price-color) !important;
    border-width: 1px !important;
    border-radius: 5px !important;
}


/* ==========================================================================
   3. ALERTAS Y CUADROS DE ENVÍO (CONSOLIDADO)
   ========================================================================== */

/* Alertas de WPC Plugins e Información de Envío Estándar LTE */
.woosb-alert, 
.wooco-alert,
.woosg-alert,
.wpced-inner,
.ayudawp-euw-excluded-notice {
    background-color: #fcfaff !important; 
    border: 1px solid #efe6f5 !important;
    border-left: 4px solid var(--price-color) !important;
    border-radius: 5px !important;
    color: #333333 !important;
    padding: 15px 20px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    margin: 20px 0 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02) !important;
    display: block !important;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Rubik', sans-serif !important;
}

/* Icono de camión nativo mediante Dashicons para el cuadro de envío (.wpced-inner) */
.wpced-inner {
    display: flex !important;
    align-items: center !important;
}

.wpced-inner::before {
    font-family: 'Dashicons'; 
    content: "\f174"; 
    margin-right: 12px;
    font-size: 20px;
    color: var(--price-color);
}

/* Enfatizados dentro de alertas y fechas */
.woosb-alert strong, .wooco-alert strong, .woosg-alert strong,
.wpced-inner b, .wpced-inner strong, .ayudawp-euw-excluded-notice strong {
    color: #000000 !important;
    font-weight: 700 !important;
}

/* Ocultar cajas de alertas si están vacías */
.woosb-alert:empty, .wooco-alert:empty, .woosg-alert:empty,
.woosb-alert[style*="display: none"], .wooco-alert[style*="display: none"], .woosg-alert[style*="display: none"] {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: none !important;
}

.woosb-alert {
    text-align: left !important;
}


/* ==========================================================================
   4. UX ELEMENTOS SINGLE PRODUCT (CONTENEDORES, BOTONES, METAS)
   ========================================================================== */

/* Bloque de precio nativo sin márgenes innecesarios */
.single-product .product .entry-summary .price {
    margin: 0;
}

/* Botón Añadir al carrito deshabilitado */
.single_add_to_cart_button.wc-variation-selection-needed {
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

/* Contenedor del botón de compra */
.product-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    text-align: center !important;
    padding: 12px !important;
}

.btn-text-inner {
    line-height: 1.2 !important;
}

/* Ajustes de espaciados en el botón de compra */
.single-product .summary .cart {
    padding: 12px 16px !important;
}

/* Input de cantidad con borde de marca */
.single-product .product .entry-summary .quantity {
    border: 2px solid #90369a;
    border-radius: 5px;
}

/* Meta del producto (SKU, Categorías) */
.single-product .product_meta span:before {
    content: "•";
    color: inherit;
    font-weight: 800;
}

.single-product .product_meta .tagged_as,
.single-product .product_meta .sku_wrapper,
.single-product .product_meta .post_in {
    margin: 0;
}

.single-categories .egudgets-brands a {
    width: auto;
}

.single-categories .egudgets-brands a::after {
    position: unset;
    content: ",\00a0";
}

.single-product .woocommerce-product-details__short-description {
    border-color: var(--border-color1) !important;
}


/* ==========================================================================
   5. PESTAÑAS (TABS DE INFORMACIÓN)
   ========================================================================== */
.single-product .woocommerce-tabs {
    margin: 20px 0;
}

/* Contenedor interno de los paneles */
.single-product .woocommerce-tabs-panel {
    border: 1px solid var(--border-color1) !important;
    padding: 25px !important;
    border-radius: 5px !important;
    margin-top: -1px; /* Solape milimétrico con la pestaña */
    background-color: #fff;
}

/* Pestañas inactivas */
.woocommerce-tabs ul.tabs li {
    border: 1px solid var(--border-color1) !important;
    border-bottom: none !important;
    background-color: #fcfaff !important; 
    border-radius: 5px 5px 0 0 !important;
    margin-right: 4px !important;
}

/* Pestaña especial de los Bundles de WPC */
.woocommerce-tabs ul.tabs li#tab-title-woosb_bundles {
    border-radius: 4px 4px 0 0;
    background-color: rgba(255, 152, 0, 0.08) !important;
}

.single-product .woocommerce-Tabs-panel.entry-content {
    overflow-y: hidden;
    overflow-x: hidden;
}


/* ==========================================================================
   6. CONTADOR ATRÁS (TIMER MINIMALISTA)
   ========================================================================== */

/* Reset general de cajas heredadas */
.timer, .timer-content, .timer-content div, .timer-content p, .timer-content span {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.timer {
    display: block !important;
    margin: 20px 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.timer-content {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 15px !important;
}

/* Textos fijos y reloj */
.timer-content i,
.timer-content > span {
    color: #666666 !important; 
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 12px !important;
    background: transparent !important;
}

/* Dígitos numéricos (Negro rotundo) */
.timer-content div p {
    color: #000000 !important; 
    font-size: 1.6rem !important;
    font-weight: 900 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    background: transparent !important;
}

/* Subtextos descriptivos (Días, Horas...) */
.timer-content div::after {
    color: #aaaaaa !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
}


/* ==========================================================================
   7. PRODUCTOS RELACIONADOS (OWL CAROUSEL NAV)
   ========================================================================== */
.related.products .owl-carousel .owl-nav {
    position: absolute !important;
    top: 50% !important;
    width: 100% !important;
    transform: translateY(-50%) !important;
    pointer-events: none !important;
    display: flex !important;
    justify-content: space-between !important;
}

.related.products .owl-carousel .owl-nav button {
    width: 40px !important;
    height: 40px !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15) !important;
    color: var(--price-color) !important;
    pointer-events: all !important;
    transition: 0.3s !important;
    border: none !important;
}

.related.products .owl-carousel .owl-nav button:hover {
    background: var(--price-color) !important;
    color: #fff !important;
}

.related.products .owl-nav button::before, 
.related.products .owl-nav button::after {
    display: none !important;
}


/* ==========================================================================
   8. AJUSTES EN ARCHIVOS / CAROUSELES (REMOVER SELECTORES DE TIENDA GENERAL)
   ========================================================================== */
.products .product-attribute-wrap,
.owl-item .product-attribute-wrap,
.product-item .product-attribute-wrap {
    display: none !important;
}


/* ==========================================================================
   9. OPTIMIZACIÓN MOBILE (RESPONSIVE SECTIONS)
   ========================================================================== */
@media (max-width: 480px) {
    .woosb-product, .wooco-product, .woofs-product { 
        gap: 10px !important; 
    }
    .woosb-product-image img, .wooco-product-image img, .woofs-product-image img {
        width: 60px !important;
        height: 60px !important;
    }
    .woosb-name, .wooco_component_product_selection_list_item_name, .woofs-title a {
        font-size: 14px !important;
    }
}