/* ========================================
   SGI LEASE & GO - Interactive Components
   Toast, Modals, Buttons, etc.
   ======================================== */

/* ========================================
   Toast Notifications
   ======================================== */
.sgi-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 300px;
}

.sgi-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.sgi-toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.sgi-toast-content i {
    font-size: 20px;
}

.sgi-toast-success {
    border-left: 4px solid #10B981;
}

.sgi-toast-success .sgi-toast-content i {
    color: #10B981;
}

.sgi-toast-warning {
    border-left: 4px solid #F59E0B;
}

.sgi-toast-warning .sgi-toast-content i {
    color: #F59E0B;
}

.sgi-toast-info {
    border-left: 4px solid #3B82F6;
}

.sgi-toast-info .sgi-toast-content i {
    color: #3B82F6;
}

.sgi-toast-danger {
    border-left: 4px solid #EF4444;
}

.sgi-toast-danger .sgi-toast-content i {
    color: #EF4444;
}

/* ========================================
   Floating Compare Button
   ======================================== */
.compare-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--sgi-primary) 0%, var(--sgi-primary-dark) 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    border: none;
}

.compare-floating-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 32px rgba(255, 107, 53, 0.5);
}

.compare-floating-btn i {
    font-size: 24px;
}

.compare-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #EF4444;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid white;
}

/* ========================================
   Scroll to Top Button (SUPPRIMÉ - on utilise .scrollup natif)
   ======================================== */

/* ========================================
   Wishlist Button
   ======================================== */
.btn-wishlist {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.btn-wishlist:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-wishlist i {
    font-size: 18px;
    color: #6B7280;
    transition: all 0.3s ease;
}

.btn-wishlist.active i {
    color: #EF4444;
    animation: heartBeat 0.5s ease;
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(1.1);
    }
    75% {
        transform: scale(1.25);
    }
}

/* ========================================
   Quick View Button
   ======================================== */
.btn-quick-view {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(50px);
    opacity: 0;
    background: white;
    color: var(--sgi-primary);
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid var(--sgi-primary);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.product:hover .btn-quick-view {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.btn-quick-view:hover {
    background: var(--sgi-primary);
    color: white;
}

/* ========================================
   Compare Button
   ======================================== */
.btn-compare {
    background: transparent;
    border: 2px solid var(--sgi-secondary);
    color: var(--sgi-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-compare:hover {
    background: var(--sgi-secondary);
    color: white;
}

.btn-compare.active {
    background: var(--sgi-secondary);
    color: white;
}

.btn-compare i {
    font-size: 16px;
}

/* ========================================
   Loading Spinner
   ======================================== */
.sgi-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 107, 53, 0.2);
    border-top-color: var(--sgi-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.sgi-spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ========================================
   Product Badge Enhancements
   ======================================== */
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.product-badge.new {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
}

.product-badge.sale {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
}

.product-badge.hot {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
}

.product-badge.featured {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    color: white;
}

/* ========================================
   Skeleton Loading
   ======================================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    margin-bottom: 12px;
}

.skeleton-image {
    height: 280px;
    width: 100%;
}

/* ========================================
   Tooltip
   ======================================== */
.sgi-tooltip {
    position: relative;
    display: inline-block;
}

.sgi-tooltip .tooltip-text {
    visibility: hidden;
    background-color: #1F2937;
    color: white;
    text-align: center;
    padding: 8px 12px;
    border-radius: 8px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sgi-tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1F2937 transparent transparent transparent;
}

.sgi-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ========================================
   Progress Bar
   ======================================== */
.sgi-progress {
    height: 8px;
    background: #E5E7EB;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.sgi-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--sgi-primary) 0%, var(--sgi-accent) 100%);
    border-radius: 20px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sgi-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    .sgi-toast {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    .compare-floating-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}
