/**
 * PDP kampanya birlikte sepet (gl-cb-*) — tek kaynak, tüm Twig temalarında aynı görünüm.
 * Tema-bağımsız: kendi font-family/font-size tabanını kurar; Bootstrap 4/5 utility'lerine
 * bağımlı değildir (form-switch / custom-switch, rounded-4 / rounded, fw-bold / font-weight-bold,
 * btn-primary, bi-* / fa-* ikonları, gap-*, text-end / text-right, me-2 / mr-2). Luxeva gibi
 * html{font-size:62.5%} temellerinde dahi küçülmez çünkü .gl-campaign-bundle kökünde font-size
 * 16px sabitlenir ve iç değerler px/em tabanlıdır.
 *
 * index.php _inject_global_assets ile yüklenir (myt-product-options.css ile aynı kuyruk).
 */

/* ── Kök: tema font-size/font-family izolasyonu ────────────────────────── */
.gl-campaign-bundle {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #212529;
}

.gl-campaign-bundle * { box-sizing: border-box; }

/* ── Tipografi + başlık ─────────────────────────────────────────────────── */
.gl-cb-heading {
    font-size: clamp(18px, 2.5vw, 24px);
    letter-spacing: -0.02em;
    font-weight: 700;
}

/* Bootstrap utility polyfill'leri — scope içinde tema versiyonundan bağımsız çalışsın */
.gl-campaign-bundle .fw-bold,
.gl-campaign-bundle .font-weight-bold { font-weight: 700 !important; }
.gl-campaign-bundle .fw-semibold,
.gl-campaign-bundle .font-weight-semibold { font-weight: 600 !important; }
.gl-campaign-bundle .fw-medium,
.gl-campaign-bundle .font-weight-medium { font-weight: 500 !important; }

.gl-campaign-bundle .text-end,
.gl-campaign-bundle .text-right { text-align: right !important; }

.gl-campaign-bundle .text-decoration-line-through { text-decoration: line-through !important; }
.gl-campaign-bundle .text-decoration-none { text-decoration: none !important; }

/* BS4 btn-block → w-100 eş değeri; scope içinde ikisi de geniş */
.gl-campaign-bundle .w-100,
.gl-campaign-bundle .btn-block { width: 100% !important; }

/* ── Kart ızgarası ─────────────────────────────────────────────────────── */
.gl-cb-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 576px) {
    .gl-cb-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

/* Y (aday) ürün kartı */
.gl-cb-card.gl-cb-y-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.gl-cb-card.gl-cb-y-row:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
}
.gl-cb-y-row.gl-cb-y-row--on {
    border-color: #bfbfbf;
    background-color: #f7f7f7;
}
.gl-cb-y-row--disabled { opacity: 0.85; }

/* X (izlenen) ürün kartı */
.gl-cb-x-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    background: #f0f9f0;
    border: 2px solid #28a745;
    border-radius: 12px;
}

.gl-cb-included-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #28a745;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Görsel kutusu + SVG placeholder (tema ikon kütüphanesine bağımlı değil) */
.gl-cb-card__img {
    width: 88px;
    height: 88px;
    border-radius: 10px;
    overflow: hidden;
    background: #fafafa;
    border: 1px solid #eee;
    flex-shrink: 0;
}
.gl-cb-card__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.gl-cb-card__img-ph {
    width: 100%;
    height: 100%;
    min-height: 88px;
    /* inline SVG image icon — FA / BI bağımsız */
    background: #fafafa url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bdbdbd' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='5' width='18' height='14' rx='2'/><circle cx='8.5' cy='10.5' r='1.5'/><path d='M21 16l-5-5-9 9'/></svg>") center / 28px no-repeat;
}
.gl-cb-card__img-ph i { display: none !important; }

/* Kart başlık + başlık bloğu */
.gl-cb-card__body { min-width: 0; flex: 1 1 auto; }
.gl-cb-card__head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    justify-content: space-between;
}
.gl-cb-card__title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: #212529;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-right: 4px;
}

/* Yüzde badge'i */
.gl-cb-badge-pct {
    display: inline-block;
    background: #dc3545;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    line-height: 1.2;
}

/* Fiyat alanı */
.gl-cb-card__prices { margin-top: 4px; }
.gl-cb-price-old {
    font-size: 12.8px;
    color: #6c757d;
    text-decoration: line-through;
}
.gl-cb-price-new {
    font-size: 16px;
    color: #212529;
    font-weight: 700;
}
.gl-cb-opt-link {
    display: inline-block;
    margin-top: 6px;
    color: #0d6efd;
    font-size: 12.8px;
    text-decoration: none;
}
.gl-cb-opt-link:hover { text-decoration: underline; }

/* Küçük metin — BS4/BS5 .small tema fontunun boyunu kullanmasın */
.gl-campaign-bundle .small { font-size: 12.8px; line-height: 1.45; }
.gl-campaign-bundle .text-muted { color: #6c757d !important; }
.gl-campaign-bundle .text-secondary { color: #6c757d !important; }
.gl-campaign-bundle .text-dark { color: #212529 !important; }
.gl-campaign-bundle .text-success { color: #198754 !important; }

/* ── Özel pill switch — BS4 (.custom-control-input) + BS5 (.form-check-input) birleşik ── */
.gl-cb-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    min-height: 22px;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}
.gl-cb-switch input[type="checkbox"] {
    position: absolute;
    inset: 0;
    width: 42px !important;
    height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.gl-cb-switch input[type="checkbox"]:disabled { cursor: not-allowed; }

/* Rail + knob — CSS ile çizilir; BS4'ün ::before/::after label şekli atlanır */
.gl-cb-switch::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 22px;
    background: #d6d6d6;
    border-radius: 999px;
    transition: background-color 0.2s ease;
    pointer-events: none;
    z-index: 0;
}
.gl-cb-switch::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: left 0.2s ease;
    pointer-events: none;
    z-index: 1;
}
.gl-cb-switch input[type="checkbox"]:checked ~ label,
.gl-cb-switch:has(input[type="checkbox"]:checked)::before { background: #0d6efd; }
.gl-cb-switch:has(input[type="checkbox"]:checked)::after { left: 23px; }
.gl-cb-switch input[type="checkbox"]:focus-visible ~ label,
.gl-cb-switch:has(input[type="checkbox"]:focus-visible)::before {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}
.gl-cb-switch input[type="checkbox"]:disabled ~ *,
.gl-cb-switch:has(input[type="checkbox"]:disabled)::before,
.gl-cb-switch:has(input[type="checkbox"]:disabled)::after { opacity: 0.55; }

/* BS4'ün custom-control-label çentiğini görünmez kıl — bizim rail/knob'umuz var */
.gl-cb-switch .custom-control-label {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}
.gl-cb-switch .custom-control-label::before,
.gl-cb-switch .custom-control-label::after { display: none !important; }

/* ── Sağ aside ─────────────────────────────────────────────────────────── */
.gl-cb-aside {
    padding: 20px 22px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px; /* rounded-4 polyfill */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    height: 100%;
}
@media (min-width: 992px) {
    .gl-cb-aside { position: sticky; top: 16px; }
}

/* Bilgi ikonu — tema FA/BI yoksa da çalışsın */
.gl-cb-aside__info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    color: #6c757d;
    font-size: 12.8px;
    line-height: 1.45;
}
.gl-cb-aside__info::before {
    content: "";
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin-top: 2px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><line x1='12' y1='11' x2='12' y2='16'/><circle cx='12' cy='8' r='0.8' fill='%236c757d' stroke='none'/></svg>") center / contain no-repeat;
}
.gl-cb-aside__info i { display: none !important; }

.gl-cb-aside__totals { margin-bottom: 16px; }
.gl-cb-sum-line { margin-bottom: 12px; }
.gl-cb-sum-line--liste,
.gl-cb-sum-line--kazanc {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.gl-cb-sum-line--total { padding-top: 4px; }

.gl-cb-total-display {
    font-size: 26px;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: #212529;
    line-height: 1.2;
}

/* ── CTA — koyu buton, tema btn-primary'sinden bağımsız ──────────────── */
.gl-campaign-bundle .btn.gl-cb-submit,
.gl-campaign-bundle .gl-cb-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 13px 16px;
    background: #111;
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    text-decoration: none;
}
.gl-campaign-bundle .btn.gl-cb-submit:hover,
.gl-campaign-bundle .gl-cb-submit:hover {
    background: #000;
    color: #fff;
    opacity: 0.92;
}
.gl-campaign-bundle .btn.gl-cb-submit:focus-visible,
.gl-campaign-bundle .gl-cb-submit:focus-visible {
    outline: 3px solid rgba(17, 17, 17, 0.25);
    outline-offset: 2px;
}
.gl-campaign-bundle .btn.gl-cb-submit:disabled,
.gl-campaign-bundle .gl-cb-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Yardımcı spacing polyfill'leri (BS4'ün ezilmiş mt-N/mb-N'ine karşı) ── */
/* Luxeva-skin: .mb-4 agresif "margin-bottom:4rem !important" override'lar koyuyor;
   scope içinde nötralize ediyoruz ki Glamora ile aynı boşluklar çıksın. */
.gl-campaign-bundle .mb-1 { margin-bottom: 4px !important; }
.gl-campaign-bundle .mb-2 { margin-bottom: 8px !important; }
.gl-campaign-bundle .mb-3 { margin-bottom: 16px !important; }
.gl-campaign-bundle .mb-4 { margin-bottom: 24px !important; }
.gl-campaign-bundle .mb-5 { margin-bottom: 32px !important; }
.gl-campaign-bundle .mt-1 { margin-top: 4px !important; }
.gl-campaign-bundle .mt-2 { margin-top: 8px !important; }
.gl-campaign-bundle .mt-3 { margin-top: 16px !important; }
.gl-campaign-bundle .mt-4 { margin-top: 24px !important; }
.gl-campaign-bundle .mt-5 { margin-top: 32px !important; }
.gl-campaign-bundle .pb-3 { padding-bottom: 16px !important; }
.gl-campaign-bundle .pt-1 { padding-top: 4px !important; }
.gl-campaign-bundle .py-3 { padding-top: 16px !important; padding-bottom: 16px !important; }
.gl-campaign-bundle .py-4 { padding-top: 24px !important; padding-bottom: 24px !important; }

/* BS4'te gap-* yok; BS5'te var. Scope içinde ortak tanım. */
.gl-campaign-bundle .gap-0 { gap: 0 !important; }
.gl-campaign-bundle .gap-1 { gap: 4px !important; }
.gl-campaign-bundle .gap-2 { gap: 8px !important; }
.gl-campaign-bundle .gap-3 { gap: 16px !important; }
.gl-campaign-bundle .gap-4 { gap: 24px !important; }

/* BS5 (me-N, ms-N) ↔ BS4 (mr-N, ml-N) — scope içinde ikisi de çalışsın */
.gl-campaign-bundle .me-2,
.gl-campaign-bundle .mr-2 { margin-right: 8px !important; }
.gl-campaign-bundle .ms-2,
.gl-campaign-bundle .ml-2 { margin-left: 8px !important; }

/* ── Debug uyarı kutusu — scope dışındaki alert'a dokunmuyoruz ─────────── */
