/* 🎨 Modern UI Enhancements - Görünür İyileştirmeler */

/* ============================================
   SKELETON LOADING - Ürünler yüklenirken
   ============================================ */
.skeleton-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    box-shadow: var(--card-shadow);
}

.skeleton-image {
    width: 100%;
    height: 280px;
    background: linear-gradient(90deg, 
        rgba(200, 200, 200, 0.1) 25%, 
        rgba(200, 200, 200, 0.2) 50%, 
        rgba(200, 200, 200, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-content {
    padding: 20px;
}

.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, 
        rgba(200, 200, 200, 0.1) 25%, 
        rgba(200, 200, 200, 0.2) 50%, 
        rgba(200, 200, 200, 0.1) 75%);
    background-size: 200% 100%;
    border-radius: 6px;
    margin-bottom: 12px;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-line.short {
    width: 40%;
}

.skeleton-line.medium {
    width: 70%;
}

.skeleton-line.long {
    width: 100%;
}

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

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ============================================
   TOAST NOTIFICATIONS - Minimal Les Benjamins Style
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 300px;
    width: auto;
    min-width: 200px;
    pointer-events: none;
}

.toast {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.toast.show {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--text-primary);
}

.toast.success {
    border-left: 2px solid var(--text-primary);
}

.toast.error {
    border-left: 2px solid var(--text-primary);
}

.toast.warning {
    border-left: 2px solid var(--text-primary);
}

.toast.info {
    border-left: 2px solid var(--text-primary);
}

.toast-icon {
    font-size: 12px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 400;
    font-size: 10px;
    color: var(--text-primary);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.toast-message {
    font-size: 11px;
    color: var(--text-primary);
    line-height: 1.4;
    font-weight: 400;
}

.toast-close {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
    font-weight: 300;
}

.toast-close:hover {
    opacity: 0.6;
    color: var(--text-primary);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 1px;
    background: var(--text-primary);
    animation: toast-progress 5s linear forwards;
    opacity: 0.3;
}

/* Animation removed - using transition instead */

@keyframes toast-progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.toast.hiding {
    transform: translateY(100px) !important;
    opacity: 0 !important;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ============================================
   LOADING SPINNERS - Yükleme Göstergeleri
   ============================================ */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.spinner-large {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

.spinner-small {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

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

/* Button Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   SUCCESS ANIMATIONS - Başarı Animasyonları
   ============================================ */
.success-checkmark {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: #4ade80;
    stroke-miterlimit: 10;
    margin: 0 auto;
    box-shadow: inset 0px 0px 0px #4ade80;
    animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

.success-checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke-miterlimit: 10;
    stroke: #4ade80;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px #4ade80;
    }
}

/* Success Pulse Animation */
.success-pulse {
    animation: success-pulse 0.6s ease-out;
}

@keyframes success-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* ============================================
   SMOOTH TRANSITIONS - Akıcı Geçişler
   ============================================ */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-up {
    animation: slideUp 0.4s ease-out;
}

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

.scale-in {
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   PRODUCT CARD ENHANCEMENTS - Kart İyileştirmeleri
   ============================================ */
.product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.product-card.adding {
    animation: card-add 0.5s ease-out;
}

@keyframes card-add {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.product-card.removing {
    animation: card-remove 0.3s ease-in forwards;
}

@keyframes card-remove {
    to {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
}

/* Image Loading State */
.product-image {
    transition: opacity 0.3s ease;
}

.product-image.loading {
    opacity: 0.5;
    background: linear-gradient(90deg, 
        rgba(200, 200, 200, 0.1) 25%, 
        rgba(200, 200, 200, 0.2) 50%, 
        rgba(200, 200, 200, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

/* ============================================
   BUTTON ENHANCEMENTS - Buton İyileştirmeleri
   ============================================ */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ============================================
   PROGRESS INDICATORS - İlerleme Göstergeleri
   ============================================ */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

/* ============================================
   CONFIRMATION DIALOG - Onay Diyalogları
   ============================================ */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.confirm-dialog {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px var(--shadow);
    animation: scaleIn 0.3s ease;
}

.confirm-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.confirm-message {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.confirm-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 14px;
}

.confirm-btn-cancel {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.confirm-btn-cancel:hover {
    background: var(--bg-secondary);
}

.confirm-btn-confirm {
    background: var(--gradient-primary);
    color: white;
}

.confirm-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow);
}

/* ============================================
   RESPONSIVE - Mobil Uyumluluk
   ============================================ */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        padding: 12px 16px;
    }
    
    .confirm-dialog {
        padding: 24px;
        margin: 20px;
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */
[data-theme="dark"] .skeleton-image,
[data-theme="dark"] .skeleton-line {
    background: linear-gradient(90deg, 
        rgba(100, 100, 100, 0.1) 25%, 
        rgba(100, 100, 100, 0.2) 50%, 
        rgba(100, 100, 100, 0.1) 75%);
    background-size: 200% 100%;
}

[data-theme="dark"] .product-image.loading {
    background: linear-gradient(90deg, 
        rgba(100, 100, 100, 0.1) 25%, 
        rgba(100, 100, 100, 0.2) 50%, 
        rgba(100, 100, 100, 0.1) 75%);
    background-size: 200% 100%;
}


/* ============================================
   RESPONSIVE HEADER - Mobil Header Düzeni
   ============================================ */
@media (max-width: 768px) {
    .header {
        height: auto;
        padding: 10px 0;
    }

    .header-content {
        flex-wrap: wrap;
        height: auto;
        gap: 10px;
        padding: 0 15px;
    }

    /* 1. Logo (Sol Üst) */
    .logo {
        order: 1;
        flex: 1;
    }

    /* 2. Actions (Sağ Üst - Tema, Bildirim, Profil) */
    .header-actions {
        order: 2;
        gap: 15px;
    }

    /* 3. Search (Orta - Tam Genişlik) */
    .header-search {
        order: 3;
        width: 100%;
        max-width: none;
        margin: 0;
        border-bottom: 1px solid var(--border-color);
    }

    /* 4. Navigation (Alt - Kaydırılabilir) */
    .nav-links {
        order: 4;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px 0;
        gap: 20px;
        -webkit-overflow-scrolling: touch;
        border-top: 1px solid var(--border-color);
        margin-top: 5px;
        /* Scrollbar gizle */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-btn {
        font-size: 11px;
        padding: 5px 0;
        flex-shrink: 0;
    }
}
