/* EP Gift Coupons Progress Bar v2.1 */
.ep-gift-progress-wrapper {
    margin: 15px 0;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fef9f0 0%, #fff5e6 100%);
    border: 1px solid #f0dfc0;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
}

/* Mini-cart: más compacto */
.ep-gift-progress-mini.ep-gift-progress-wrapper {
    margin: 10px 12px;
    padding: 12px 14px;
    font-size: 13px;
    border-radius: 10px;
}

/* Mensaje */
.ep-gift-message {
    margin-bottom: 12px;
    color: #5a3e1b;
    text-align: center;
    font-weight: 500;
}

.ep-gift-message strong {
    color: #c0392b;
    font-weight: 700;
}

.ep-gift-emoji {
    font-style: normal;
}

/* Barra de progreso */
.ep-gift-bar-container {
    position: relative;
    padding: 0 14px;
}

.ep-gift-bar-track {
    position: relative;
    width: 100%;
    height: 10px;
    background: #e8dcc8;
    border-radius: 10px;
    overflow: hidden;
}

.ep-gift-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #f39c12 0%, #e67e22 50%, #27ae60 100%);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 1px 4px rgba(243, 156, 18, 0.4);
    min-width: 0;
}

/* Tiers container */
.ep-gift-tiers {
    position: relative;
    width: 100%;
    height: 40px;
}

/* Markers de cada tier */
.ep-gift-tier-marker {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    cursor: default;
}

.ep-gift-tier-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #fff;
    border: 2px solid #e8dcc8;
    border-radius: 50%;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin-top: -19px;
    transition: all 0.3s ease;
}

.ep-gift-tier-marker.reached .ep-gift-tier-icon {
    border-color: #27ae60;
    background: #eafaf1;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.ep-gift-tier-amount {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 700;
    color: #8c7a5e;
    white-space: nowrap;
}

.ep-gift-tier-marker.reached .ep-gift-tier-amount {
    color: #27ae60;
}

/* Cupón aplicado */
.ep-gift-applied {
    margin-top: 10px;
    text-align: center;
    font-size: 12px;
    color: #27ae60;
    font-weight: 600;
    padding: 6px 10px;
    background: rgba(39, 174, 96, 0.08);
    border-radius: 6px;
}

/* Mini-cart ajustes */
.ep-gift-progress-mini .ep-gift-bar-track {
    height: 8px;
}

.ep-gift-progress-mini .ep-gift-tier-icon {
    width: 24px;
    height: 24px;
    font-size: 12px;
    margin-top: -16px;
}

.ep-gift-progress-mini .ep-gift-tier-amount {
    font-size: 10px;
}

.ep-gift-progress-mini .ep-gift-applied {
    font-size: 11px;
    padding: 4px 8px;
}

.ep-gift-progress-mini .ep-gift-tiers {
    height: 34px;
}

/* Pulso suave en el próximo tier alcanzable (solo el primero no alcanzado) */
@keyframes ep-pulse {
    0%, 100% { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 2px 12px rgba(243, 156, 18, 0.5); }
}

.ep-gift-tier-marker:not(.reached) ~ .ep-gift-tier-marker:not(.reached) .ep-gift-tier-icon {
    animation: none;
}

.ep-gift-tier-marker:not(.reached) .ep-gift-tier-icon {
    animation: ep-pulse 2s ease-in-out infinite;
}

/* Focus visible para accesibilidad */
.ep-gift-progress-wrapper:focus-within {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Prevenir doble render */
.ep-gift-progress-wrapper + .ep-gift-progress-wrapper {
    display: none;
}

/* Responsive */
@media (max-width: 480px) {
    .ep-gift-progress-wrapper {
        padding: 12px 14px;
        font-size: 13px;
        margin: 10px 0;
    }
    .ep-gift-bar-container {
        padding: 0 10px;
    }
    .ep-gift-tier-icon {
        width: 24px;
        height: 24px;
        font-size: 12px;
        margin-top: -16px;
    }
    .ep-gift-tier-amount {
        font-size: 10px;
    }
    .ep-gift-message {
        font-size: 12px;
        margin-bottom: 10px;
    }
}

/* Reducir movimiento para usuarios que lo prefieran */
@media (prefers-reduced-motion: reduce) {
    .ep-gift-tier-marker:not(.reached) .ep-gift-tier-icon {
        animation: none;
    }
    .ep-gift-bar-fill {
        transition: none;
    }
}
