/* ========================================================= */
/* ==       MODERN SEPET SAYFASI (TEMİZ BAŞLANGIÇ)        == */
/* ========================================================= */

/* Sayfa Arka Planı ve Genel Düzen */
#checkout-cart {
    background-color: #f8f9fa;
    padding-top: 30px;
    padding-bottom: 30px;
}

#content h1.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #222;
    margin-bottom: 25px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* Ürün Listesi */
.cart-products {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* ÜRÜN KARTI TASARIMI */
.cart-item.card {
    position: relative;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.cart-item.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.cart-item.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    border-radius: 12px;
    padding: 3px;
    background: linear-gradient(45deg, #ff8a00, #e52e71, #2980b9);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.cart-item-image, .cart-item-details, .cart-item-actions {
    position: relative;
    z-index: 1;
}

.cart-item-image img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}
.cart-item-title:hover { color: #e52e71; }
.cart-item-options small { color: #777; font-size: 13px; }

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Miktar Seçici */
.quantity-box {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    overflow: hidden;
}
.quantity-box .qty-btn {
    background-color: transparent; border: none; font-size: 18px;
    font-weight: bold; color: #555; padding: 5px 15px; cursor: pointer;
    transition: background-color 0.2s;
}
.quantity-box .qty-btn:hover { background-color: #f5f5f5; color: #000; }
.quantity-box .input-qty {
    width: 40px; text-align: center; border: none; font-size: 15px;
    font-weight: 600; background: transparent; box-shadow: none;
    padding: 5px 0;
}
.quantity-box .input-qty:focus { outline: none; box-shadow: none; }

/* Fiyat Gösterimi */
.price-block {
    display: flex; flex-direction: column;
    align-items: flex-end; width: 110px;
}
.total-price { font-size: 17px; font-weight: 700; color: #333; }
.original-price {
    font-size: 14px; font-weight: 500; color: #999;
    text-decoration: line-through; line-height: 1;
}
.special-price {
    font-size: 18px; font-weight: 700;
    color: #e52e71; line-height: 1.2;
}

/* Sil Butonu */
.btn-remove {
    background: transparent; border: none; color: #aaa; font-size: 20px;
    cursor: pointer; transition: color 0.2s ease;
}
.btn-remove:hover { color: #e52e71; }


/* SEPET ÖZETİ KARTI */
#cart-summary .summary-box-wrapper { position: sticky; top: 20px; }
#cart-summary .summary-box.card {
    background: #ffffff; border: 1px solid #e9ecef;
    border-radius: 12px; padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
#cart-summary .summary-box h3 {
    font-size: 22px; font-weight: 700; margin-top: 0;
    margin-bottom: 20px; text-align: center;
    border-bottom: 1px solid #eee; padding-bottom: 15px;
}
#cart-summary .summary-table { margin-bottom: 20px; }
#cart-summary .summary-table tr td {
    border: none; padding: 8px 0; font-size: 15px;
}
#cart-summary .summary-table tr:last-child td {
    font-size: 18px; font-weight: 700; color: #e52e71;
    padding-top: 15px; border-top: 2px solid #eee;
}
#cart-summary .summary-buttons .btn {
    border-radius: 8px; padding: 12px; font-size: 16px;
    font-weight: 600; text-transform: uppercase;
    transition: all 0.3s ease; border: none;
}
#cart-summary .summary-buttons .btn-primary {
    background-color: #ff8a00;
    box-shadow: 0 4px 10px rgba(255, 138, 0, 0.3);
}
#cart-summary .summary-buttons .btn-primary:hover {
    background-color: #e67e00; transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 138, 0, 0.4);
}
#cart-summary .summary-buttons .btn-default {
    background-color: #e9ecef; color: #555; margin-top: 10px;
}
#cart-summary .summary-buttons .btn-default:hover { background-color: #d8dde2; }


/* ========================================================= */
/* ==         KOMPAKT MOBİL GÖRÜNÜM DÜZELTMESİ          == */
/* ========================================================= */
@media (max-width: 767px) {
  /* Her ürün kartını yatay bir satır yap */
  .cart-item.card {
    flex-direction: row; /* Dikey yerine yatay dizilim */
    align-items: flex-start; /* İçeriği yukarıdan hizala */
    padding: 15px;
    gap: 15px; /* Elementler arası boşluk */
  }

  /* Ürün resmini küçült */
  .cart-item-image {
    flex: 0 0 70px; /* Sabit 70px genişlik */
  }
  .cart-item-image img {
    width: 70px;
    height: 70px;
  }

  /* Ürün adı ve seçenekleri ortadaki boşluğu doldursun */
  .cart-item-details {
    flex: 1 1 auto; /* Otomatik olarak esne */
    padding-top: 5px; /* Hafif üst boşluk */
  }
  .cart-item-title {
    font-size: 15px; /* Yazı tipini biraz küçült */
  }

  /* Miktar, fiyat ve sil butonlarını sağa yaslı ve dikey yap */
  .cart-item-actions {
    flex: 0 0 auto; /* Gerektiği kadar yer kapla */
    flex-direction: column; /* Dikey diz */
    align-items: flex-end; /* Sağa yasla */
    gap: 12px; /* Aralarındaki boşluk */
  }
}

/* ========================================================= */
/* ==     TEMA KAYNAKLI MOBİL KIRILMA DÜZELTMESİ        == */
/* ========================================================= */
@media (max-width: 991.98px) {
  #checkout-cart > .row {
    display: flex;
    flex-wrap: wrap !important; /* En Önemli Kural: Alt satıra geçmeye zorla! */
  }

  #checkout-cart > .row > #content,
  #checkout-cart > .row > #cart-summary {
    flex: 0 0 100% !important; /* Bootstrap'in col-12 kuralını garantile */
    max-width: 100% !important;
  }
}