/* Sepet Sayfası Stilleri */
.cart-section {
    padding: 60px 0;
}

/* Adet değişikliği animasyonu */
@keyframes quantityChange {
    0% { background-color: transparent; }
    50% { background-color: rgba(0, 200, 83, 0.15); }
    100% { background-color: transparent; }
}

.cart-item.quantity-changed {
    animation: quantityChange 0.5s ease-in-out;
}

/* Ürün silme animasyonu */
@keyframes removeItem {
    0% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(30px); }
}

.cart-item.removing {
    animation: removeItem 0.3s ease-in-out forwards;
}

/* Miktar giriş alanı */
.quantity-input {
    transition: all 0.2s ease;
}

.quantity-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

.cart-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

/* Sol Taraf - Sepet Ürünleri */
.cart-items {
    flex: 1 1 65%;
}

.cart-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr 0.5fr;
    padding: 15px 0;
    font-weight: 700;
    text-align: left;
    align-items: center;
}

.cart-header-price {
    text-align: center;
    justify-self: center;
}

.cart-header-quantity {
    text-align: center;
    justify-self: center;
}

.cart-header-total {
    text-align: right;
    justify-self: end;
}

.cart-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr 0.5fr;
    padding: 20px;
    align-items: center;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

@media (min-width: 992px) {
    .cart-sepet-product-info .cart-sepet-price {
        display: none;
    }
    
    .desktop-price {
        font-weight: 700;
        color: var(--primary-color);
        font-size: 18px;
        text-align: center;
        justify-self: center;
    }
}

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

.cart-item.removing {
    opacity: 0;
    transform: translateX(-20px);
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-product-image {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
}

.cart-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-sepet-product-info {
    flex: 1;
}

.cart-sepet-product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-sepet-product-code {
    font-size: 14px;
    color: #777;
    margin: 0;
}

.cart-sepet-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 18px;
    text-align: center;
    justify-self: center;
}

.cart-sepet-total {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 18px;
    text-align: right;
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.cart-quantity {
    display: flex;
    justify-content: center;
    align-items: center;
    justify-self: center;
    margin: 0 auto;
    width: 100%;
    text-align: center;
}

.mobile-quantity {
    display: none;
}

.mobile-total {
    display: none;
}

.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 90px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    height: 45px;
}

.quantity-btn {
    width: 40px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    color: var(--red-color);
}

.quantity-input {
    width: 40px;
    height: 45px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    -moz-appearance: textfield;
    appearance: textfield;
    outline: none;
}

.quantity-input:focus {
    outline: none;
}

.cart-action {
    display: flex;
    justify-content: center;
    align-items: center;
}

.remove-item {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.remove-item:hover {
    color: var(--primary-color);
}

/* Boş Sepet Mesajı */
.empty-cart {
    padding: 60px 20px;
    text-align: center;
}

.empty-cart-icon {
    font-size: 60px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-cart h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.empty-cart p {
    color: #777;
    margin-bottom: 30px;
}

.continue-shopping {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.continue-shopping:hover {
    background-color: #333;
}

/* Sağ Taraf - Sepet Özeti */
.cart-summary {
    flex: 1 1 30%;
    padding: 10px 0 25px 0;
    align-self: flex-start;
}

.summary-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    color: var(--primary-color);
    text-align: left;
}

/* Kupon Bölümü - Ücretlerin üstüne taşındı */
.coupon-section {
    margin-bottom: 30px;
    margin-top: 10px;
}

.coupon-section h3 {
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 700;
    text-align: left;
}

.coupon-form {
    display: flex;
    margin-bottom: 25px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.coupon-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    font-size: 14px;
    outline: none;
}

.apply-coupon {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 0 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.apply-coupon:hover {
    background-color: #333;
}

/* Ücret Satırları */
.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 16px;
}

.summary-label {
    color: #555;
    text-align: left;
    font-weight: 600;
}

.summary-value {
    font-weight: 600;
    text-align: right;
    justify-self: end;
}

.summary-row.cart-discount .summary-value {
    color: var(--primary-color);
    font-weight: 700;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    margin: 25px 0;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 20px;
}

.summary-total .summary-label {
    font-weight: 700;
    color: #333;
}

.summary-total .summary-value {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 22px;
}

.checkout-btn {
    width: 100%;
    background-color: var(--red-color);
    color: #fff;
    padding: 15px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 15px;
    text-align: center;
    text-transform: uppercase;
}

.checkout-btn:hover {
    background-color: #b00a1b;
}

.continue-shopping-link {
    display: block;
    text-align: center;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
    border-bottom: none;
}

.continue-shopping-link:hover {
    color: var(--primary-color);
}

/* İlgili Ürünler Bölümü */
.related-products {
    padding: 60px 0;
    background-color: #fff;
}

.cart-products-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 30px;
}

/* Responsive Tasarım */
@media (max-width: 992px) {
    .cart-container {
        flex-direction: column;
    }
    
    .products-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    .cart-container {
        flex-direction: column;
    }
    
    .cart-items, .cart-summary {
        width: 100%;
    }
    
    .cart-summary {
        margin-top: 30px;
        padding: 0 15px;
        text-align: center;
    }
    
    .summary-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .summary-label {
        text-align: left;
    }
    
    .summary-value {
        text-align: right;
    }
    
    .cart-header {
        display: none;
    }
    
    .cart-item {
        display: flex;
        flex-direction: column;
        padding: 15px 10px;
        position: relative;
        margin-bottom: 20px;
        border-bottom: 1px solid #eee;
    }
    
    .cart-quantity {
        display: none;
    }
    
    .cart-sepet-total {
        display: none;
    }
    
    .desktop-price {
        display: none;
    }
    
    .mobile-quantity {
        display: flex;
    }
    
    .mobile-total {
        display: block;
    }
    
    .cart-product {
        display: flex;
        align-items: flex-start;
        width: 100%;
        margin-bottom: 15px;
    }
    
    .cart-product-image {
        width: 120px;
        height: 120px;
        margin-right: 15px;
    }
    
    .cart-sepet-product-info {
        padding-left: 0;
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .cart-sepet-product-title {
        font-size: 20px;
        margin-bottom: 5px;
        font-weight: 700;
    }
    
    .cart-sepet-product-code {
        font-size: 13px;
        margin-bottom: 5px;
    }
    
    .cart-sepet-price {
        font-size: 18px;
        font-weight: 700;
        color: var(--primary-color);
        text-align: left;
    }
    
    .cart-action {
        position: absolute;
        top: 15px;
        right: 15px;
    }
    
    .cart-price-quantity {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-top: 5px;
        border-top: none;
    }
    
    .cart-sepet-total {
        font-size: 18px;
        font-weight: 700;
        text-align: right;
        width: 100%;
    }
    
    .quantity-input {
        width: 35px;
        height: 35px;
    }
    
    .quantity-btn {
        width: 35px;
        height: 35px;
    }
}

/* Küçük ekranlar için ek düzenlemeler */
@media (max-width: 576px) {
    .cart-product-image {
        width: 100px;
        height: 100px;
    }
    
    .cart-sepet-product-title {
        font-size: 18px;
    }
    
    .cart-sepet-product-code {
        font-size: 14px;
    }
    
    .cart-sepet-price {
        font-size: 20px;
    }
    
    .quantity-input {
        width: 30px;
        height: 30px;
    }
    
    .quantity-btn {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .cart-price::before, .cart-quantity::before, .cart-total::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 10px;
    }
    
    .cart-price::before {
        content: "Fiyat:";
    }
    
    .cart-quantity::before {
        content: "";
    }
    
    .cart-total::before {
        content: "Toplam:";
    }
    
    .cart-action {
        justify-content: flex-end;
        padding-top: 10px;
    }
    
    .products-row {
        grid-template-columns: 1fr;
    }
}
