/* Sepet Stilleri */

/* Sepet Ikonu ve Badge */
.cart-icon {
    position: relative;
    color: #666;
    font-size: 1.5rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cart-icon:hover {
    color: #08C;
    text-decoration: none;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    min-width: 20px;
}

/* Sepet Dropdown */
.cart-dropdown {
    position: relative;
    display: inline-block;
}

.mini-cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    width: 350px;
    max-width: 90vw;
    z-index: 1000;
    display: none;
    padding: 1rem;
}

.cart-dropdown:hover .mini-cart-dropdown {
    display: block;
}

/* Sepet Öğeleri */
.cart-items {
    max-height: 300px;
    overflow-y: auto;
}

.cart-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    border-radius: 4px;
    border: 1px solid #eee;
}

.cart-item-name {
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    font-size: 0.875rem;
    font-weight: 600;
}

/* Sepet Toplamı */
.cart-total {
    padding: 1rem 0 0.5rem;
    border-top: 2px solid #eee;
    margin-top: 1rem;
    text-align: center;
    font-size: 1.1rem;
}

/* Sepet Aksiyonları */
.cart-actions {
    padding-top: 0.5rem;
    text-align: center;
}

.cart-actions .btn {
    margin: 0 0.25rem;
}

/* Miktar Kontrolleri */
.quantity-controls {
    max-width: 140px;
}

.quantity-controls .btn {
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-input {
    border-left: none;
    border-right: none;
    text-align: center;
    padding: 0.25rem 0.5rem;
}

.quantity-input:focus {
    box-shadow: none;
    border-color: #08C;
}

/* Hover Efektleri */
.product-default:hover .cart-icon-overlay,
.category-card:hover .cart-icon-overlay {
    opacity: 1 !important;
}

.cart-icon-overlay:hover {
    background: rgba(0, 136, 204, 1) !important;
    transform: translate(-50%, -50%) scale(1.1) !important;
}

/* Sepet Sayfası */
.cart-page-container {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    min-height: 300px;
    height: auto !important;
    max-height: none !important;
    transition: all 0.3s ease-in-out;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
}

/* Sepet ürünlerinin container'ı */
.cart-items {
    flex: 1;
    width: 100%;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Her bir sepet öğesi */
.cart-item {
    margin-bottom: 1rem !important;
    height: auto !important;
    min-height: auto !important;
}

/* Sepet özeti */
.cart-summary {
    margin-top: auto;
    flex-shrink: 0;
}

/* Dinamik yükseklik sınıfı */
.cart-page-container.dynamic-height {
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
}

/* Sepet dolu olduğunda */
.cart-page-container:has(.cart-items) {
    min-height: auto !important;
    height: auto !important;
}

/* Tüm scrollbar'ları tamamen kaldır */
* {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

*::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari and Opera */
    width: 0 !important;
    height: 0 !important;
}

/* Özel olarak body ve html için */
body, html {
    overflow-x: hidden;
}

/* Sepet Sayfasında Ürün Boyutları */
.cart-page-container .cart-item img {
    max-width: 80px;
    max-height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-page-container .cart-item h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.cart-page-container .cart-item {
    padding: 1rem 0;
}

.cart-summary {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Bildirimler */
.cart-notification {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 1rem 1.5rem;
    margin-bottom: 0;
}

.cart-notification .btn-close {
    padding: 0.5rem;
    margin: -0.5rem -0.75rem -0.5rem auto;
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .mini-cart-dropdown {
        width: 300px;
        right: -50px;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .cart-item > div {
        width: 100% !important;
        margin-bottom: 0.5rem;
    }
    
    .quantity-controls {
        max-width: 100%;
        justify-content: flex-start;
    }
    
    .cart-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

@media (max-width: 576px) {
    .mini-cart-dropdown {
        width: calc(100vw - 40px);
        right: -100px;
    }
    
    .cart-summary {
        padding: 1rem;
    }
    
    .cart-summary .row > div {
        text-align: center !important;
        margin-bottom: 1rem;
    }
}

/* Sepet Boş Durumu */
.empty-cart {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-cart i {
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Animasyonlar */
@keyframes cartBounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    80% {
        transform: translateY(-5px);
    }
}

.cart-icon.animate {
    animation: cartBounce 0.6s ease-in-out;
}

.cart-badge.animate {
    animation: cartBounce 0.6s ease-in-out 0.1s;
}

/* Teklif Formu Stilleri */
.quote-form {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.quote-form .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.quote-form .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.quote-form .form-control:focus {
    border-color: #08C;
    box-shadow: 0 0 0 0.2rem rgba(0, 136, 204, 0.25);
}

.quote-form textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.quote-form .btn-primary {
    background: #08C;
    border-color: #08C;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.quote-form .btn-primary:hover {
    background: #007bff;
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
}

/* Sepet Özeti Kartı */
.cart-summary-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.cart-summary-card h5 {
    color: #495057;
    margin-bottom: 1rem;
    font-weight: 600;
}

.cart-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

.cart-summary-item:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 1.1rem;
    color: #08C;
}

/* Header'da Sepet Ikonu */
.header-cart {
    margin-left: 1rem;
}

.header-cart .cart-icon {
    font-size: 2.5rem;
    color: #333;
}

.header-cart .cart-icon:hover {
    color: #08C;
}

/* Sepet Badge Header için */
.header .cart-badge {
    background: #08C;
    top: -5px;
    right: -5px;
}

/* Sticky Navigation'da Sepet */
.sticky-navbar .cart-icon {
    font-size: 1.3rem;
}

.sticky-navbar .cart-badge {
    width: 16px;
    height: 16px;
    font-size: 10px;
    top: -6px;
    right: -6px;
}

/* Loading States */
.cart-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

/* Processing state - prevent multiple clicks */
.processing {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.cart-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #08C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .mini-cart-dropdown {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .cart-item {
        border-color: #4a5568;
    }
    
    .cart-total {
        border-color: #4a5568;
    }
}

/* Print Styles */
@media print {
    .cart-icon-overlay,
    .cart-notification,
    .mini-cart-dropdown {
        display: none !important;
    }
}
