/**
 * Modern Shopping Cart Styles
 * YouthMood E-Ticaret - Sepet Tasarımı
 */

/* ===== Sepet Overlay ===== */
#cartOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#cartOverlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== Sepet Sidebar ===== */
#cartSidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 90vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    z-index: 10002;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

#cartSidebar.active {
    transform: translateX(0);
}

/* ===== Sepet Header - Modern Gradient ===== */
.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.cart-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.cart-header-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-header-title svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.cart-header-title h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.cart-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.cart-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cart-close-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* ===== Sepet Badge ===== */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    border: 2px solid white;
}

/* ===== Sepet İçerik ===== */
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* ===== Ücretsiz Kargo Bildirimi - Ultra Modern ===== */
.free-shipping-notice {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.08) 100%);
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.free-shipping-notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, transparent 100%);
    pointer-events: none;
}

.free-shipping-notice.achieved {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
    animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 12px 32px rgba(16, 185, 129, 0.35);
    }
}

.free-shipping-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.875rem;
    position: relative;
    z-index: 1;
}

.free-shipping-text {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 700;
    font-size: 1rem;
    color: #059669;
    letter-spacing: 0.3px;
}

.free-shipping-notice.achieved .free-shipping-text {
    color: #047857;
}

.free-shipping-icon {
    width: 24px;
    height: 24px;
    stroke: #10b981;
    stroke-width: 2.5;
    filter: drop-shadow(0 2px 4px rgba(16, 185, 129, 0.3));
    transition: transform 0.3s ease;
}

.free-shipping-notice.achieved .free-shipping-icon {
    stroke: #059669;
    animation: checkBounce 0.6s ease-out;
}

@keyframes checkBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
}

.free-shipping-amount {
    font-size: 1.125rem;
    font-weight: 800;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
}

.free-shipping-notice.achieved .free-shipping-amount {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Progress Bar Container - Modern Design */
.free-shipping-progress-container {
    width: 100%;
    height: 8px;
    background: linear-gradient(135deg, rgba(209, 213, 219, 0.5) 0%, rgba(229, 231, 235, 0.5) 100%);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 0.875rem;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.free-shipping-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 50%, #10b981 100%);
    background-size: 200% 100%;
    border-radius: 100px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% center;
    }
    100% {
        background-position: -200% center;
    }
}

.free-shipping-notice.achieved .free-shipping-progress-bar {
    background: linear-gradient(90deg, #059669 0%, #047857 50%, #059669 100%);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite, glow 1.5s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.6), 0 0 30px rgba(16, 185, 129, 0.3);
    }
}

.free-shipping-message {
    font-size: 0.875rem;
    color: #059669;
    line-height: 1.5;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.free-shipping-notice.achieved .free-shipping-message {
    color: #047857;
    font-weight: 600;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .free-shipping-notice {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .free-shipping-text {
        font-size: 0.9375rem;
    }
    
    .free-shipping-icon {
        width: 20px;
        height: 20px;
    }
    
    .free-shipping-amount {
        font-size: 1rem;
    }
    
    .free-shipping-message {
        font-size: 0.8125rem;
    }
}

/* ===== Boş Sepet - Modern & Elegant ===== */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 3rem 2rem;
    text-align: center;
    color: #6b7280;
}

.cart-empty-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 1.5rem;
    opacity: 0.3;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 50%;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.cart-empty-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.cart-empty-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cart-empty-text {
    font-size: 0.9375rem;
    color: #6b7280;
    line-height: 1.6;
}

/* ===== Sepet Ürünleri - Modern Cards ===== */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(249, 250, 251, 0.9) 100%);
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cart-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(249, 250, 251, 1) 100%);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    border-color: rgba(102, 126, 234, 0.2);
}

.cart-item:hover::before {
    opacity: 1;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.cart-item:hover .cart-item-image {
    transform: scale(1.05);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cart-item-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
    letter-spacing: 0.2px;
}

.cart-item-variant {
    display: flex;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #6b7280;
}

.variant-color {
    font-weight: 500;
}

.cart-item-price {
    font-size: 1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 0.25rem;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

/* ===== Miktar Kontrolü - Modern Buttons ===== */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(243, 244, 246, 0.9) 100%);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 0.75rem;
    padding: 0.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    color: #667eea;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
}

.qty-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-btn svg {
    width: 14px;
    height: 14px;
}

.qty-value {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
}

.remove-item-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: #dc2626;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.remove-item-btn:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.remove-item-btn svg {
    width: 16px;
    height: 16px;
}

/* ===== Sepet Footer - Modern Glassmorphism ===== */
.cart-footer {
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 251, 0.95) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
    border-radius: 0.75rem;
}

.cart-total-label {
    font-size: 1.125rem;
    font-weight: 700;
    color: #374151;
    letter-spacing: 0.3px;
}

.cart-total-amount {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkout-btn {
    width: 100%;
    padding: 1.125rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 1rem;
    font-size: 1.0625rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.checkout-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.checkout-btn:hover::before {
    left: 100%;
}

.checkout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

.checkout-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.clear-cart-btn {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, rgba(243, 244, 246, 0.8) 0%, rgba(229, 231, 235, 0.8) 100%);
    color: #6b7280;
    border: 2px solid rgba(107, 114, 128, 0.1);
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.clear-cart-btn:hover {
    background: linear-gradient(135deg, rgba(229, 231, 235, 1) 0%, rgba(209, 213, 219, 1) 100%);
    color: #374151;
    border-color: rgba(107, 114, 128, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    #cartSidebar {
        width: 100%;
        max-width: 100%;
    }
    
    .cart-item {
        padding: 0.875rem;
    }
    
    .cart-item-image {
        width: 70px;
        height: 70px;
    }
    
    .cart-item-name {
        font-size: 0.875rem;
    }
    
    .cart-total-amount {
        font-size: 1.25rem;
    }
}

/* ===== Scrollbar Styling ===== */
.cart-body::-webkit-scrollbar {
    width: 6px;
}

.cart-body::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.cart-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.cart-body::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ===== Animasyonlar ===== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-item {
    animation: slideIn 0.3s ease;
}
