/**
 * Takım (Bundle) Modülü - Frontend CSS
 * Ürün detay sayfasında takım listesi ve fiyat kutusu stilleri.
 */

/* ===== ANA KONTEYNER ===== */
.takim-frontend-container {
    margin: 25px 0;
    padding: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
}

/* ===== BAŞLIK ===== */
.takim-baslik {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.takim-aciklama {
    margin-bottom: 18px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

/* ===== ÜRÜN LİSTESİ ===== */
.takim-urun-listesi {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

/* ===== ALT ÜRÜN KARTI (yatay) ===== */
.takim-alt-urun {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.takim-alt-urun:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ===== RESİM ===== */
.takim-alt-resim {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 4px;
    background: #f3f4f6;
}

.takim-alt-resim img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== BİLGİ (isim + fiyat) ===== */
.takim-alt-bilgi {
    flex: 1;
    min-width: 0;
}

.takim-alt-isim {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 4px;
    line-height: 1.3;
    /* Uzun isimleri 2 satırda kes */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.takim-alt-fiyat {
    font-size: 13px;
    color: #059669;
    font-weight: 600;
}

/* ===== ADET KONTROLÜ (+/-) ===== */
.takim-alt-adet {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.takim-adet-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: #f3f4f6;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.takim-adet-btn:hover {
    background: #e5e7eb;
}

.takim-adet-btn:active {
    background: #d1d5db;
}

.takim-adet-input {
    width: 44px;
    height: 34px;
    border: none;
    border-left: 1px solid #d1d5db;
    border-right: 1px solid #d1d5db;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    background: #fff;
    /* Tarayıcı oklarını gizle */
    -moz-appearance: textfield;
    appearance: textfield;
}

.takim-adet-input::-webkit-outer-spin-button,
.takim-adet-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.takim-adet-input:focus {
    outline: none;
    background: #f9fafb;
}

/* ===== TOPLAM FİYAT KUTUSU ===== */
.takim-ozet {
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    border-left: 3px solid #059669;
}

.takim-ozet-satir {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.takim-ozet-label {
    font-size: 14px;
    color: #4b5563;
    font-weight: 500;
}

.takim-ozet-fiyat {
    font-size: 18px;
    font-weight: 700;
    color: #059669;
}

/* ===== MOBİL UYUMU ===== */
@media (max-width: 600px) {
    .takim-frontend-container {
        padding: 14px;
    }

    .takim-alt-urun {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px;
    }

    .takim-alt-resim {
        width: 60px;
        height: 60px;
    }

    .takim-alt-bilgi {
        flex: 1 1 calc(100% - 80px);
    }

    .takim-alt-adet {
        flex: 1 1 100%;
        justify-content: center;
        margin-top: 6px;
    }

    .takim-ozet-satir {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .takim-ozet-fiyat {
        font-size: 20px;
    }
}

/* ===== SEPET — TAKIM ALT ÜRÜN GÖRÜNÜMÜ ===== */
/* Alt ürün satırlarında silme butonunu gizle.
   (Adet kontrolü zaten relUrunID nedeniyle PHP tarafında kilitli geliyor.)
   Müşteri ana ürünü silerse mevcut sistem alt ürünleri otomatik siler. */
.basket-item.takim-alt-urun-row .sepet-satir-sil {
    display: none !important;
}

/* Görsel ipucu: alt ürünlerin solunda küçük bir çizgi gösterelim,
   "bu satır bir takıma ait" hissi versin */
.basket-item.takim-alt-urun-row {
    border-left: 3px solid #059669;
    padding-left: 10px;
    background: #f9fafb;
}
