@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f1f5f9;
    --border-color: #cbd5e1;
    --border-hover: #94a3b8;
    --accent: #d97706; /* Warm Amber Gold */
    --accent-hover: #b45309;
    --accent-light: #fffbeb;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.hidden {
    display: none;
}

html {
    max-width: 100vw;
    overflow-x: clip;
}

body {
    max-width: 100vw;
    overflow-x: clip;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 7px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Background Ambient Glow */
.ambient-glow {
    position: fixed;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 850px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, rgba(99, 102, 241, 0.04) 50%, rgba(248, 250, 252, 0) 75%);
    z-index: 0;
    pointer-events: none;
}

/* Glassmorphism Classes (Light Theme) */
.glass-panel {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
}

/* Product Card - High Definition with Colorful Accents */
.glass-card {
    background: #ffffff;
    border: 1.5px solid #cbd5e1; /* Net ve belirgin çerçeve */
    border-radius: 1.5rem;
    box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    border-color: #d97706; /* Canlı Kehribar Vurgusu */
    transform: translateY(-5px);
    box-shadow: 0 20px 35px -8px rgba(217, 119, 6, 0.18), 0 8px 16px -4px rgba(15, 23, 42, 0.08);
}

/* Product Card Image Zoom */
.product-card-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f8fafc;
    border-bottom: 1.5px solid #e2e8f0;
}

.product-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover .product-card-img {
    transform: scale(1.05);
}

/* Marquee (Kayan Yazı) Animasyonları */
@keyframes marqueeScroll {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
}

.marquee-content {
    display: inline-flex;
    width: max-content;
    animation: marqueeScroll 45s linear infinite;
    will-change: transform;
}

.speed-slow {
    animation-duration: 65s !important;
}

.speed-normal {
    animation-duration: 45s !important;
}

.speed-fast {
    animation-duration: 30s !important;
}

/* Buttons */
.btn-primary {
    background: #0f172a;
    color: #ffffff;
    font-weight: 700;
    transition: all 0.2s ease;
    border: 1px solid #0f172a;
    cursor: pointer;
}

.btn-primary:hover {
    background: #1e293b;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
    transform: translateY(-1px);
}

.btn-accent {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
    font-weight: 700;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-accent:hover {
    filter: brightness(1.08);
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
    transform: translateY(-1px);
}

.btn-outline {
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

/* Filter Chip */
.filter-chip {
    padding: 8px 18px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-chip:hover {
    color: var(--text-primary);
    border-color: #94a3b8;
}

.filter-chip.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

/* Modal Transitions & Mobile App-Screen Fixes */
.modal-overlay {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    transition: opacity 0.25s ease;
}

@media (max-width: 640px) {
    /* Mobilde açılan modallar sayfa gibi yüzmesin, sabit ekran olarak dursun */
    body.overflow-hidden {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
        touch-action: none !important;
    }

    #inquiry-modal,
    #product-modal,
    #profile-modal,
    #user-order-detail-modal,
    #order-invoice-modal,
    #contract-modal,
    #auth-modal,
    #order-email-verify-modal {
        padding: 0 !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        overflow: hidden !important;
        overscroll-behavior: none !important;
        touch-action: pan-y !important;
    }

    #inquiry-modal > div,
    #product-modal > div,
    #profile-modal > div,
    #user-order-detail-modal > div,
    #order-invoice-modal > div,
    #contract-modal > div,
    #auth-modal > div,
    #order-email-verify-modal > div {
        max-width: 100% !important;
        width: 100% !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
        display: flex !important;
        flex-direction: column !important;
        overscroll-behavior: contain !important;
    }
}

/* Toast styling */
#toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 99999999 !important;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    pointer-events: none;
    max-width: 420px;
    width: auto;
}

@media (max-width: 640px) {
    #toast-container {
        bottom: 88px;
        left: 16px;
        right: 16px;
        max-width: calc(100% - 32px);
    }
}

.toast {
    pointer-events: auto;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 15px 35px -5px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(0,0,0,0.05);
    animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    z-index: 99999999 !important;
}

.toast-success {
    background: #ffffff;
    border: 1.5px solid #86efac;
    color: #15803d;
}

.toast-error {
    background: #ffffff;
    border: 1.5px solid #fca5a5;
    color: #b91c1c;
}

.toast-info {
    background: #ffffff;
    border: 1.5px solid #93c5fd;
    color: #1d4ed8;
}

.toast-warning {
    background: #ffffff;
    border: 1.5px solid #fcd34d;
    color: #b45309;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Side Drawer (Sol Açılan Menü) */
#side-drawer {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
#side-drawer.drawer-open {
    transform: translateX(0) !important;
}

/* Right Cart Drawer (Sağ Açılan Sepet Çekmecesi) */
#cart-modal #cart-modal-backdrop {
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
#cart-modal.drawer-open #cart-modal-backdrop {
    opacity: 1;
}
#cart-modal #cart-modal-panel {
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
#cart-modal.drawer-open #cart-modal-panel {
    transform: translateX(0) !important;
}

/* Live Chat Widget Animation */
#live-chat-window {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Favorite Button Transition */
.favorite-btn {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.favorite-btn:hover {
    transform: scale(1.12);
}

/* Modern Beyaz Özel Dropdown / Autocomplete Öneri Menüsü */
.tr-custom-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 60;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
    max-height: 240px;
    overflow-y: auto;
    padding: 0.4rem;
    display: none;
    -webkit-overflow-scrolling: touch;
}

.tr-custom-dropdown.open {
    display: block;
    animation: fadeIn 0.15s ease-out;
}

.tr-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    border-radius: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tr-dropdown-item:hover,
.tr-dropdown-item.active {
    background: #fef3c7;
    color: #92400e;
}

.tr-dropdown-item:active {
    background: #fde68a;
    transform: scale(0.99);
}

.tr-dropdown-item .sub-text {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ================= CLEAN A4 PRINT STYLES ================= */
@media print {
    @page {
        size: A4 portrait;
        margin: 12mm 15mm;
    }
    html, body {
        background: #ffffff !important;
        color: #000000 !important;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    body > *:not(#order-invoice-modal) {
        display: none !important;
    }
    #order-invoice-modal {
        position: static !important;
        display: block !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    #order-invoice-modal > div {
        max-width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    #order-invoice-modal button {
        display: none !important;
    }
    #invoice-printable-area {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
}

/* Sticky Top Container (Announcement Bar + Maintenance Banner + Main Header) */
#sticky-top-wrapper {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    background-color: #ffffff;
}

/* Sticky Filter Bar (Pixel-perfect docking under #sticky-top-wrapper) */
#sticky-filter-bar {
    position: -webkit-sticky;
    position: sticky;
    top: 116px;
    z-index: 30;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: #f8fafc !important;
    border-bottom: 2px solid #e2e8f0 !important;
}
@media (max-width: 640px) {
    #sticky-filter-bar {
        top: 116px;
        background-color: #f8fafc !important;
    }
}

/* Custom scrollbar for product modal and tab lists */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.7);
}

