/* =========================================================
   XenonPC Product Labels — Estilos
   ========================================================= */

/* --- Base label ----------------------------------------- */
.xenonpc-label {
    position: absolute;
    right: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9em;
    padding: 6px 12px;
    border-radius: 6px;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    letter-spacing: 0.3px;
    transition: transform 0.2s ease;
    font-family: "Open Sans", "Roboto", Arial, sans-serif !important;
    border: none !important;
    text-shadow: none !important;
    background-image: none !important;
    text-transform: none !important;
    line-height: 1.2 !important;
}
.xenonpc-label:hover {
    transform: scale(1.05);
}
.xenonpc-label img.emoji {
    display: none !important;
}

/* --- Etiquetas normales (no Black) ---------------------- */
.xenonpc-label:not(.xenonpc-label-bf) {
    width: auto !important;
    display: inline-flex !important;
    padding: 6px 12px !important;
    font-size: 0.9em !important;
    border-radius: 6px !important;
    left: auto !important;
    right: 10px !important;
}

/* --- Colores de letra ------------------------------------ */
.xenonpc-label.slug-reacondicionado,
.xenonpc-label.slug-recondicionado,
.xenonpc-label.slug-premium,
.xenonpc-label.slug-refabricado-premium,
.xenonpc-label.slug-refabricado-premium-plus,
.xenonpc-label.slug-premium-plus,
.xenonpc-label.slug-reconditionne,
.xenonpc-label.slug-reconditionne-premium,
.xenonpc-label.slug-reconditionne-premium-plus {
    color: #ffffff !important;
}

.xenonpc-label.slug-promocao-telemoveis,
.xenonpc-label.slug-promocao-descontos,
.xenonpc-label.slug-promocao-recondicionado,
.xenonpc-label.slug-descuentos-moviles-motorola,
.xenonpc-label.slug-descuento-especial,
.xenonpc-label.slug-descuento-reacondicionados {
    color: #fff !important;
}

.xenonpc-label.xenonpc-label-bf {
    color: #fff !important;
}

/* =========================================================
   CATÁLOGO
   ========================================================= */
.woocommerce ul.products li.product {
    position: relative !important;
    overflow: visible !important;
}
.woocommerce ul.products li.product .xenonpc-label {
    display: block;
    right: 10px;
}
.woocommerce ul.products li.product .xenonpc-label:not(.xenonpc-label-bf) {
    position: absolute !important;
    right: 10px !important;
}

/* Posición por nth-of-type (fallback) */
.woocommerce ul.products li.product .xenonpc-label:not(.xenonpc-label-bf):nth-of-type(2) {
    top: 55px !important;
}
.woocommerce ul.products li.product .xenonpc-label:not(.xenonpc-label-bf):nth-of-type(3) {
    top: 95px !important;
}

/* Sin etiqueta Black */
.woocommerce ul.products li.product:not(:has(.xenonpc-label-bf))
    .xenonpc-label:not(.xenonpc-label-bf) {
    top: 10px !important;
}
.woocommerce ul.products li.product:not(:has(.xenonpc-label-bf))
    .xenonpc-label:not(.xenonpc-label-bf):nth-of-type(2) {
    top: 50px !important;
}
.woocommerce ul.products li.product:not(:has(.xenonpc-label-bf))
    .xenonpc-label:not(.xenonpc-label-bf):nth-of-type(3) {
    top: 90px !important;
}

/* Con etiqueta Black */
.woocommerce ul.products li.product:has(.xenonpc-label-bf)
    .xenonpc-label:not(.xenonpc-label-bf) {
    top: 10px !important;
}
.woocommerce ul.products li.product:has(.xenonpc-label-bf)
    .xenonpc-label:not(.xenonpc-label-bf):nth-of-type(3) {
    top: 50px !important;
}
.woocommerce ul.products li.product:has(.xenonpc-label-bf)
    .xenonpc-label:not(.xenonpc-label-bf):nth-of-type(4) {
    top: 90px !important;
}

/* Regla general que anula top fijo (deja que las de arriba manden) */
.woocommerce ul.products li.product .xenonpc-label:not(.xenonpc-label-bf) {
    top: auto !important;
}

/* --- Etiqueta Black en catálogo ------------------------- */
.woocommerce ul.products li.product .xenonpc-label.xenonpc-label-bf {
    left: 0 !important;
    right: auto !important;
}

/* Motorola → derecha */
.woocommerce ul.products li.product .xenonpc-label-bf.slug-descuentos-moviles-motorola {
    left: auto !important;
    right: 5px !important;
}

/* =========================================================
   PÁGINA DE PRODUCTO
   ========================================================= */
.single-product .woocommerce-product-gallery {
    position: relative !important;
    overflow: visible !important;
}

.single-product .xenonpc-label-row {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
    z-index: 40;
}

.single-product .xenonpc-label-row .xenonpc-label {
    position: static;
    right: auto;
    top: auto;
    margin: 0;
    white-space: nowrap;
}

/* =========================================================
   Z-INDEX — evitar tapar menús
   ========================================================= */
.xenonpc-label,
.xenonpc-label-row {
    z-index: 5 !important;
}

.site-header,
.main-navigation,
ul.sub-menu,
.menu,
.header-menu,
.navbar,
.dropdown-menu {
    position: relative;
    z-index: 99 !important;
}

/* =========================================================
   POSICIONAMIENTO ESPECÍFICO POR SLUG (Black)
   ========================================================= */
.xenonpc-label.xenonpc-label-bf {
    left: 1px !important;
    right: auto !important;
}

.xenonpc-label-bf.slug-descuentos-moviles-motorola {
    top: -9px !important;
}
.xenonpc-label-bf.slug-promocao-telemoveis {
    top: -11px !important;
}
.xenonpc-label-bf.slug-promocao-descontos {
    top: -11px !important;
}
.xenonpc-label-bf.slug-descuento-especial {
    top: -11px !important;
    left: 1px;
}
.xenonpc-label-bf.slug-promotions-sur-les-telephones {
    top: -11px !important;
    left: -5px !important;
    right: auto;
}
.xenonpc-label-bf.slug-reductions-et-promotions {
    top: -11px !important;
    left: -5px !important;
    right: auto;
}

/* =========================================================
   SOLO FRANCIA (fr-FR)
   ========================================================= */
html[lang="fr-FR"] .xenonpc-label {
    background-image: none !important;
    border: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
    text-shadow: none !important;
    border-radius: 6px !important;
    font-family: "Open Sans", "Roboto", Arial, sans-serif !important;
    text-transform: none !important;
    font-weight: 600 !important;
    color: #fff !important;
}

html[lang="fr-FR"] .single-product .woocommerce-product-gallery,
html[lang="fr-FR"] .single-product .woocommerce-product-gallery__trigger,
html[lang="fr-FR"] .single-product .summary.entry-summary {
    z-index: 1 !important;
}

html[lang="fr-FR"] header,
html[lang="fr-FR"] nav,
html[lang="fr-FR"] .main-navigation {
    z-index: 9999 !important;
    position: relative !important;
}
