/**
 * B2B Portal — Navbar + Floating Buttons CSS (extracted from _navbar.html)
 *
 * Tüm sayfalar tarafından _navbar.html üzerinden yüklenir.
 * Browser cache: ilk sayfada indirilince diğer sayfalarda cached.
 */

/* ================ NAVBAR — EDITORIAL GLASS ================ */
.ed-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1040;
    height: 68px;
    background:
        radial-gradient(800px 300px at 80% 50%, rgba(242, 122, 26, 0.18) 0%, transparent 60%),
        linear-gradient(180deg, rgba(10, 17, 36, 0.95) 0%, rgba(17, 26, 54, 0.92) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: height .25s ease, background .25s ease, box-shadow .25s ease;
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
}
.ed-nav::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #d61c1c 30%, #f27a1a 50%, #d61c1c 70%, transparent 100%);
    opacity: 0.8;
}
.ed-nav.scrolled {
    height: 60px;
    background: linear-gradient(180deg, rgba(10, 17, 36, 0.98) 0%, rgba(15, 23, 50, 0.98) 100%);
    box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.5);
}

.ed-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 18px;
}
@media (max-width: 992px) {
    .ed-nav-inner { padding: 0 16px; gap: 12px; }
}

/* Brand */
.ed-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}
.ed-brand img {
    height: 38px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}
.ed-brand .wordmark {
    display: flex;
    flex-direction: column;
    line-height: 1;
    gap: 3px;
}
.ed-brand .wordmark .name {
    font-family: 'Bricolage Grotesque', serif;
    font-weight: 800;
    font-size: 0.98rem;
    color: #fff;
    letter-spacing: -0.01em;
}
.ed-brand .wordmark .tag {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.78);
    letter-spacing: 1.6px;
    text-transform: uppercase;
    font-weight: 600;
}
@media (max-width: 480px) {
    .ed-brand .wordmark { display: none; }
}

/* Primary nav links */
.ed-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: auto;
    margin-left: 18px;
}
.ed-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1px;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    border-radius: 8px;
    transition: color .18s ease, background .18s ease;
}
.ed-link::after {
    content: '';
    position: absolute;
    left: 14px; right: 14px; bottom: 4px;
    height: 2px;
    background: var(--cart-orange, #f27a1a);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
.ed-link:hover, .ed-link:focus-visible { color: #fff; }
.ed-link:hover::after,
.ed-link:focus-visible::after,
.ed-link.active::after { transform: scaleX(1); }
.ed-link.active { color: #fff; }
/* Touch (mobil): :hover olmadigi icin :active ile geri bildirim */
@media (hover: none) {
    .ed-link:active { color: #fff; }
    .ed-link:active::after { transform: scaleX(1); }
}

/* Flame variant — kampanyalar */
.ed-link.flame {
    color: #fff;
    background: linear-gradient(135deg, rgba(214, 28, 28, 0.18) 0%, rgba(255, 77, 58, 0.12) 100%);
    border: 1px solid rgba(255, 77, 58, 0.3);
}
.ed-link.flame::after { background: #ff4d3a; }
.ed-link.flame .pulse {
    width: 6px; height: 6px;
    background: #ff4d3a;
    border-radius: 50%;
    margin-right: 2px;
    box-shadow: 0 0 0 0 rgba(255, 77, 58, 0.6);
    animation: edPulse 1.6s ease-out infinite;
}
.ed-link.flame i { color: #ff7a5e; }
.ed-link.flame:hover {
    background: linear-gradient(135deg, rgba(214, 28, 28, 0.28) 0%, rgba(255, 77, 58, 0.18) 100%);
    border-color: rgba(255, 77, 58, 0.5);
}
@keyframes edPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(255, 77, 58, 0.55); }
    50%     { box-shadow: 0 0 0 6px rgba(255, 77, 58, 0); }
}

/* Right cluster */
.ed-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Glass icon button (sepet, sipariş, ara) */
.ed-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.ed-icon-btn i { font-size: 1.05rem; }
.ed-icon-btn:hover, .ed-icon-btn:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(242, 122, 26, 0.4);
    color: #fff;
    transform: translateY(-1px);
    outline: none;
}
@media (hover: none) {
    .ed-icon-btn:active {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(242, 122, 26, 0.4);
    }
}
.ed-icon-btn.active {
    background: rgba(242, 122, 26, 0.18);
    border-color: rgba(242, 122, 26, 0.5);
    color: #fff;
}
.ed-icon-btn .lbl { display: inline; }
@media (max-width: 1100px) {
    .ed-icon-btn .lbl { display: none; }
}

/* Sepet badge (badge'i butonun üstüne yerleştir) */
.ed-cart-badge {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 20px; height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f27a1a 0%, #d86815 100%);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    font-family: 'Bricolage Grotesque', serif;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(242, 122, 26, 0.5);
    border: 2px solid var(--navy-900, #0a1124);
}

/* User chip */
.ed-user {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px 5px 5px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease;
}
.ed-user:hover {
    background: rgba(242, 122, 26, 0.15);
    border-color: rgba(242, 122, 26, 0.45);
    color: #fff;
}
.ed-user .avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f27a1a 0%, #d86815 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bricolage Grotesque', serif;
    font-weight: 800;
    font-size: 0.85rem;
    color: #fff;
    text-transform: uppercase;
}
.ed-user .name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Manrope', sans-serif;
}
.ed-user .caret {
    font-size: 0.7rem;
    opacity: 0.85;
    transition: transform .2s ease;
}
.ed-user[aria-expanded="true"] .caret { transform: rotate(180deg); }

/* Dropdown panel — dark glass */
.ed-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    background: linear-gradient(180deg, rgba(17, 26, 54, 0.98) 0%, rgba(10, 17, 36, 0.98) 100%);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 24px 50px -22px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility 0s .18s;
    z-index: 1050;
}
.ed-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity .18s ease, transform .18s ease, visibility 0s 0s;
}
.ed-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: background .15s ease, color .15s ease;
}
.ed-dropdown a:hover {
    background: rgba(242, 122, 26, 0.15);
    color: #fff;
}
.ed-dropdown a i {
    width: 18px; text-align: center;
    color: var(--cart-orange, #f27a1a);
    font-size: 0.95rem;
}
.ed-dropdown a.danger { color: #ff7a7a; }
.ed-dropdown a.danger:hover { background: rgba(255, 77, 77, 0.12); color: #ff9090; }
.ed-dropdown a.danger i { color: #ff7a7a; }
.ed-dropdown hr {
    margin: 6px 4px;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ed-dd-wrap { position: relative; }

/* Auth buttons (giriş yap / kayıt ol) */
.ed-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all .18s ease;
    border: 1px solid transparent;
}
.ed-auth-btn.ghost {
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.18);
}
.ed-auth-btn.ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.ed-auth-btn.solid {
    background: linear-gradient(135deg, var(--cart-orange, #f27a1a) 0%, #d86815 100%);
    color: #fff;
    box-shadow: 0 8px 18px -8px rgba(242, 122, 26, 0.55);
}
.ed-auth-btn.solid:hover {
    transform: translateY(-1px);
    color: #fff;
    box-shadow: 0 12px 24px -10px rgba(242, 122, 26, 0.7);
}

/* Mobile hamburger */
.ed-burger {
    display: none;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.3rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.ed-burger:hover { background: rgba(242, 122, 26, 0.15); border-color: rgba(242, 122, 26, 0.4); }

/* Mobile slide-down panel */
.ed-mobile-panel {
    position: fixed;
    top: 68px; left: 0; right: 0;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(10, 17, 36, 0.99) 0%, rgba(15, 23, 50, 0.99) 100%);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 18px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform .25s ease, opacity .2s ease, visibility 0s .25s;
    z-index: 1039;
}
.ed-mobile-panel.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform .25s ease, opacity .2s ease, visibility 0s 0s;
}
.ed-mobile-panel .ed-link {
    display: flex;
    padding: 14px 16px;
    margin-bottom: 4px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}
.ed-mobile-panel .ed-link::after { display: none; }
.ed-mobile-panel .ed-link:hover,
.ed-mobile-panel .ed-link.active {
    background: rgba(242, 122, 26, 0.15);
}
.ed-mobile-panel .ed-link.flame { background: rgba(214, 28, 28, 0.18); }
.ed-mobile-panel .mobile-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ed-mobile-panel .mobile-user {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    background: rgba(242, 122, 26, 0.1);
    border: 1px solid rgba(242, 122, 26, 0.25);
    border-radius: 12px;
    color: #fff;
    margin-bottom: 12px;
}
.ed-mobile-panel .mobile-user .avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f27a1a 0%, #d86815 100%);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Bricolage Grotesque', serif;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
    text-transform: uppercase;
}
.ed-mobile-panel .mobile-user .info { flex: 1; min-width: 0; }
.ed-mobile-panel .mobile-user .info .lbl {
    font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1.4px;
    color: rgba(255,255,255,0.55); font-weight: 600; margin-bottom: 2px;
}
.ed-mobile-panel .mobile-user .info .name {
    font-family: 'Bricolage Grotesque', serif;
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Responsive switch */
@media (max-width: 992px) {
    .ed-links { display: none; }
    .ed-right .desktop-only { display: none !important; }
    .ed-burger { display: inline-flex; }
}
@media (min-width: 993px) {
    .ed-mobile-panel { display: none !important; }
    .ed-burger { display: none; }
    .ed-right .mobile-only { display: none !important; }
}

/* Body padding compensation */
body { padding-top: 68px !important; }
@media (max-width: 992px) { body { padding-top: 68px !important; } }

/* ================ FLOATING BUTTONS ================ */
.floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #f27a1a 0%, #d86815 100%);
    color: white !important;
    padding: 10px 20px 10px 15px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 2px solid rgba(255, 255, 255, 0.3);
}
.floating-cart.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.floating-cart:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 10px 25px rgba(242, 122, 26, 0.5) !important;
    color: white;
}
.cart-icon-wrapper {
    background-color: rgba(255,255,255,0.25);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}
.cart-amount-wrapper {
    display: flex;
    align-items: center;
}
#floatingCartAmount {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}
@media (max-width: 768px) {
    .floating-cart {
        bottom: 20px;
        right: 15px;
        padding: 8px 15px 8px 10px;
    }
    .cart-icon-wrapper { width: 32px; height: 32px; font-size: 1.1rem; }
    #floatingCartAmount { font-size: 0.95rem; }
}

/* WhatsApp Yüzen Butonu */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: #25D366;
    border-radius: 50%;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: all 0.3s ease;
    border: 3px solid rgba(255,255,255,0.4);
}
.whatsapp-float:hover {
    background-color: #1ebe5d;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5) !important;
}
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        left: 15px;
        width: 50px;
        height: 50px;
    }
    .whatsapp-float svg { width: 24px; height: 24px; }
}

/* Cookie consent bar (genel) */
.cookie-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(10, 17, 36, 0.98);
    color: #fff;
    padding: 14px 20px;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.25);
    backdrop-filter: blur(10px);
}
.cookie-bar .cookie-text {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.92);
    max-width: 800px;
    line-height: 1.5;
}
.cookie-bar .btn-accept {
    background: linear-gradient(135deg, #f27a1a 0%, #d86815 100%);
    color: #fff;
    border: 0;
    padding: 8px 22px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}
.cookie-bar .btn-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -8px rgba(242, 122, 26, 0.6);
}
