/* Sepet Popup Styles */
.cart-popup {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: #fff;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
}

/* Cart Item Animations */
.cart-item {
    transition: all 0.3s ease;
    transform: translateX(0);
    opacity: 1;
}

.cart-item.removing {
    animation: slideOutLeft 0.4s ease forwards;
}

@keyframes slideOutLeft {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    50% {
        transform: translateX(-20px);
        opacity: 0.7;
    }

    100% {
        transform: translateX(-100%);
        opacity: 0;
    }
}

/* Quantity Button Animations */
.quantity-btn {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.quantity-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.quantity-btn:active {
    transform: scale(0.95);
    animation: buttonPress 0.2s ease;
}

@keyframes buttonPress {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(0.95);
    }
}

/* Plus button specific animation */
.quantity-btn.plus:active {
    animation: plusPulse 0.3s ease;
}

@keyframes plusPulse {
    0% {
        transform: scale(1);
        background-color: #f8f9fa;
    }

    50% {
        transform: scale(1.1);
        background-color: #28a745;
        color: white;
    }

    100% {
        transform: scale(1);
        background-color: #f8f9fa;
    }
}

/* Minus button specific animation */
.quantity-btn.minus:active {
    animation: minusPulse 0.3s ease;
}

@keyframes minusPulse {
    0% {
        transform: scale(1);
        background-color: #f8f9fa;
    }

    50% {
        transform: scale(1.1);
        background-color: #dc3545;
        color: white;
    }

    100% {
        transform: scale(1);
        background-color: #f8f9fa;
    }
}

.cart-popup.open {
    right: 0;
}

.cart-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.cart-popup-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cart-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.cart-popup-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.cart-close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.cart-close-btn:hover {
    background: #e9ecef;
    color: #333;
}

.cart-popup-body {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    position: relative;
}


.cart-items {
    display: none;
}

.cart-items.show {
    display: block;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item-image {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.cart-item-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 0.95rem;
    line-height: 1.3;
}

.cart-item-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cart-item-name a:hover {
    text-decoration: underline;
}

.cart-item-image a {
    display: block;
    transition: transform 0.2s ease;
}

.cart-item-image a:hover {
    transform: scale(1.05);
}

.cart-item-price {
    color: #e74c3c;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* İndirimli fiyat stilleri */
.cart-item-price .original-price {
    font-size: 0.8rem;
    color: #95a5a6;
    text-decoration: line-through;
    font-weight: 400;
}

.cart-item-price .discounted-price {
    font-size: 0.9rem;
    color: #e74c3c;
    font-weight: 700;
}

.cart-item-price .current-price {
    color: #e74c3c;
    font-weight: 700;
    font-size: 0.9rem;
}

.cart-item-price .discount-badge {
    background: #e74c3c;
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    margin-top: 8px;
    margin-left: auto;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    gap: 0px !important
}

.quantity-btn {
    background: #fff;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    color: #666;
    transition: all 0.2s ease;
    border-right: 1px solid #ddd;
    border-radius: 6px 0 0 6px !important;
}

.quantity-btn:last-child {
    border-right: none;
    border-left: 1px solid #ddd;
    border-radius: 0 6px 6px 0 !important;
}

.quantity-input {
    width: 40px;
    height: 30px;
    border: none;
    text-align: center;
    font-size: 0.8rem;
    background: #fff;
    color: #333;
    font-weight: 500;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

.quantity-btn:hover {
    background: #f8f9fa;
    color: #333;
}

.quantity-input {
    width: 40px;
    height: 30px;
    border: none;
    text-align: center;
    font-size: 0.9rem;
    background: #fff;
    color: #333;
    font-weight: 500;
}

.quantity-input:focus {
    outline: none;
    background: #f8f9fa;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cart-item-remove:hover {
    background: #f8d7da;
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    display: none;
}

.cart-empty.show {
    display: block;
}

.empty-cart-icon {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 20px;
}

.cart-empty p {
    color: #666;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.cart-popup-footer {
    border-top: 1px solid #eee;
    padding: 20px;
    background: #f8f9fa;
}

.cart-total {
    margin-bottom: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.total-row.discount-row {
    color: #e74c3c;
    font-weight: 500;
}

.total-row.discount-row .discount-amount {
    color: #e74c3c;
}

#cart-subtotal {
    font-weight: 500;

}

.total-row.total-final {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    border-top: 1px solid #ddd;
    padding-top: 10px;
    margin-top: 10px;
}

.cart-actions {
    display: flex;
    gap: 10px;
}

.cart-actions .btn {
    flex: 1;
    padding: 12px;
    font-size: 0.9rem;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.btn-outline:hover {
    background: #f8f9fa;
    border-color: #ccc;
}

.btn-primary {
    background: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background: #0056b3;
}

/* Responsive */
@media (max-width: 768px) {
    .cart-popup {
        width: 80%;
        right: -100%;
    }

    .cart-item {
        padding: 12px 15px;
    }

    .cart-popup.open {
        right: 0;
    }

    .cart-actions {
        flex-direction: column;
    }

    .cart-actions .btn {
        flex: none;
    }
}

/* Animation */
@keyframes slideInRight {
    from {
        right: -400px;
    }

    to {
        right: 0;
    }
}

@keyframes slideOutRight {
    from {
        right: 0;
    }

    to {
        right: -400px;
    }
}

/* Mobil responsive */
@media (max-width: 768px) {
    t-item .cart-actions {
        flex-direction: row;
        gap: 10px;
    }

    .cart-actions .btn {
        flex: 1;
        font-size: 0.9rem;
        padding: 12px 8px;
    }
}