.tikoco-wsp-price-label {
    font-size: .72em;
    font-weight: 400;
    white-space: nowrap;
}

.tikoco-wsp-tier-table-wrap {
    clear: both;
    margin: 1rem 0 1.35rem;
}

.tikoco-wsp-tier-table {
    --tikoco-wsp-navy: #173e73;
    --tikoco-wsp-orange: #ff9b22;
    --tikoco-wsp-green: #009b63;
    --tikoco-wsp-border: rgba(23, 62, 115, .14);
    --tikoco-wsp-soft: rgba(23, 62, 115, .055);
}

.tikoco-wsp-tier-table h3 {
    margin: 0 0 .6rem;
    font-size: 1.05em;
}

.tikoco-wsp-tier-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.tikoco-wsp-tier-table th,
.tikoco-wsp-tier-table td {
    padding: .68rem .78rem;
    border-bottom: 1px solid var(--tikoco-wsp-border);
    text-align: left;
    vertical-align: middle;
}

.tikoco-wsp-tier-table th:last-child,
.tikoco-wsp-tier-table td:last-child {
    text-align: right;
}

.tikoco-wsp-tier-table--highlighted {
    overflow: hidden;
    border: 1px solid var(--tikoco-wsp-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(23, 62, 115, .08);
}

.tikoco-wsp-promo-head {
    position: relative;
    padding: 1.05rem 1.1rem .95rem 1.25rem;
    border-left: 4px solid var(--tikoco-wsp-orange);
    background: linear-gradient(135deg, rgba(23, 62, 115, .06), rgba(255, 155, 34, .055));
}

.tikoco-wsp-promo-head h3 {
    margin: .5rem 0 .2rem;
    color: var(--tikoco-wsp-navy);
    font-size: 1.28em;
    line-height: 1.15;
}

.tikoco-wsp-badge {
    display: inline-flex;
    align-items: center;
    padding: .28rem .62rem;
    border-radius: 999px;
    background: var(--tikoco-wsp-orange);
    color: #fff;
    font-size: .72em;
    font-weight: 800;
    letter-spacing: .045em;
    line-height: 1.2;
}

.tikoco-wsp-promo-copy {
    margin: 0;
    color: var(--tikoco-wsp-navy);
    font-size: .93em;
}

.tikoco-wsp-saving {
    display: inline-block;
    margin-top: .7rem;
    padding: .38rem .62rem;
    border-radius: 7px;
    background: rgba(0, 155, 99, .09);
    color: var(--tikoco-wsp-green);
    font-size: .9em;
}

.tikoco-wsp-table-label {
    padding: .72rem .78rem .25rem;
    color: var(--tikoco-wsp-navy);
    font-size: .83em;
    font-weight: 700;
}

.tikoco-wsp-tier-table--highlighted thead th {
    color: var(--tikoco-wsp-navy);
    font-size: .88em;
    font-weight: 650;
}

.tikoco-wsp-tier-table--highlighted .tikoco-wsp-wholesale-row {
    background: var(--tikoco-wsp-soft);
}

.tikoco-wsp-tier-table--highlighted .tikoco-wsp-wholesale-row td:last-child {
    color: var(--tikoco-wsp-navy);
    font-weight: 700;
}

.tikoco-wsp-tier-table--highlighted .tikoco-wsp-best-tier {
    background: rgba(0, 155, 99, .075);
}

.tikoco-wsp-best-label {
    display: inline-block;
    margin-left: .38rem;
    padding: .18rem .42rem;
    border-radius: 999px;
    background: rgba(0, 155, 99, .12);
    color: var(--tikoco-wsp-green);
    font-size: .68em;
    font-weight: 750;
    line-height: 1.2;
    white-space: nowrap;
}

.tikoco-wsp-price-teaser {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: .5rem 0 .72rem;
    padding: .52rem .68rem;
    border-left: 3px solid #ff9b22;
    border-radius: 0 7px 7px 0;
    background: rgba(255, 155, 34, .085);
    color: #173e73;
    font-size: .84em;
    line-height: 1.35;
}

.tikoco-wsp-price-teaser-saving {
    color: #009b63;
    font-weight: 650;
}

.tikoco-wsp-from {
    white-space: nowrap;
}

@media (max-width: 520px) {
    .tikoco-wsp-promo-head {
        padding: .9rem .85rem .85rem 1rem;
    }

    .tikoco-wsp-tier-table th,
    .tikoco-wsp-tier-table td {
        padding: .62rem .58rem;
    }

    .tikoco-wsp-best-label {
        display: table;
        margin: .28rem 0 0;
    }
}

/* Badge de precio mayorista en grillas/listados de productos. */
.woocommerce ul.products li.product,
.tikoco-wsp-carousel-track li.product {
    position: relative;
}

.tikoco-wsp-loop-badge {
    position: absolute;
    z-index: 8;
    top: .7rem;
    right: .7rem;
    display: inline-flex;
    align-items: center;
    max-width: calc(100% - 1.4rem);
    padding: .34rem .62rem;
    border-radius: 999px;
    background: #ff9b22;
    box-shadow: 0 5px 14px rgba(23, 62, 115, .16);
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .035em;
    line-height: 1.15;
    text-transform: uppercase;
    pointer-events: none;
}

/* Carrusel de productos mayoristas para home / landing. */
.tikoco-wsp-carousel {
    position: relative;
    width: 100%;
    margin: 1.5rem 0 2rem;
}

.tikoco-wsp-carousel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .85rem;
}

.tikoco-wsp-carousel-head h2 {
    margin: 0;
}

.tikoco-wsp-carousel-controls {
    display: flex;
    flex: 0 0 auto;
    gap: .45rem;
}

.tikoco-wsp-carousel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    border: 1px solid rgba(23, 62, 115, .18);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(23, 62, 115, .08);
    color: #173e73;
    font-size: 1.55rem;
    line-height: 1;
    cursor: pointer;
}

.tikoco-wsp-carousel-button:hover,
.tikoco-wsp-carousel-button:focus-visible {
    border-color: #ff9b22;
    outline: none;
}

.tikoco-wsp-carousel-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.tikoco-wsp-carousel-viewport::-webkit-scrollbar {
    display: none;
}

.woocommerce .tikoco-wsp-carousel-track,
.tikoco-wsp-carousel-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 1rem;
    width: max-content !important;
    max-width: none !important;
    margin: 0 !important;
    padding: .15rem .1rem .65rem !important;
    list-style: none !important;
}

.woocommerce .tikoco-wsp-carousel-track::before,
.woocommerce .tikoco-wsp-carousel-track::after,
.tikoco-wsp-carousel-track::before,
.tikoco-wsp-carousel-track::after {
    display: none !important;
    content: none !important;
}

.woocommerce .tikoco-wsp-carousel-track li.product,
.tikoco-wsp-carousel-track li.product {
    float: none !important;
    flex: 0 0 clamp(220px, 23vw, 290px) !important;
    width: clamp(220px, 23vw, 290px) !important;
    margin: 0 !important;
    scroll-snap-align: start;
}

.tikoco-wsp-carousel-viewport {
    scroll-snap-type: x proximity;
}

@media (max-width: 768px) {
    .woocommerce .tikoco-wsp-carousel-track li.product,
    .tikoco-wsp-carousel-track li.product {
        flex-basis: min(76vw, 280px) !important;
        width: min(76vw, 280px) !important;
    }

    .tikoco-wsp-loop-badge {
        top: .55rem;
        right: .55rem;
        font-size: .62rem;
    }
}

/* 0.1.5 — integración visual con las tarjetas del tema. */

/*
 * El badge se calcula contra el borde inferior real de la miniatura mediante JS.
 * Antes de que cargue JS conserva una posición segura arriba a la derecha.
 */
.tikoco-wsp-loop-badge {
    top: .7rem;
    right: .7rem;
    left: auto;
    transition: opacity .12s ease;
}

.tikoco-wsp-loop-badge.tikoco-wsp-badge-positioned {
    right: auto;
}

/*
 * En grillas el valor mayorista usa la misma jerarquía visual de TIKOCO:
 * texto auxiliar azul + valor destacado naranja. El selector queda limitado
 * a loops para no alterar el precio grande de la ficha de producto.
 */
.woocommerce ul.products li.product .price .tikoco-wsp-from,
.tikoco-wsp-carousel .products li.product .price .tikoco-wsp-from {
    color: #173e73;
    font-weight: 500;
}

.woocommerce ul.products li.product .price .tikoco-wsp-from-value,
.woocommerce ul.products li.product .price .tikoco-wsp-from-value .woocommerce-Price-amount,
.tikoco-wsp-carousel .products li.product .price .tikoco-wsp-from-value,
.tikoco-wsp-carousel .products li.product .price .tikoco-wsp-from-value .woocommerce-Price-amount {
    color: #ff9418;
    font-weight: 700;
}

.woocommerce ul.products li.product .price .tikoco-wsp-price-label,
.tikoco-wsp-carousel .products li.product .price .tikoco-wsp-price-label {
    display: block;
    margin-top: .08rem;
    color: #173e73;
    font-size: .72em;
    font-weight: 400;
    line-height: 1.25;
    white-space: normal;
}

/*
 * El shortcode usa el template content-product.php del tema. La clase
 * .woocommerce del contenedor (agregada en PHP) hace que herede los mismos
 * estilos de tarjeta, badges, títulos y precios que las grillas existentes.
 */
.tikoco-wsp-carousel.woocommerce .tikoco-wsp-carousel-track li.product {
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .tikoco-wsp-loop-badge {
        top: .55rem;
        right: .55rem;
    }
}
