/* Sepet CSS Stilleri - css/cart.css */

/* Sepet ikonu ve sayaç */
.cart-icon {
    position: relative;
    display: inline-block;
    cursor: pointer;
    padding: 10px;
    border: 2px solid #1e3a8a;
    border-radius: 5px;
    background: transparent;
    color: #1e3a8a;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.cart-icon:hover {
    background: #1e3a8a;
    color: white;
}

.cart-counter {
    position: absolute;
    top: -8px;
    right: -3px;
    background: #1e3a8a;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 20px;
    font-size: 12px;
    text-align: center;
    font-weight: bold;
    display: none;
}

/* Sepet modal */
.cart-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.cart-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: none;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.cart-header {
    background: #1e3a8a;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    margin: 0;
    font-size: 24px;
}

.cart-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-close:hover {
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
}

.cart-body {
    padding: 20px;
    max-height: 50vh;
    overflow-y: auto;
}

.empty-cart {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 18px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    gap: 15px;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    flex-shrink: 0;
}

.cart-item-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #eee;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-details h5 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.cart-item-details p {
    margin: 2px 0;
    font-size: 12px;
    color: #666;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-qty {
    background: #f8f9fa;
    border: 1px solid #ddd;
    width: 30px;
    height: 30px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.btn-qty:hover {
    background: #e9ecef;
}

.quantity {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
}

.btn-remove {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 5px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.btn-remove:hover {
    background: #c82333;
}

.cart-footer {
    background: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.cart-summary {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.cart-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-cart {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-clear {
    background: #6c757d;
    color: white;
}

.btn-clear:hover {
    background: #5a6268;
}

.btn-pdf {
    background: #28a745;
    color: white;
}

.btn-pdf:hover {
    background: #218838;
}

.btn-quote {
    background: #007bff;
    color: white;
}

.btn-quote:hover {
    background: #0056b3;
}

/* Teklif formu modal */
.quote-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.quote-modal-content {
    background-color: #fefefe;
    margin: 3% auto;
    padding: 0;
    border: none;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.quote-header {
    background: #007bff;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quote-header h2 {
    margin: 0;
    font-size: 24px;
}

.quote-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quote-close:hover {
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
}

.quote-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.quote-products {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 20px;
    background: #f8f9fa;
}

.quote-product-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quote-product-item:last-child {
    border-bottom: none;
}

.quote-product-name {
    font-weight: 500;
    color: #333;
    flex: 1;
}

.quote-product-quantity {
    background: #007bff;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 10px;
}

.quote-form-group {
    margin-bottom: 15px;
}

.quote-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.quote-form-group input,
.quote-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.quote-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.quote-form-group input:focus,
.quote-form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

.quote-form-group small {
    display: block;
    margin-top: 3px;
    color: #666;
    font-size: 12px;
}

.quote-footer {
    background: #f8f9fa;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-submit-quote {
    background: #28a745;
    color: white;
    padding: 10px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-submit-quote:hover {
    background: #218838;
}

.btn-submit-quote:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Sepete ekle butonu */
.btn-add-cart {
    background: #1e3a8a;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add-cart:hover {
    background: #8a1418;
    color: #fff;
}

/* Bildirim */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 15px 20px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    border-left: 4px solid #007bff;
    animation: slideInRight 0.3s ease;
}

.cart-notification.success {
    border-left-color: #28a745;
    color: #155724;
}

.cart-notification.error {
    border-left-color: #3b82f6;
    color: #721c24;
}

.cart-notification.info {
    border-left-color: #17a2b8;
    color: #0c5460;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .cart-modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cart-item-actions {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
    
    .cart-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cart-actions {
        justify-content: center;
    }
    
    .cart-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    .cart-icon {
        padding: 8px;
        margin-left: 5px;
    }
}