/**
 * Sepet Düzeltmeleri
 * Bu dosya, cart.css ile çakışmadan sorunları düzeltmek için oluşturulmuştur.
 */

/* Tablo başlık ayarlamaları */
.cart-table-header {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(120px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr) minmax(60px, 0.5fr);
    gap: 0;
}

/* Desktop (> 768px) stil ayarlamaları */
@media (min-width: 769px) {
    /* Desktop görünümünde miktar kontrollerini düzgün konumlandır */
    .item-cell.quantity-column {
        display: flex;
        justify-content: center;
    }
    
    .quantity-control {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 120px;
        height: 40px;
        border: 1px solid var(--premium-border);
        border-radius: 4px;
        background: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
    
    .quantity-btn {
        width: 28px;
        height: 28px;
        border: none;
        background: #f5f5f5;
        color: var(--premium-text);
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        margin: 0 4px;
    }
    
    .quantity-input {
        width: 40px;
        border: none;
        background: transparent;
        text-align: center;
        font-size: 16px;
        font-weight: 600;
        color: var(--premium-text);
    }
}

/* Mobil (≤ 768px) stil ayarlamaları */
@media (max-width: 768px) {
    /* Mobil görünümde tablo başlık yazılarını gizle ama divin kendisini koru */
    .cart-table-header .header-cell {
        font-size: 0;
        color: transparent;
        overflow: hidden;
    }
    
    /* Mobil görünümde sepet öğelerini düzenle */
    .cart-item {
        display: grid;
        grid-template-columns: 1fr;
        padding: 20px 15px;
        position: relative;
        gap: 15px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    /* Tüm hücreleri tam genişlikte göster */
    .item-cell {
        justify-content: flex-start;
        padding: 0;
        width: 100%;
    }
    
    /* Kaldırma butonuna yer aç */
    .item-cell.product-column {
        padding-right: 40px;
    }
    
    /* Mobil görünüm için etiketleri ekle */
    .item-cell.price-column::before,
    .item-cell.quantity-column::before,
    .item-cell.total-column::before {
        content: attr(data-label);
        font-weight: 600;
        width: 90px;
        min-width: 90px;
        margin-right: 10px;
        font-size: 14px;
        color: var(--premium-text-light);
        display: inline-block;
    }
    
    /* Fiyat, miktar ve toplam sütunlarını düzenle */
    .item-cell.price-column,
    .item-cell.quantity-column,
    .item-cell.total-column {
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }
    
    /* Miktar kontrollerinin konumlandırmasını düzelt */
    .item-cell.quantity-column {
        position: relative;
        min-height: 50px;
    }
    
    /* Miktar kontrollerini sağa konumlandır (138px uzaklığa) */
    .quantity-control {
        position: absolute;
        right: 138px;
        top: 50%;
        transform: translateY(-50%);
        width: 110px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #f8f8f8;
        border-radius: 18px;
        padding: 0 5px;
        border: 1px solid #e0e0e0;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }
    
    /* Kaldırma butonunun konumunu düzelt */
    .item-cell.action-column {
        position: absolute;
        top: 20px;
        right: 15px;
        width: auto;
        height: auto;
        justify-content: flex-end;
    }
    
    /* Miktar butonlarını düzenle */
    .quantity-btn {
        width: 26px;
        height: 26px;
        border-radius: 50%;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        font-weight: 700;
    }
    
    .quantity-btn.minus {
        background: #ffffff;
        color: var(--premium-text);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .quantity-btn.plus {
        background: var(--premium-primary);
        color: #ffffff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    }
    
    /* Miktar input'unu düzenle */
    .quantity-input {
        width: 30px;
        font-size: 15px;
        font-weight: 700;
        border: none;
        background: transparent;
        text-align: center;
        display: block;
        padding: 0;
        margin: 0;
    }
    
    /* Etiket konumlandırmasını düzelt */
    .item-cell.quantity-column::before {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* Fiyat gösterimini düzelt */
    .price-display {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        margin: 5px 0;
        width: 100%;
        justify-content: flex-start;
    }
    
    /* Eski fiyat gösterimini düzelt */
    .old-price {
        text-decoration: line-through;
        font-size: 14px;
    }
}

/* Küçük mobil ekranlar (≤ 576px) için ayarlamalar */
@media (max-width: 576px) {
    /* Miktar kontrollerinin konumunu ayarla */
    .quantity-control {
        right: 184px;
        width: 105px;
        height: 34px;
    }
    
    .quantity-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .quantity-input {
        width: 28px;
        font-size: 14px;
    }
    
    /* Etiketler için daha küçük marj */
    .item-cell.price-column::before,
    .item-cell.quantity-column::before,
    .item-cell.total-column::before {
        width: 70px;
        min-width: 70px;
        font-size: 13px;
    }
}

/* Çok küçük ekranlar için ek ayarlamalar */
@media (max-width: 400px) {
    .quantity-control {
        right: 10px;
        top: 75%;
    }
    
    .item-cell.quantity-column {
        min-height: 80px;
    }
} 