/**
 * Professional Cart & KPI Enhancements
 * Premium UI/UX improvements
 */

/* ============================================================================
 * CART COUNT BADGE - Professional Enhancement
 * ============================================================================ */

/* Cart Icon - Professional Design */
#cart-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease;
    overflow: visible;
    z-index: 10;
}

#cart-icon:hover {
    transform: scale(1.05);
}

/* Cart Count Badge styles moved to cart-badge-fix.css to avoid conflicts */
/* This file now only contains KPI-related styles */

/* ============================================================================
 * KPI STRIP - Premium Professional Design
 * ============================================================================ */

.kpi-section {
    position: relative;
    overflow: hidden;
}

.kpi-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(11, 61, 145, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 200, 87, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.kpi-section > * {
    position: relative;
    z-index: 1;
}

.kpis-section-title {
    text-align: center;
    margin-bottom: 64px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px;
}

.kpis-section-title h2 {
    font-size: 42px;
    font-weight: 900;
    color: var(--brand);
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--brand) 0%, #1f4fa8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kpis-section-title p {
    font-size: 18px;
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 24px;
    position: relative;
}

.kpi {
    background: linear-gradient(135deg, var(--brand) 0%, #1f4fa8 100%);
    color: #fff;
    border-radius: calc(var(--radius) + 6px);
    padding: 40px 28px;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(11, 61, 145, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
}

/* KPI Background Pattern */
.kpi::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="80" height="80" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="kpi-dots" width="80" height="80" patternUnits="userSpaceOnUse"><circle cx="40" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23kpi-dots)"/></svg>');
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* KPI Hover Glow Effect */
.kpi::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.kpi:hover::after {
    opacity: 1;
}

.kpi:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 20px 50px rgba(11, 61, 145, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.kpi:hover::before {
    opacity: 0.6;
}

.kpi span {
    font-size: 14px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.95;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    line-height: 1.4;
}

.kpi b {
    font-size: 48px;
    display: block;
    margin-top: 4px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.04em;
    position: relative;
    z-index: 2;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* KPI Icons */
.kpi-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
    opacity: 0.95;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.kpi:hover .kpi-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.25);
}

.kpi-icon svg {
    width: 32px;
    height: 32px;
    stroke-width: 2.5;
}

/* Responsive KPI */
@media (max-width: 1024px) {
    .kpis {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
    
    .kpi {
        padding: 36px 24px;
    }
    
    .kpi b {
        font-size: 40px;
    }
    
    .kpis-section-title h2 {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .kpis {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .kpis-section-title {
        margin-bottom: 48px;
    }
    
    .kpis-section-title h2 {
        font-size: 32px;
    }
    
    .kpis-section-title p {
        font-size: 16px;
    }
    
    .kpi {
        padding: 32px 24px;
    }
    
    .kpi b {
        font-size: 36px;
    }
    
    .kpi-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 16px;
    }
    
    .kpi-icon svg {
        width: 28px;
        height: 28px;
    }
}

/* ============================================================================
 * CART PAGE ENHANCEMENTS
 * ============================================================================ */

.cart-grid {
    gap: 32px;
}

.cart-item-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-item-card:last-child {
    margin-bottom: 0;
}

/* Empty State Enhancement */
.empty-state-card {
    padding: 80px 40px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 2px dashed #cbd5e1;
}

.empty-state-icon {
    margin-bottom: 32px;
    opacity: 0.6;
}

.empty-state-title {
    font-size: 28px;
    margin-bottom: 16px;
}

.empty-state-text {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 32px;
}

/* Order Summary Card Enhancement */
.order-summary-card {
    border: 2px solid var(--brand);
    box-shadow: 0 12px 40px rgba(11, 61, 145, 0.15);
}

.order-summary-card:hover {
    box-shadow: 0 16px 50px rgba(11, 61, 145, 0.2);
}

/* ============================================================================
 * ANIMATIONS
 * ============================================================================ */

/* Fade in animation for KPI */
@keyframes kpiFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kpi {
    animation: kpiFadeIn 0.6s ease-out backwards;
}

.kpi:nth-child(1) { animation-delay: 0.1s; }
.kpi:nth-child(2) { animation-delay: 0.2s; }
.kpi:nth-child(3) { animation-delay: 0.3s; }
.kpi:nth-child(4) { animation-delay: 0.4s; }

/* Counter animation for KPI numbers */
@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.kpi b {
    animation: countUp 0.8s ease-out 0.3s backwards;
}

