/**
 * Fungiverse — Barra de Envío Gratis
 * Estilos para la barra de progreso en producto, carrito y checkout.
 *
 * @package Fungiverse
 */

/* ══════════════════════════════════════════════
   BARRA DE PROGRESO — BASE
   ══════════════════════════════════════════════ */

.fv-shipping-bar {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    margin: 0.75rem 0 1rem;
    font-size: 0.85rem;
    color: #166534;
    transition: background 0.3s, border-color 0.3s;
}

/* Estado: alcanzado ✓ */
.fv-shipping-bar--reached {
    background: #dcfce7;
    border-color: #4ade80;
}

/* Estado: "sumando este producto" */
.fv-shipping-bar--almost {
    background: #fefce8;
    border-color: #fde047;
    color: #713f12;
}

/* ─── Línea de texto ─── */
.fv-shipping-bar__text {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    line-height: 1.4;
    margin-bottom: 0.6rem;
}

.fv-shipping-bar__icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: #16a34a;
}

.fv-shipping-bar--almost .fv-shipping-bar__icon {
    color: #ca8a04;
}

/* ─── Track de la barra ─── */
.fv-shipping-bar__track {
    height: 6px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 0.35rem;
}

.fv-shipping-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    border-radius: 99px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 4px;
}

.fv-shipping-bar--almost .fv-shipping-bar__fill {
    background: linear-gradient(90deg, #facc15 0%, #ca8a04 100%);
}

.fv-shipping-bar--reached .fv-shipping-bar__fill {
    width: 100% !important;
    background: linear-gradient(90deg, #4ade80 0%, #16a34a 100%);
}

/* ─── Etiquetas de escala ─── */
.fv-shipping-bar__meta {
    display: flex;
    justify-content: flex-end;
    font-size: 0.73rem;
    color: rgba(22, 101, 52, 0.55);
}

/* ══════════════════════════════════════════════
   EN LA PÁGINA DE PRODUCTO
   ══════════════════════════════════════════════ */
.single-product .fv-shipping-bar {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* ══════════════════════════════════════════════
   EN EL CARRITO — Full width, arriba de las columnas
   ══════════════════════════════════════════════ */
.woocommerce-cart .fv-shipping-bar {
    margin: 0 0 1.25rem;
    border-radius: 12px;
    max-width: 100%;
}

/* ══════════════════════════════════════════════
   CHECKOUT — Badge de envío gratis
   ══════════════════════════════════════════════ */
.fv-checkout-free-shipping {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #dcfce7;
    border: 1.5px solid #4ade80;
    border-radius: 10px;
    font-size: 0.85rem;
    color: #166534;
    margin-bottom: 0.75rem;
}

.fv-checkout-free-shipping svg {
    flex-shrink: 0;
    stroke: #16a34a;
}

.fv-checkout-free-shipping strong {
    color: #15803d;
}

/* ══════════════════════════════════════════════
   BOTONES +/- CANTIDAD EN CARRITO
   ══════════════════════════════════════════════ */
.fv-cart-qty-wrap {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.fv-cart-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 34px;
    border: none;
    background: #fafafa;
    color: #374151;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    user-select: none;
    line-height: 1;
    padding: 0;
}

.fv-cart-qty-btn:hover {
    background: #f0f0f0;
    color: #111;
}

.fv-cart-qty-btn:active {
    background: #e5e7eb;
}

.fv-cart-qty-wrap .qty {
    width: 40px !important;
    height: 34px;
    border: none !important;
    border-left: 1px solid #e5e7eb !important;
    border-right: 1px solid #e5e7eb !important;
    text-align: center !important;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111;
    background: #fff;
    -moz-appearance: textfield;
    padding: 0 !important;
    margin: 0 !important;
}

.fv-cart-qty-wrap .qty::-webkit-outer-spin-button,
.fv-cart-qty-wrap .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 640px) {
    .fv-shipping-bar {
        font-size: 0.8rem;
        padding: 0.75rem 0.875rem;
    }

    .fv-cart-qty-btn { width: 28px; height: 30px; font-size: 1rem; }
    .fv-cart-qty-wrap .qty { width: 34px !important; height: 30px; }
}
