/* --- Banner campanie (în flux, nu fixed) --- */
.loop-campaign-banner {
    position: relative;
    z-index: 20;
    background: #2bc016;
    color: #023627;
    font-size: 0.95rem;
    line-height: 1.4;
}

.loop-campaign-banner.is-x2 {
    background: #fc4700;
    color: #fff;
}

.loop-campaign-banner-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 16px;
}

.loop-campaign-banner-text {
    font-weight: 600;
    text-align: center;
}

.loop-campaign-banner-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
}

.loop-campaign-banner-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 6px;
    background: #023627;
    color: #fff !important;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none !important;
    white-space: nowrap;
    height: 34px;
    box-sizing: border-box;
}

.loop-campaign-banner-cta:hover {
    opacity: 0.9;
    color: #fff !important;
}

.loop-campaign-banner.is-x2 .loop-campaign-banner-cta {
    background: #fff;
    color: #fc4700 !important;
}

.loop-campaign-banner.is-x2 .loop-campaign-banner-cta:hover {
    color: #fc4700 !important;
}

.loop-campaign-banner-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: transparent;
    border: 1px solid #fff;
    border-radius: 6px;
    color: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    opacity: 0.8;
    flex-shrink: 0;
    box-sizing: border-box;
}

.loop-campaign-banner-close:hover {
    opacity: 1;
    border-color: #2bc016;
}

.loop-birthday-hint a {
    color: #2bc016;
    font-weight: 600;
}

@media (max-width: 782px) {
    .loop-campaign-banner-inner {
        flex-direction: column;
        font-size: 0.85rem;
        padding: 12px 14px;
        gap: 10px;
    }

    .loop-campaign-banner-actions {
        width: 100%;
    }

    .loop-campaign-banner-cta {
        flex: 1;
    }
}

/* --- Loop Product Badge --- */
.loop-badge-container {
    margin: 0px 0px 10px 0px;
    
}

.loop-badge {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    background: #f0fff4;
    border: 1px dashed #2bc016;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100% !important;

}

.loop-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(43, 192, 22, 0.15);
}

.loop-badge.is-campaign-x2 {
    background: #fff4f0;
    border-color: #fc4700;
}

.loop-badge.is-campaign-x2:hover {
    box-shadow: 0 4px 6px rgba(252, 71, 0, 0.2);
}

.loop-badge.is-campaign-x2 .loop-icon,
.loop-badge.is-campaign-x2 .loop-text {
    color: #fc4700;
}

.loop-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: #2bc016; /* Aceasta culoare se va duce si pe SVG */
}

/* Stilizare SVG */
.loop-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
}

.loop-text {
    color: #2bc016;
    font-size: 0.95rem;
    line-height: 1.2;
}

.loop-campaign-tag {
    font-size: 0.85em;
    margin-left: 5px;
    font-weight: 700;
}

/* --- Loop Dashboard (My Account) --- */
.loop-dashboard {
    max-width: 100%;
}

.loop-card {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    border-left: 6px solid #2bc016;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.loop-balance-section, 
.loop-value-section {
    flex: 1;
}

.loop-label {
    display: block;
    font-size: 0.85rem;
    text-transform: none;
    color: #888;
    margin-bottom: 5px;
}

.loop-big-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2bc016;
    line-height: 1;
}

.loop-big-number small {
    font-size: 1rem;
    font-weight: 500;
    color: #aaa;
}

.loop-big-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
}

.loop-divider {
    width: 1px;
    height: 60px;
    background: #eee;
    margin: 0 30px;
}

.loop-info {
    font-size: 0.9rem;
    color: #666;
    background: #f9f9f9;
    padding: 10px 15px;
    border-radius: 6px;
    border-left: 3px solid #ccc;
}

/* --- Opt-in utilizare puncte (coș / checkout) --- */
.loop-use-points-box {
    background: #f0fff4;
    border: 1px dashed #2bc016;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 0 0 16px 0;
    transition: opacity 0.2s ease;
}

.loop-use-points-box.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.loop-use-points-box label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    cursor: pointer;
    color: #166534;
    font-weight: 600;
}

.loop-use-points-box input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.loop-use-points-text {
    line-height: 1.4;
}

.loop-use-points-hint {
    margin: 8px 0 0 26px;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 400;
}

.loop-use-points-blocked {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.loop-use-points-blocked p {
    margin: 0;
    font-size: 0.9rem;
}

/* --- Loop Gamification & Tiers (NOU) --- */

/* Animație subtilă pentru bara de progres */
.loop-progress-bar div {
    position: relative;
    overflow: hidden;
}

.loop-progress-bar div::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0) 25%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 75%
    );
    background-size: 200% 200%;
    animation: loopShine 2s infinite linear;
}

@keyframes loopShine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Loop Exit Intent Popup --- */
.loop-exit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loop-exit-overlay.show {
    opacity: 1;
}

.loop-exit-modal {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    max-width: 450px;
    width: 90%;
    position: relative;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.loop-exit-overlay.show .loop-exit-modal {
    transform: translateY(0);
}

.loop-exit-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

.loop-exit-close:hover {
    color: #333;
}

.loop-exit-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 15px;
}

.loop-exit-message {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.5;
}

.loop-exit-coupon-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    padding: 10px 15px;
    border-radius: 8px;
}

.loop-coupon-code {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 1px;
}

.loop-copy-btn {
    /* Setarile de fallback daca tema nu aplica regulile pentru buton */
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* --- Istoric puncte (My Account) --- */
.loop-history {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.loop-history-title {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    color: #1e293b;
}

.loop-history-empty {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.loop-history-table-wrap {
    overflow-x: auto;
}

.loop-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.loop-history-table th {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.loop-history-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.loop-history-date {
    white-space: nowrap;
    color: #64748b;
    font-size: 0.85rem;
}

.loop-history-detail a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.loop-history-detail a:hover {
    text-decoration: underline;
}

.loop-history-points {
    font-weight: 700;
    white-space: nowrap;
}

.loop-history-points.is-credit {
    color: #16a34a;
}

.loop-history-points.is-debit {
    color: #dc2626;
}

.loop-history-balance {
    color: #334155;
    white-space: nowrap;
}

.loop-history-balance small {
    color: #94a3b8;
    font-weight: 500;
}

.loop-history-pagination {
    margin-top: 16px;
    text-align: center;
}

.loop-history-pagination .page-numbers {
    display: inline-block;
    padding: 6px 10px;
    margin: 0 2px;
    border-radius: 6px;
    text-decoration: none;
    color: #334155;
}

.loop-history-pagination .page-numbers.current {
    background: #2bc016;
    color: #fff;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .loop-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .loop-divider {
        width: 100%;
        height: 1px;
        margin: 20px 0;
    }
    
    /* Ajustare Header Gamification pe mobil */
    .loop-dashboard-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px;
    }

    .loop-exit-coupon-box {
        flex-direction: column;
        gap: 15px;
    }

    .loop-copy-btn {
        width: 100%;
    }

    .loop-history-table th:nth-child(4),
    .loop-history-table td.loop-history-balance {
        display: none;
    }
}