/**
 * Adeluve SM PDP Promos — CSS
 *
 * Extracción byte-exact del <style>...</style> del snippet 461 v5.11.1.
 * Todo está scoped a #producto-principal — pisa los overrides del loop
 * (loop-promos.css del mismo plugin) gracias a mayor especificidad.
 *
 * @package Adeluve_Sm_Promos_Engine
 * @since   0.18.0
 * @source  snippet 461 v5.11.1 "SM Promos Unificado" (preservado en wp_snippets.sql backup 20260526-200436)
 */
/* ========================================
   OCULTAR ELEMENTOS WOOCOMMERCE ORIGINALES
   ======================================== */
#producto-principal .woocommerce-variation-price,
#producto-principal .woocommerce-Price-amount.amount,
#producto-principal p.price{display:none!important}

/* OCULTAR TABLA B2BKING ORIGINAL */
#producto-principal .b2bking_tiered_price_table,
#producto-principal .shop_table.b2bking_shop_table,
#producto-principal table.b2bking_tiered_clickable{display:none!important}

/* ========================================
   CUCARDA OFERTA DEL DÍA / SEMANA (Azul)
   ======================================== */
#producto-principal a.sm-oferta-badge{
    display:inline-flex;
    align-items:center;
    gap:5px;
    background:<?php echo esc_attr(function_exists('sm_promo_config') ? sm_promo_val($tipo_oferta, 'badge_bg', '#3483fa') : '#3483fa'); ?>;
    color:white;
    padding:6px 14px;
    border-radius:50px;
    font-size:13px;
    font-weight:700;
    margin-bottom:12px;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    letter-spacing:0.2px;
    text-decoration:none;
    transition:filter 0.2s ease;
    cursor:pointer;
    position:relative;
    z-index:100;
    display:inline-flex;
    align-items:center;
    gap:6px;
}
#producto-principal a.sm-oferta-badge img {
    width:18px;height:18px;object-fit:contain;flex-shrink:0;
}

#producto-principal a.sm-oferta-badge:hover{
    background:#2968c8;
    color:white;
}

#producto-principal .sm-oferta-badge svg{
    width:14px;
    height:14px;
    fill:currentColor;
    flex-shrink:0;
}

/* ========================================
   PORCENTAJE OFF (Verde, al lado del precio)
   ======================================== */
#producto-principal .sm-descuento-off{
    color:#00a650;
    font-size:18px;
    font-weight:700;
    margin-left:8px;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}

/* ========================================
   SWATCHES BULTO / UNIDAD
   ======================================== */
#producto-principal .bricks-variation-swatches.bricks-swatch-label{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:wrap!important;
    gap:20px!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
}

/* Orden: Bulto primero */
#producto-principal .sm-wrapper-bulto{order:1!important}
#producto-principal .sm-wrapper-unidad{order:2!important}

/* Info debajo - CENTRADA */
#producto-principal .sm-info-bulto,
#producto-principal .sm-info-unidad{
    font-size:14px;
    color:#666;
    line-height:1.4;
    margin-top:8px;
    text-align:center;
    animation:fadeIn .2s ease;
}

/* Tipografías */
#producto-principal .sm-presentacion-text{font-weight:700!important}
#producto-principal .sm-precio-bulto{font-family:'Roboto',sans-serif!important;font-weight:400!important;font-size:15px}

/* Precio bulto tachado */
#producto-principal .sm-precio-bulto-old{
    font-family:'Roboto',sans-serif!important;
    font-weight:400!important;
    font-size:13px;
    color:#999;
    text-decoration:line-through;
    display:block;
}

/* Precio bulto oferta - NEGRO */
#producto-principal .sm-precio-bulto-sale{
    font-family:'Roboto',sans-serif!important;
    font-weight:600!important;
    font-size:15px;
    color:#333;
    display:block;
}

/* ========================================
   PRECIO PRINCIPAL (estilo Mercado Libre)
   ======================================== */
#producto-principal .sm-custom-price-container{
    margin:15px 0;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:0;
}

/* Fila del precio con descuento */
#producto-principal .sm-price-row{
    display:flex;
    align-items:baseline;
}

/* Precio tachado estilo ML */
#producto-principal .sm-price-old{
    font-size:14px;
    font-weight:400;
    color:#999;
    text-decoration:line-through;
    line-height:1.2;
    margin-bottom:2px;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}

/* Precio principal estilo ML - NEGRITA */
#producto-principal .sm-custom-price{
    font-size:20px;
    font-weight:700!important;
    color:#333;
    line-height:1.1;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}

/* Centavos pequeños */
#producto-principal .sm-custom-price sup{
    font-size:18px;
    font-weight:400;
    vertical-align:super;
    margin-left:1px;
}

#producto-principal .sm-price-label{
    font-size:14px;
    color:#666;
    font-weight:400;
    line-height:1.2;
    margin-top:4px;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}

/* ========================================
   SISTEMA DE CARDS DE PROMOS — v4.7
   Grid 2 cols desktop / stack mobile
   ======================================== */

/* Grid wrapper para side-by-side */
#producto-principal .sm-promos-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-top:20px;
    max-width:580px;
    animation:fadeIn .3s ease;
}
#producto-principal .sm-tiers-container,
#producto-principal .sm-surtido-container{
    margin-top:0;
    max-width:none;
}
/* Cuando están solos (sin grid) */
#producto-principal .sm-tiers-container:not(.sm-promos-grid *){
    margin-top:20px;
    max-width:280px;
    animation:fadeIn .3s ease;
}
#producto-principal .sm-surtido-container:not(.sm-promos-grid *){
    margin-top:12px;
    max-width:280px;
    animation:fadeIn .3s ease;
}

/* Card base — compartida verde y púrpura */
#producto-principal .sm-promo-card{
    display:flex;
    flex-direction:column;
    gap:4px;
    border-radius:8px;
    padding:12px 13px;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    position:relative;
    height:100%;
    box-sizing:border-box;
}
#producto-principal .sm-promo-card--link{
    text-decoration:none;
    color:inherit;
    transition:box-shadow .2s, transform .15s;
    cursor:pointer;
}
#producto-principal .sm-promo-card--link:hover{
    transform:translateY(-2px);
    box-shadow:0 4px 14px rgba(124,58,237,.18);
}

/* Verde */
#producto-principal .sm-promo-card--verde{
    background:#fff8ee;
    border:1px solid #ffd098;
    border-left:3px solid #fb8b07;
}
/* Púrpura */
#producto-principal .sm-promo-card--purpura{
    background:#faf5ff;
    border:1px solid #ddd6fe;
    border-left:3px solid #7c3aed;
}
/* v5.11.0 — Ámbar dorado para lleva-paga (BOGO esc1) */
#producto-principal .sm-promo-card--ambar{
    background:#fffbeb;
    border:1px solid #fde68a;
    border-left:3px solid #d97706;
}
#producto-principal .sm-promo-card-badge--ambar{ background:#d97706; }
#producto-principal .sm-promo-card-pct--ambar{
    background:#d97706;
    color:#fff;
    font-size:13px;
    padding:3px 10px;
    letter-spacing:.02em;
}

/* Top row: badge + % OFF */
#producto-principal .sm-promo-card-top{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:6px;
    margin-bottom:4px;
    min-height:18px;
}

/* Badges */
#producto-principal .sm-promo-card-badge{
    display:inline-flex;
    align-items:center;
    gap:4px;
    padding:2px 7px;
    border-radius:3px;
    font-size:10px;
    font-weight:700;
    letter-spacing:.04em;
    color:white;
}
#producto-principal .sm-promo-card-badge--verde{ background:#fb8b07; }
#producto-principal .sm-promo-card-badge--purpura{ background:#7c3aed; }

/* % OFF pill */
#producto-principal .sm-promo-card-pct{
    background:#ffedd5;
    color:#c2410c;
    padding:2px 7px;
    border-radius:20px;
    font-size:11px;
    font-weight:700;
}
#producto-principal .sm-promo-card-pct--purpura{
    background:#ede9fe;
    color:#7c3aed;
}

/* Qty label */
#producto-principal .sm-promo-card-qty{
    font-size:14px;
    font-weight:600;
    color:#374151;
    margin-bottom:2px;
}

/* Precios */
#producto-principal .sm-promo-card-prices{
    display:flex;
    flex-direction:column;
    justify-content:flex-end;
    gap:1px;
    margin:2px 0;
    min-height:44px;
}
#producto-principal .sm-promo-card-old{
    font-size:12px;
    color:#9ca3af;
    text-decoration:line-through;
}
#producto-principal .sm-promo-card-new{
    font-size:26px;
    font-weight:700;
    color:#111;
    line-height:1.1;
}
#producto-principal .sm-promo-card-label{
    font-size:11px;
    color:#6b7280;
}
#producto-principal .sm-promo-card-hint{
    font-size:10px;
    color:#c2410c;
    margin-top:auto;
    padding-top:4px;
}
#producto-principal .sm-promo-card-cta{
    font-size:11px;
    font-weight:600;
    color:#7c3aed;
    margin-top:auto;
    padding-top:4px;
}

/* ── Winner: mejor precio ── */
#producto-principal .sm-promo-card--winner{
    box-shadow:0 3px 14px rgba(0,0,0,.10);
    z-index:1;
    position:relative;
}
/* winner: MISMO tamaño que la otra card (Daniel 04/06: solo difieren color + badge "Mejor precio"). Sin scale ni precio agrandado. */
#producto-principal .sm-promo-card--winner-badge{
    position:absolute;
    top:11px;
    right:11px;
    display:inline-flex;
    align-items:center;
    gap:3px;
    background:#fbbf24;
    color:#78350f;
    font-size:9px;
    font-weight:700;
    letter-spacing:.02em;
    padding:3px 8px;
    border-radius:10px;
    box-shadow:0 1px 4px rgba(0,0,0,.15);
    white-space:nowrap;
    z-index:3;
}
/* (winner ya no escala ni agranda el precio: overrides mobile eliminados) */

/* Mobile: stack */
@media(max-width:480px){
    #producto-principal .sm-promos-grid{
        grid-template-columns:1fr;
        max-width:100%;
    }
    #producto-principal .sm-promo-card-new{
        font-size:24px;
    }
}

/* Surtido CSS migrado al design system sm-promo-card (v4.7) */

/* ========================================
   PROMO REGALO - MISMO FORMATO QUE TIERS PERO NARANJA
   ======================================== */
#producto-principal .sm-regalo-container{
    margin-top:20px;
    max-width:280px;
    animation:fadeIn .3s ease;
}

/* Cucarda REGALO - Naranja */
#producto-principal .sm-regalo-badge{
    display:inline-flex;
    align-items:center;
    gap:5px;
    background:#f59e0b;
    color:white;
    padding:4px 8px;
    border-radius:3px;
    font-size:12px;
    font-weight:600;
    margin-bottom:12px;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    letter-spacing:0.2px;
}

#producto-principal .sm-regalo-item{
    background:#fffbeb;
    border:1px solid #fde68a;
    border-left:3px solid #f59e0b;
    border-radius:6px;
    padding:12px 14px;
}

#producto-principal .sm-regalo-text{
    font-size:14px;
    color:#92400e;
    line-height:1.5;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}

#producto-principal .sm-regalo-text strong{
    color:#b45309;
    font-weight:700;
}

#producto-principal .sm-regalo-link{
    color:#b45309;
    text-decoration:underline;
    font-weight:600;
}

#producto-principal .sm-regalo-link:hover{
    color:#92400e;
}

/* ========================================
   SELECTOR DE PROMO (cuando hay ambas)
   ======================================== */
#producto-principal .sm-promo-selector{
    display:flex;
    gap:8px;
    margin-bottom:12px;
}

#producto-principal .sm-promo-tab{
    flex:1;
    padding:8px 12px;
    border:2px solid #e0e0e0;
    border-radius:6px;
    text-align:center;
    cursor:pointer;
    font-size:12px;
    font-weight:600;
    transition:all 0.2s ease;
    background:#fff;
}

#producto-principal .sm-promo-tab:hover{
    border-color:#999;
}

#producto-principal .sm-promo-tab.tiers.selected{
    border-color:#00a650;
    background:#f0fdf4;
    color:#166534;
}

#producto-principal .sm-promo-tab.regalo.selected{
    border-color:#f59e0b;
    background:#fffbeb;
    color:#b45309;
}

/* ========================================
   CANTIDAD Y BOTÓN COMPRAR - Ancho controlado
   ======================================== */
#producto-principal .woocommerce-variation-add-to-cart,
#producto-principal .single_variation_wrap{
    max-width:280px;
}

#producto-principal .quantity{
    max-width:120px;
}

#producto-principal .single_add_to_cart_button{
    max-width:280px;
}

/* ========================================
   CARRITO - Badge y estilos de regalo
   ======================================== */
.sm-cart-regalo-badge{
    display:inline-flex;
    align-items:center;
    gap:4px;
    background:#d4edda;
    color:#155724;
    padding:3px 8px;
    border-radius:4px;
    font-size:11px;
    font-weight:600;
    margin-left:8px;
}

.sm-cart-regalo-badge::before{
    content:"🎁";
}

.sm-regalo-qty{
    font-weight:600;
    color:#155724;
}

/* Badge de promo elegida en carrito */
.sm-cart-promo-badge{
    display:inline-flex;
    align-items:center;
    gap:4px;
    padding:3px 8px;
    border-radius:4px;
    font-size:11px;
    font-weight:600;
    margin-left:8px;
}

.sm-cart-promo-badge.tiers{
    background:#dcfce7;
    color:#166534;
}

.sm-cart-promo-badge.regalo{
    background:#ffecb3;
    color:#e65100;
}

/* ========================================
   ANIMACIONES
   ======================================== */
@keyframes fadeIn{from{opacity:0}to{opacity:1}}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width:768px){
    #producto-principal .bricks-variation-swatches.bricks-swatch-label{gap:15px!important}
    #producto-principal .sm-info-bulto,
    #producto-principal .sm-info-unidad{font-size:13px!important}
    #producto-principal .sm-custom-price{font-size:18px!important}
    #producto-principal .sm-price-old{font-size:13px!important}
    #producto-principal .sm-price-label{font-size:13px!important}
    #producto-principal a.sm-oferta-badge{font-size:11px;padding:3px 6px}
    #producto-principal .sm-descuento-off{font-size:16px}
    #producto-principal .sm-tier-price{font-size:24px}
    #producto-principal .sm-tiers-container,
    #producto-principal .sm-regalo-container{max-width:100%}
}
@media (max-width:480px){
    #producto-principal .sm-custom-price{font-size:18px!important}
    #producto-principal .sm-price-old{font-size:12px!important}
    #producto-principal .sm-price-label{font-size:12px!important}
    #producto-principal .sm-tier-price{font-size:22px}
    #producto-principal .woocommerce-variation-add-to-cart,
    #producto-principal .single_variation_wrap,
    #producto-principal .single_add_to_cart_button{max-width:100%}
}

/* ---------------------------------------------------------------
   Hints de promo en producto (oferta, oferta_semanal, regalo) — v5.7
   Override del sm-loop-hint del loop: ancho auto, sin margen lateral
--------------------------------------------------------------- */
#producto-principal .sm-loop-hint{
width:auto;
max-width:280px;
margin-left:0;
margin-right:0;
margin-top:0;
margin-bottom:14px;
font-size:13px;
padding:7px 14px;
border-radius:8px;
justify-content:flex-start;
}

/* v5.8.7: icono centrado + jerarquia bold + link cliqueable */
#producto-principal .sm-loop-hint-regalo{
display:grid !important;
grid-template-columns:auto 1fr !important;
align-items:center !important;
gap:10px !important;
line-height:1.35 !important;
}
#producto-principal .sm-loop-hint-regalo > :first-child{
align-self:center !important;
font-size:18px !important;
}
#producto-principal .sm-loop-hint-regalo .sm-loop-regalo-texto{
display:flex !important;
flex-direction:column !important;
align-items:center !important;
width:100% !important;
gap:3px !important;
text-align:center !important;
}
#producto-principal .sm-loop-hint-regalo .sm-loop-regalo-linea1{
font-weight:600 !important;
}
#producto-principal .sm-loop-hint-regalo .sm-loop-regalo-nombre{
font-weight:400 !important;
font-size:0.92em !important;
white-space:normal !important;
color:inherit !important;
text-decoration:underline !important;
text-decoration-style:dotted !important;
text-underline-offset:2px !important;
}
#producto-principal .sm-loop-hint-regalo a.sm-loop-regalo-nombre{
cursor:pointer !important;
}
#producto-principal .sm-loop-hint-regalo a.sm-loop-regalo-nombre:hover{
text-decoration-style:solid !important;
opacity:0.8 !important;
}

/* ---------------------------------------------------------------
   Bulto teaser — sugerencia sutil al estar en modo Unidad (v5.0)
--------------------------------------------------------------- */
#producto-principal .sm-bulto-teaser {
display: flex;
align-items: flex-start;
gap: 8px;
margin-top: 12px;
padding: 10px 14px;
background: #FFF8E1;
border-left: 3px solid #FFA000;
border-radius: 0 8px 8px 0;
font-size: 13px;
color: #5D4037;
line-height: 1.45;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
box-sizing: border-box;
animation: sm-teaser-in 0.25s ease;
}
@keyframes sm-teaser-in {
from { opacity: 0; transform: translateY(-4px); }
to   { opacity: 1; transform: translateY(0); }
}
#producto-principal .sm-bulto-teaser-icon { flex-shrink: 0; font-size: 16px; margin-top: 1px; }
#producto-principal .sm-bulto-teaser-txt  { flex: 1; }
#producto-principal .sm-bulto-teaser-beneficio {
font-weight: 600;
color: #4E342E;
display: block;
margin-bottom: 2px;
}
#producto-principal .sm-bulto-teaser-cta {
display: inline-flex !important;
align-items: center;
gap: 4px;
margin-top: 6px;
padding: 6px 14px !important;
background: #E65100 !important;
color: #fff !important;
border-radius: 6px !important;
font-size: 13px;
font-weight: 700;
cursor: pointer;
border: none !important;
transition: background 0.2s, transform 0.1s;
text-decoration: none !important;
box-shadow: none !important;
}
#producto-principal .sm-bulto-teaser-cta:hover { background: #BF360C !important; transform: translateY(-1px); }