/* ==========================================================================
   BASE.CSS — Reset, :root değişkenler, tipografi, genel layout
   Tüm sayfalarda yüklenir.
   ========================================================================== */

/* --- Google Fonts (Tüm site geneli) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Raleway:wght@400;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Montserrat:wght@700;800&display=swap');

/* --- Reset & Box Model --- */
html {
    scroll-behavior: smooth;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #222222;
    overflow-x: hidden;
    width: 100%;
    min-width: 0;
    /* Footer'ı sayfa altına yapıştır */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

img, svg {
    max-width: 100%;
    height: auto;
}

/* --- :root CSS Değişkenleri (Tüm site geneli) --- */
:root {
    /* === MARKA RENKLERİ === */
    --color-primary: #0b3d7a;
    --color-primary-dark: #072a56;
    --color-primary-light: #1e3a8a;
    --color-accent: #0ea5e9;
    --color-accent-dark: #0284c7;
    --color-accent-light: #3a7bd5;

    /* === YÜZEY RENKLERİ === */
    --color-bg: #f8fafc;
    --color-bg-alt: #f1f5f9;
    --color-surface: #ffffff;

    /* === METİN RENKLERİ === */
    --color-text: #1e293b;
    --color-text-secondary: #64748b;
    --color-text-muted: #94a3b8;

    /* === KENAR/ÇERÇEVİ === */
    --color-border: #e2e8f0;
    --color-border-light: #f1f5f9;

    /* === DURUM RENKLERİ === */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;

    /* === GÖLGELER === */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);

    /* === RADIUS === */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* === GEÇİŞ === */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --bezier: cubic-bezier(0.16, 1, 0.3, 1);

    /* === FONT === */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-display: 'Montserrat', sans-serif;

    /* === CONTAINER === */
    --container-width: 1400px;

    /* === ADMIN SIDEBAR === */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;

    /* === GERİYE UYUMLULUK (eski isimler → yeni değerlere map) === */
    --primary-color: var(--color-primary);
    --primary: var(--color-primary-light);
    --primary-dark: var(--color-primary-dark);
    --accent: var(--color-info);
    --accent-light: var(--color-accent-light);
    --bg-body: var(--color-bg);
    --bg-base: var(--color-bg-alt);
    --bg-white: var(--color-surface);
    --bg-light: var(--color-bg-alt);
    --bg: var(--color-bg);
    --text-dark: var(--color-text);
    --text-main: var(--color-text);
    --text-sub: var(--color-text-secondary);
    --text-muted: var(--color-text-muted);
    --text-gray: var(--color-text-secondary);
    --text: var(--color-text);
    --success: var(--color-success);
    --warning: var(--color-warning);
    --danger: var(--color-danger);
    --warn: var(--color-warning);
    --border-color: var(--color-border);
    --border: var(--color-border);
    --border-light: var(--color-border-light);
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    --font-family: var(--font-primary);
    --transition-speed: var(--transition-normal);
    --brand: var(--color-primary-light);
    --brand-dark: var(--color-primary-dark);
    --brand-blue: var(--color-accent);
    --brand-blue-dark: var(--color-primary);
    --smooth-curve: var(--bezier);

    /* === HEADER === */
    --hdr-bg: rgba(255, 255, 255, 0.92);
    --hdr-border: rgba(226, 232, 240, 0.8);
    --hdr-text: var(--color-text-secondary);
    --hdr-text-hover: var(--color-primary);
    --hdr-blue: var(--color-accent);
    --hdr-shadow: 0 4px 30px rgba(0, 0, 0, 0.04);

    /* === ESKİ (sadece admin.css uyumu) === */
    --primary-light: #EEF2FF;
    --glass-border: rgba(255, 255, 255, 0.2);
    --ease-elastic: cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- Genel Layout --- */
.main-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

main {
    padding-top: 150px;
}

#hizmetler, #referanslar, #cozum-ortaklari, #istatistikler {
    scroll-margin-top: 150px;
}

/* Container taşma güvenliği */
.main-container,
.container,
section,
main,
article,
aside {
    max-width: 100%;
    overflow-x: hidden;
}

/* Site Geneli Hizalama Standardı */
:not(.admin-body) .container,
:not(.admin-body) .main-container {
    max-width: 1400px !important;
    width: 100% !important;
    padding-left: 25px !important;
    padding-right: 25px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

/* --- Genel Butonlar --- */
.btn-primary, .btn-secondary {
    display: inline-block; padding: 12px 25px; margin: 10px; text-decoration: none; border-radius: 30px; font-weight: 600;
}
.btn-primary { background: #0b3d7a; color: #fff; }
.btn-secondary { background: #eee; color: #333; }

/* --- Discount Badge (store + product detail) --- */
.discount-badge {
    position: absolute;
    top: 52px;
    left: 16px;
    z-index: 20;
}

.discount-badge span {
    background: #111827;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    letter-spacing: 0.03em;
    box-shadow: 0 6px 12px rgba(17, 24, 39, 0.25);
    display: inline-block;
}

.discount-pill {
    display: inline-block;
    margin-bottom: 8px;
    background: #111827;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    letter-spacing: 0.03em;
}

.bulk-note {
    margin: -10px 0 18px;
    padding: 12px 14px;
    border: 1px dashed #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 0.85rem;
    color: #475569;
}

/* --- Hidden Utility --- */
.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- Toast Bildirimleri --- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-toast {
    min-width: 300px;
    background: #fff;
    border-left: 5px solid #333;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideInRight 0.3s ease-out forwards;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #333;
    opacity: 0;
}
.custom-toast.hide { animation: slideOutRight 0.3s ease-in forwards; }
.custom-toast.success { border-color: #2ecc71; }
.custom-toast.success i { color: #2ecc71; margin-right: 10px; font-size: 18px; }
.custom-toast.error { border-color: #e74c3c; }
.custom-toast.error i { color: #e74c3c; margin-right: 10px; font-size: 18px; }
.custom-toast.info { border-color: #3498db; }
.custom-toast.info i { color: #3498db; margin-right: 10px; font-size: 18px; }

@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOutRight { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* --- WhatsApp Butonu --- */
.whatsapp-float { position: fixed; width: 60px; height: 60px; bottom: 30px; right: 30px; background-color: #25d366; color: #FFF; border-radius: 50px; text-align: center; font-size: 30px; box-shadow: 2px 2px 10px rgba(0,0,0,0.2); z-index: 9999; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: transform 0.3s ease, box-shadow 0.3s ease; animation: pulse 3s infinite; overflow: visible !important; }
.whatsapp-float:hover { transform: scale(1.1); background-color: #20ba5a; }
.my-float { margin-top: 2px; }
.wa-message-bubble { position: absolute; bottom: 75px; right: 0; background-color: #ffffff; color: #333; padding: 12px 20px; border-radius: 10px 10px 0 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.15); white-space: nowrap; font-size: 0.9rem; font-weight: 600; font-family: 'Inter', sans-serif; opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55); pointer-events: none; border: 1px solid #f0f0f0; }
.wa-message-bubble::after { content: ''; position: absolute; right: 20px; bottom: -8px; border-top: 8px solid #ffffff; border-bottom: 8px solid transparent; border-left: 8px solid transparent; border-right: 8px solid transparent; }
.wa-message-bubble.show-anim { opacity: 1; visibility: visible; transform: translateY(0); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }

/* --- AI Bildirim Chip --- */
.ai-notif-chip {
    position: fixed; bottom: 30px; left: 50%;
    transform: translateX(-50%) translateY(150%);
    width: auto; min-width: 280px; max-width: 90%;
    z-index: 999999; cursor: pointer;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ai-notif-chip.show { transform: translateX(-50%) translateY(0); }
.ai-notif-chip.dismissed { display: none !important; }

.chip-content {
    background: rgba(5, 27, 54, 0.95); backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 50px;
    padding: 8px 15px 8px 8px; display: flex; align-items: center; gap: 12px;
    position: relative; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.chip-glow {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 50px; box-shadow: 0 0 20px rgba(0, 210, 255, 0.0);
    animation: neonBreath 3s infinite; pointer-events: none;
}
@keyframes neonBreath { 0% { box-shadow: 0 0 0 rgba(0, 210, 255, 0); } 50% { box-shadow: 0 0 20px rgba(0, 210, 255, 0.3); } 100% { box-shadow: 0 0 0 rgba(0, 210, 255, 0); } }

.chip-avatar { width: 40px; height: 40px; position: relative; flex-shrink: 0; background: #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; }
.chip-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.2); }
.chip-status { position: absolute; bottom: 0; right: 0; width: 10px; height: 10px; background: #2ecc71; border: 2px solid #051b36; border-radius: 50%; box-shadow: 0 0 5px #2ecc71; }
.chip-text { display: flex; flex-direction: column; justify-content: center; }
.chip-title { font-size: 0.85rem; font-weight: 700; color: #fff; letter-spacing: 0.3px; line-height: 1.2; }
.chip-subtitle { font-size: 0.7rem; color: #00d2ff; font-weight: 500; line-height: 1.2; }
.chip-close { background: rgba(255,255,255,0.1); border: none; color: #fff; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer; margin-left: auto; transition: 0.2s; font-size: 0.8rem; }
.chip-close:hover { background: rgba(255,255,255,0.3); transform: scale(1.1); }
.ai-notif-chip:hover .chip-content { border-color: rgba(0, 210, 255, 0.5); transform: scale(1.02); }

/* --- Sepet Drawer --- */
.cart-overlay {
    position: fixed; top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.6); z-index: 10001;
    display: none; opacity: 0; transition: opacity 0.3s;
    backdrop-filter: blur(2px);
}
.cart-overlay.active { display: block; opacity: 1; }

#cart-drawer {
    display: flex; flex-direction: column; height: 100vh; max-width: 400px; width: 100%;
    position: fixed; top: 0; right: -100%; background: #fff; z-index: 10002;
    transition: right 0.3s ease; box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}
#cart-drawer.active { right: 0; }

.cart-drawer {
    position: fixed; top:0; right:0; width: 400px; max-width: 85%; height: 100%;
    background: white; z-index: 10002;
    box-shadow: -10px 0 30px rgba(0,0,0,0.2);
    transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex; flex-direction: column;
}
.cart-drawer.active { transform: translateX(0); }

.drawer-header {
    flex-shrink: 0; padding: 20px; border-bottom: 1px solid #eee;
    display: flex; justify-content: space-between; align-items: center; background: #fff;
}
.drawer-header h3 { margin: 0; font-size: 1.2rem; font-weight: 700; color: #0b3d7a; }
.close-drawer-btn { font-size: 1.5rem; background: none; border: none; cursor: pointer; color: #666; }

.drawer-items { flex-grow: 1; overflow-y: auto; padding: 20px; background: #fff; }
.drawer-item { display: flex; gap: 15px; margin-bottom: 20px; border-bottom: 1px solid #f0f0f0; padding-bottom: 15px; }
.drawer-item img { width: 70px; height: 70px; object-fit: contain; border: 1px solid #eee; border-radius: 8px; }
.drawer-item-info { flex: 1; }
.drawer-item-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 5px; color: #333; }
.drawer-item-meta { font-size: 0.85rem; color: #666; }
.drawer-item-price { font-weight: 800; color: #0b3d7a; margin-top: 5px; }

.drawer-footer { flex-shrink: 0; padding: 20px; border-top: 1px solid #eee; background: #fff; box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05); }
.drawer-total { display: flex; justify-content: space-between; font-size: 1.2rem; margin-bottom: 20px; }
.drawer-total strong { color: #0b3d7a; }
.btn-checkout {
    display: block; width: 100%; background: #0b3d7a; color: white;
    text-align: center; padding: 15px; border-radius: 8px;
    text-decoration: none; font-weight: bold; transition: 0.3s;
}
.btn-checkout:hover { background: #021a38; box-shadow: 0 5px 15px rgba(11, 61, 122, 0.3); }

/* Drawer scrollbar */
.drawer-items::-webkit-scrollbar { width: 6px; }
.drawer-items::-webkit-scrollbar-track { background: #f1f1f1; }
.drawer-items::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* --- Mobil Menü Açıkken Scroll Yasaklama --- */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* --- Renk Düzeltmeleri (Tailwind Override) --- */
.text-orange-600 { color: #0b3d7a !important; }
.bg-orange-600 { background-color: #0b3d7a !important; }
.hover\:bg-orange-700:hover { background-color: #021a38 !important; }
.border-orange-500 { border-color: #0b3d7a !important; }
.product-price { color: #222 !important; }
.section-title { color: #1a1a1a !important; }
