/* cart.html - Cart Page */

/* Premium Background */
body {
    background-image: url('../../assets/backgrounds/premium-bg.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

.cart-page {
    margin: 30px 0;
}

.cart-page h1 {
    margin-bottom: 24px;
}

/* Cart Table */
.cart-table {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.cart-table th {
    text-align: left;
    padding: 14px 16px;
    background: var(--card);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

.cart-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.cart-table tr:last-child td {
    border-bottom: none;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-title {
    font-weight: 600;
}

.cart-item-cat {
    font-size: 0.8rem;
    color: var(--muted);
}

/* Cart Summary */
.cart-summary {
    margin-top: 24px;
    padding: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: right;
}

.cart-summary .total-label {
    font-size: 1.1rem;
    margin-right: 16px;
}

.cart-summary .total-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.cart-summary .btn {
    margin-top: 16px;
    width: 100%;
    max-width: 300px;
}

/* Empty Cart */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.cart-empty h2 {
    margin-bottom: 16px;
}

/* =====================================================
   TRENDYOL MOBİL SEPET KARTI STİLLERİ
   Sadece 520px altı mobil için geçerli
===================================================== */

/* Silme Onay Popup */
.cart-delete-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.cart-delete-popup {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    max-width: 300px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.cart-delete-popup p:first-child {
    font-weight: 600;
    font-size: 16px;
    margin: 0;
}

.cart-delete-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.cart-delete-buttons .btn {
    flex: 1;
    padding: 12px 20px;
}

/* Mobil Sepet Kart Stilleri */
@media (max-width: 520px) {

    /* Tablo header'ını gizle */
    .table thead {
        display: none;
    }

    .table {
        border: none;
        background: transparent;
    }

    .mobile-cart-row td {
        padding: 0;
        border: none;
    }

    .mobile-cart-card {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 12px;
        margin-bottom: 10px;
        position: relative;
    }

    /* Checkbox */
    .mobile-cart-checkbox {
        display: flex;
        align-items: center;
        padding-top: 20px;
    }

    .mobile-cart-checkbox input[type="checkbox"] {
        width: 20px;
        height: 20px;
        accent-color: var(--accent);
        cursor: pointer;
    }

    /* Ürün Görseli */
    .mobile-cart-img {
        flex-shrink: 0;
    }

    .mobile-cart-img img {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border-radius: 8px;
        border: 1px solid var(--border);
    }

    /* Bilgi Alanı */
    .mobile-cart-info {
        flex: 1;
        min-width: 0;
        position: relative;
    }

    /* Çöp İkonu */
    .mobile-cart-delete {
        position: absolute;
        top: 0;
        right: 0;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: var(--muted);
        border-radius: 50%;
        transition: background 0.2s;
    }

    .mobile-cart-delete:active {
        background: rgba(0, 0, 0, 0.05);
    }

    /* Başlık */
    .mobile-cart-title {
        font-weight: 600;
        font-size: 14px;
        line-height: 1.3;
        margin-right: 36px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Kargo Bilgisi */
    .mobile-cart-shipping {
        font-size: 12px;
        color: #22c55e;
        margin-top: 4px;
    }

    /* Alt Kısım - Adet + Fiyat */
    .mobile-cart-bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 12px;
    }

    /* Adet Kontrolü */
    .mobile-cart-qty {
        display: flex;
        align-items: center;
        gap: 0;
        border: 1px solid var(--border);
        border-radius: 8px;
        overflow: hidden;
    }

    .mobile-qty-btn {
        width: 32px;
        height: 32px;
        border: none;
        background: transparent;
        font-size: 18px;
        font-weight: 500;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--accent);
    }

    .mobile-qty-btn:active {
        background: rgba(0, 0, 0, 0.05);
    }

    .mobile-qty-num {
        min-width: 28px;
        text-align: center;
        font-weight: 600;
        font-size: 14px;
    }

    /* Fiyat */
    .mobile-cart-price {
        font-weight: 700;
        font-size: 16px;
        color: var(--accent);
    }

    /* Alt bar optimizasyonu */
    .row {
        flex-direction: column;
        gap: 12px;
    }

    .row .row {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
    }

    /* Mobil: -1+ butonları %20 küçük */
    .mobile-qty-btn {
        width: 26px;
        height: 26px;
        font-size: 15px;
    }

    .mobile-qty-num {
        min-width: 22px;
        font-size: 12px;
    }

    /* Mobil: Fiyat/Sepetim alanını sola yaklaştır */
    .mobile-cart-bottom {
        gap: 8px;
    }

    .mobile-cart-price {
        font-size: 14px;
        margin-left: 0;
    }
}

/* =====================================================
   GÜVEN ROZETLERİ - PC Yatay / Mobil Dikey
===================================================== */
.cart-trust-badges {
    text-align: center;
    padding: 16px 12px 8px;
    font-size: 14px;
    color: var(--text, #333);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.cart-trust-badges span {
    white-space: nowrap;
}

/* Mobil: Dikey yerleşim */
@media (max-width: 520px) {
    .cart-trust-badges {
        flex-direction: column;
        gap: 6px;
        font-size: 13px;
        padding: 12px 8px 6px;
    }
}