/* ============================================================
   WC Precio Mayorista — Estilos del Frontend (Tienda)
   ============================================================ */

.wpm-tabla-precios-wrap {
    margin: 20px 0 24px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    font-size: 14px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* --- Título --- */
.wpm-tabla-titulo {
    margin: 0;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 700;
    background: #1d2327;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
}

.wpm-tabla-icon {
    font-size: 16px;
}

/* --- Tabla --- */
.wpm-tabla {
    width: 100%;
    border-collapse: collapse;
}

.wpm-tabla thead th {
    background: #f6f7f7;
    color: #555;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 18px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.wpm-tabla tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.wpm-tabla tbody tr:hover {
    background: #fafafa;
}

.wpm-tabla tbody tr:last-child {
    border-bottom: none;
}

.wpm-tabla td {
    padding: 10px 18px;
    vertical-align: middle;
}

/* --- Columnas --- */
.wpm-col-cantidad {
    font-weight: 500;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wpm-col-precio {
    font-weight: 700;
    color: #0073aa;
    font-size: 15px;
}

.wpm-col-precio .amount {
    color: #0073aa;
    font-weight: 700;
}

/* --- Fila con mejor precio --- */
.wpm-mejor-precio {
    background: #f0fdf4 !important;
}

.wpm-mejor-precio .wpm-col-precio .amount {
    color: #15803d;
}

/* --- Badges --- */
.wpm-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #15803d;
    color: #fff;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.wpm-descuento-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #dc2626;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

/* --- Nota al pie --- */
.wpm-nota {
    margin: 0;
    padding: 8px 18px;
    font-size: 12px;
    color: #888;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
}

/* --- Precio dinámico --- */
.wpm-precio-dinamico {
    padding: 10px 18px;
    background: #e7f4fb;
    border-top: 1px solid #b3d9ee;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    animation: wpmFadeIn 0.3s ease;
}

.wpm-precio-label {
    color: #0073aa;
    font-weight: 600;
}

.wpm-precio-valor {
    font-weight: 700;
    font-size: 16px;
    color: #1d2327;
}

/* --- Badge en el carrito --- */
.wpm-badge-mayorista {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    background: #0073aa;
    color: #fff;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    vertical-align: middle;
}

/* --- Resaltado de fila activa --- */
.wpm-rango-fila.wpm-activo {
    background: #eff8ff !important;
    outline: 2px solid #0073aa;
    outline-offset: -2px;
}

/* --- Animación --- */
@keyframes wpmFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .wpm-tabla th,
    .wpm-tabla td {
        padding: 8px 12px;
        font-size: 13px;
    }

    .wpm-col-cantidad {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
