/* ====================================
   🤖 AI İSTATİSTİKLERİ KARTI
   ==================================== */

.ai-stats-container {
    width: 100%;
    margin: 0;
    padding: 0;
    grid-column: span 3;
}

.ai-stats-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 23px 20px;
    box-shadow: 0 4px 20px rgba(252, 80, 33, 0.08);
    border: 2px solid rgba(252, 80, 33, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    max-height: 275px;
    display: flex;
    flex-direction: column;
}

.ai-stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--primary-color) 0%, 
        #ff6b35 50%, 
        var(--primary-color) 100%);
    background-size: 200% 100%;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.ai-stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(252, 80, 33, 0.15);
}

/* ====================================
   AI BAŞLIK BÖLÜMÜ
   ==================================== */

.ai-stats-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(252, 80, 33, 0.1);
}

.ai-icon-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #ff6b35);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(252, 80, 33, 0.3);
}

.ai-icon {
    font-size: 20px;
    color: white;
    z-index: 2;
    animation: robotBounce 2s ease-in-out infinite;
}

@keyframes robotBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.ai-pulse {
    position: absolute;
    inset: -3px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color), #ff6b35);
    opacity: 0.4;
    animation: pulsate 2s ease-in-out infinite;
}

@keyframes pulsate {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.4;
    }
    50% { 
        transform: scale(1.15);
        opacity: 0.1;
    }
}

.ai-header-text h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--primary-color), #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.ai-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 0 0;
    font-size: 11px;
    color: var(--text-dark-low);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
}

/* ====================================
   İSTATİSTİK GRID
   ==================================== */

.ai-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
    flex: 1;
}

.stat-item {
    background: white;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid rgba(252, 80, 33, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0%;
    background: linear-gradient(180deg, var(--primary-color), #ff6b35);
    transition: height 0.6s ease;
}

.stat-item:hover::before {
    height: 100%;
}

@media (min-width: 769px) {
    .stat-item:hover {
        transform: translateX(4px);
        box-shadow: 0 4px 15px rgba(252, 80, 33, 0.12);
        border-color: var(--primary-color);
    }
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    position: relative;
}

    .stat-icon.products {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.15));
        color: #fc5021;
    }

    .stat-icon.stores {
        background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(147, 51, 234, 0.15));
        color: #fc5021;
    }

.stat-icon i {
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(2deg); }
    75% { transform: translateY(3px) rotate(-2deg); }
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 11px;
    color: var(--text-dark-low);
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 6px;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #22c55e;
    font-weight: 600;
}

.stat-change i {
    font-size: 10px;
}

/* ====================================
   FOOTER BÖLÜMÜ
   ==================================== */

.ai-stats-footer {
    background: linear-gradient(135deg, rgba(252, 80, 33, 0.03), rgba(255, 107, 53, 0.05));
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 0;
}

.ai-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: var(--text-dark-low);
    line-height: 1.4;
}

.ai-info i {
    color: var(--primary-color);
    font-size: 12px;
    flex-shrink: 0;
}

/* ====================================
   RESPONSİVE TASARIM
   ==================================== */

/* Tablet - Medium Screens */
@media (max-width: 991px) and (min-width: 769px) {
    .ai-stats-container {
        grid-column: span 10;
        width: 100%;
    }

    .ai-stats-card {
        max-height: none;
    }

    .ai-stats-grid {
        gap: 14px;
    }
}

/* Mobile - Small Screens */
@media (max-width: 768px) {
    .ai-stats-container {
        grid-column: span 10;
        width: 100%;
    }

    .ai-stats-card {
        padding: 16px;
        max-height: none;
        border-radius: 10px;
    }

    .ai-stats-header {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        margin-bottom: 14px;
        padding-bottom: 14px;
    }

    .ai-icon-wrapper {
        width: 38px;
        height: 38px;
        border-radius: 9px;
    }

    .ai-icon {
        font-size: 19px;
    }

    .ai-header-text h3 {
        font-size: 15px;
    }

    .ai-status {
        font-size: 11px;
    }

    .ai-stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 12px;
    }

    .stat-item {
        padding: 14px;
        flex-direction: row;
        align-items: center;
    }

    .stat-icon {
        width: 38px;
        height: 38px;
        font-size: 19px;
    }

    .stat-content {
        flex: 1;
    }

    .stat-label {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .stat-value {
        font-size: 22px;
        margin-bottom: 4px;
    }

    .stat-change {
        font-size: 10px;
    }

    .ai-stats-footer {
        padding: 10px 12px;
    }

    .ai-info {
        font-size: 10px;
        gap: 8px;
    }

    .ai-info i {
        font-size: 13px;
    }
}

/* Mobile - Extra Small Screens */
@media (max-width: 480px) {
    .ai-stats-card {
        padding: 14px;
        border-radius: 8px;
    }

    .ai-stats-header {
        gap: 10px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .ai-icon-wrapper {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    .ai-icon {
        font-size: 17px;
    }

    .ai-header-text h3 {
        font-size: 14px;
    }

    .ai-status {
        font-size: 10px;
        gap: 5px;
    }

    .status-dot {
        width: 5px;
        height: 5px;
    }

    .ai-stats-grid {
        gap: 10px;
    }

    .stat-item {
        padding: 12px;
        gap: 10px;
    }

    .stat-icon {
        width: 34px;
        height: 34px;
        font-size: 17px;
        border-radius: 8px;
    }

    .stat-label {
        font-size: 10px;
        margin-bottom: 3px;
        letter-spacing: 0.2px;
    }

    .stat-value {
        font-size: 20px;
        margin-bottom: 3px;
    }

    .stat-change {
        font-size: 9px;
        gap: 3px;
    }

    .stat-change i {
        font-size: 9px;
    }

    .ai-stats-footer {
        padding: 9px 10px;
        border-radius: 6px;
    }

    .ai-info {
        font-size: 9px;
        gap: 6px;
        line-height: 1.3;
    }

    .ai-info i {
        font-size: 11px;
    }
}

/* Mobile - Tiny Screens */
@media (max-width: 360px) {
    .ai-stats-card {
        padding: 12px;
    }

    .ai-header-text h3 {
        font-size: 13px;
    }

    .stat-value {
        font-size: 18px;
    }

    .stat-label {
        font-size: 9px;
    }

    .ai-info {
        font-size: 8px;
    }
}

/* ====================================
   COUNTER ANIMATION
   ==================================== */

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-value.counting {
    animation: countUp 0.6s ease;
}

/* 🔥 Canlı güncelleme efekti */
.stat-value.live-updating {
    animation: liveUpdate 0.4s ease;
}

@keyframes liveUpdate {
    0% { 
        transform: scale(1); 
        color: var(--text-dark);
    }
    50% { 
        transform: scale(1.08); 
        color: var(--primary-color);
        text-shadow: 0 0 10px rgba(252, 80, 33, 0.3);
    }
    100% { 
        transform: scale(1); 
        color: var(--text-dark);
    }
}

