/**
 * SIHIR HOME — Adaptive Commerce CSS Layer
 * v131BG-AUTONOMOUS Phase 2 (2026-05-08)
 *
 * Body sınıfları (tracker.js tarafından eklenir):
 *   .persona-sicak       — niyet>70, satınalmaya yakın
 *   .persona-gezinen     — çok sayfa, az sepet
 *   .persona-karar_veren — az sayfa, hızlı sepet
 *   .persona-sadik       — eski sipariş geçmişi var
 *   .persona-hayalet     — sepet doldurdu, ödeme yapmadı
 *   .persona-yeni        — ilk ziyaret
 *
 *   .intent-sicak    — skor >= 70
 *   .intent-ilgili   — skor 40-69
 *   .intent-gezinen  — skor 15-39
 *   .intent-soguk    — skor < 15
 *
 * Mantık: SİTE FARKLI GÖRÜNÜR HER PERSONA'YA — kullanıcı fark etmez.
 *         Mikro mutasyonlar (buton renk, padding, ikon, urgency) ile
 *         dönüşüm psikolojisini optimize eder.
 *
 * NOT: Bu base layer. Mikro deney motoru (Phase 4) ile per-user farklı kombinasyonlar denenir.
 */

:root {
    --sihir-cta-color: #ea580c;
    --sihir-urgency: 0;
    --sihir-density: normal;
}

/* ═══ INTENT-BASED MUTATIONS (1. seviye — kullanıcı fark etmez) ═══ */

/* SICAK — satınalmaya çok yakın → urgency vurgulu */
body.intent-sicak {
    --sihir-cta-color: #dc2626;
    --sihir-urgency: 1;
}
body.intent-sicak .button-blue,
body.intent-sicak [class*="add-to-cart"],
body.intent-sicak [class*="sepete-ekle"] {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    box-shadow: 0 4px 14px rgba(220,38,38,.35) !important;
    animation: sihirPulse 2.4s ease-in-out infinite;
}
body.intent-sicak .stock-info,
body.intent-sicak [class*="stok"] {
    color: #dc2626 !important;
    font-weight: 700 !important;
}
@keyframes sihirPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* İLGİLİ — orta seviye → güven sinyalleri öne çıksın */
body.intent-ilgili .trust-signal,
body.intent-ilgili [class*="guven"],
body.intent-ilgili [class*="iade"] {
    opacity: 1 !important;
    font-weight: 600;
}

/* SOĞUK — yeni gelmiş → discovery odaklı, baskı yok */
body.intent-soguk .urgency-badge,
body.intent-soguk [class*="kalan-sure"],
body.intent-soguk [class*="son-stok"] {
    display: none !important;
}

/* ═══ PERSONA-BASED MUTATIONS (2. seviye — psikolojik adaptasyon) ═══ */

/* HIZLI / KARAR_VEREN — minimal arayüz, hızlı sepet */
body.persona-karar_veren .product-description-long,
body.persona-karar_veren .review-section-long {
    display: none;
}
body.persona-karar_veren [class*="add-to-cart"],
body.persona-karar_veren [class*="sepete-ekle"] {
    font-size: 16px !important;
    padding: 14px 24px !important;
    font-weight: 800 !important;
}

/* SADIK — premium görünüm, sade lüks */
body.persona-sadik {
    --sihir-cta-color: #7c3aed;
}
body.persona-sadik .product-card {
    background: linear-gradient(180deg, #fff, #faf5ff) !important;
}
body.persona-sadik .price {
    font-family: Georgia, serif !important;
}
/* Sadık üye için "tekrar hoşgeldin" hissi */
body.persona-sadik::before {
    content: '✨ Sadık üyemiz — özel fiyatlar';
    position: fixed;
    top: 60px; right: 14px;
    background: linear-gradient(135deg,#7c3aed,#5b21b6);
    color: #fff;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    z-index: 9990;
    box-shadow: 0 4px 14px rgba(124,58,237,.35);
    animation: sihirSlideDown .5s ease;
}

/* HAYALET — sepete eklemiş ama satın almamış → güven + indirim ipucu */
body.persona-hayalet [class*="discount"],
body.persona-hayalet [class*="indirim"] {
    transform: scale(1.05);
    font-weight: 700;
}
body.persona-hayalet::before {
    content: '🎁 Sepetin için ekstra ipucumuz var';
    position: fixed;
    top: 60px; left: 14px;
    background: linear-gradient(135deg,#ea580c,#dc2626);
    color: #fff;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    z-index: 9990;
    animation: sihirSlideDown .5s ease;
}

/* GEZİNEN — kategoriler ve filtreler öne çıksın */
body.persona-gezinen [class*="filter"],
body.persona-gezinen [class*="kategori"] {
    border: 2px solid var(--sihir-cta-color) !important;
}

/* YENİ — büyük güven alanları + onboarding */
body.persona-yeni .footer-trust-badges,
body.persona-yeni [class*="kargo-bedava"] {
    transform: scale(1.1);
    font-weight: 700;
}

/* ═══ KEYFRAMES ═══ */
@keyframes sihirSlideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ═══ ADAPTIVE INDICATOR (admin/debug — sadece ?adaptive_debug=1 ile görünür) ═══ */
body[data-adaptive-debug="1"]::after {
    content: 'P:' attr(data-persona) ' · Skor:' attr(data-skor);
    position: fixed;
    bottom: 10px; left: 10px;
    background: rgba(0,0,0,.85);
    color: #22d3ee;
    font-family: monospace;
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 6px;
    z-index: 99999;
    pointer-events: none;
}
