/*
 * Electro-style Navigation Override
 * Inspired by premium tech store design (electro.madrasthemes.com)
 * Affects: sf-cp-main-nav-row, dropdown mega menu, category hover
 */

/* =====================================================================
   1. NAV BAR (sf-cp-main-nav-row) — light grey, strong shadow
   ===================================================================== */

.sf-cp-main-nav-row,
body.sf.sf-mobile-dock-on .sf-cp-main-nav-row {
    background: #f1f1f1 !important;
    border-bottom: none !important;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.30) !important;
    padding: 0 !important;
}

/* =====================================================================
   2. NAV CONTAINER
   ===================================================================== */

.sf-cp-main-nav,
body.sf.sf-mobile-dock-on .sf-cp-main-nav {
    align-items: stretch !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    height: 44px;
    overflow: visible !important;
}

/* =====================================================================
   3. NAV LINKS — dark charcoal on yellow, vertical separators
   ===================================================================== */

.sf-cp-main-nav-item > .sf-cp-main-nav-link,
.sf-cp-main-nav > .sf-cp-main-nav-link,
body.sf.sf-mobile-dock-on .sf-cp-main-nav-item > .sf-cp-main-nav-link,
body.sf.sf-mobile-dock-on .sf-cp-main-nav > .sf-cp-main-nav-link {
    align-items: center !important;
    border: 0 !important;
    border-radius: 0 !important;
    border-right: 1px solid rgba(0, 0, 0, 0.12) !important;
    color: #111827 !important;
    display: flex !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica Neue, sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    gap: 5px !important;
    letter-spacing: 0.01em !important;
    min-height: 44px !important;
    padding: 0 15px !important;
    text-decoration: none !important;
    transition: background 0.13s ease !important;
    white-space: nowrap !important;
}

/* First item gets left border too */
.sf-cp-main-nav-item:first-child > .sf-cp-main-nav-link,
.sf-cp-main-nav > .sf-cp-main-nav-link:first-child {
    border-left: 1px solid rgba(0, 0, 0, 0.15) !important;
}

/* Separator rengi griye uygun */
.sf-cp-main-nav-item > .sf-cp-main-nav-link,
.sf-cp-main-nav > .sf-cp-main-nav-link {
    border-right-color: rgba(0, 0, 0, 0.15) !important;
}

/* Hover & open state */
.sf-cp-main-nav-item > .sf-cp-main-nav-link:hover,
.sf-cp-main-nav > .sf-cp-main-nav-link:hover,
.sf-cp-main-nav-item.sf-open > .sf-cp-main-nav-link,
body.sf.sf-mobile-dock-on .sf-cp-main-nav-item > .sf-cp-main-nav-link:hover,
body.sf.sf-mobile-dock-on .sf-cp-main-nav > .sf-cp-main-nav-link:hover {
    background: rgba(0, 0, 0, 0.11) !important;
    color: #111827 !important;
}

/* Chevron dropdown arrow */
.sf-cp-main-nav-link .bi-chevron-down {
    font-size: 9px !important;
    margin-left: 1px !important;
    opacity: 0.55 !important;
    transition: transform 0.15s ease !important;
}
.sf-cp-main-nav-item.sf-open .sf-cp-main-nav-link .bi-chevron-down {
    transform: rotate(180deg) !important;
}

/* Icon inside nav link */
.sf-cp-main-nav-link .sf-page-icon {
    font-size: 14px !important;
    opacity: 0.8;
}

/* =====================================================================
   4. DROPDOWN MEGA MENU
   ===================================================================== */

.sf-cp-main-nav-item {
    position: relative !important;
}

/* Hidden by default — shown via .sf-open class (JS) OR :hover (desktop) */
.sf-cp-main-nav-dropdown,
body.sf.sf-mobile-dock-on .sf-cp-main-nav-dropdown {
    background: #ffffff !important;
    border: 0 !important;
    border-radius: 0 0 8px 8px !important;
    border-top: 3px solid #ffd400 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13) !important;
    display: none !important;
    left: 0 !important;
    min-width: 220px !important;
    padding: 6px 0 !important;
    position: absolute !important;
    top: 100% !important;
    z-index: 1055 !important;
}

/* Show on hover (non-touch) */
@media (hover: hover) {
    .sf-cp-main-nav-item:hover > .sf-cp-main-nav-dropdown {
        display: block !important;
    }
}

/* Show via JS .sf-open class (touch + keyboard) */
.sf-cp-main-nav-item.sf-open > .sf-cp-main-nav-dropdown {
    display: block !important;
}

/* --- Dropdown header label (category title row) --- */
.sf-cp-main-nav-dropdown::before {
    background: #ffd400;
    content: '';
    display: block;
    height: 0;
    /* placeholder — header text is inside anchor elements */
}

/* --- Dropdown items --- */
.sf-cp-main-nav-dropdown a,
body.sf.sf-mobile-dock-on .sf-cp-main-nav-dropdown a {
    align-items: center !important;
    background: transparent !important;
    border-bottom: 1px solid #f3f4f6 !important;
    border-radius: 0 !important;
    color: #374151 !important;
    display: flex !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    gap: 0 !important;
    justify-content: space-between !important;
    padding: 9px 16px 9px 14px !important;
    text-decoration: none !important;
    transition: background 0.1s ease, color 0.1s ease, padding-left 0.12s ease !important;
}

.sf-cp-main-nav-dropdown a:last-child,
body.sf.sf-mobile-dock-on .sf-cp-main-nav-dropdown a:last-child {
    border-bottom: 0 !important;
}

/* Right arrow icon on each item */
.sf-cp-main-nav-dropdown a::after {
    color: #d1d5db;
    content: "\f285"; /* bi-chevron-right */
    font-family: bootstrap-icons;
    font-size: 11px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.12s ease, color 0.12s ease;
}

/* Hover state */
.sf-cp-main-nav-dropdown a:hover,
body.sf.sf-mobile-dock-on .sf-cp-main-nav-dropdown a:hover {
    background: #fffbeb !important;
    border-left: 3px solid #ffd400 !important;
    color: #111827 !important;
    padding-left: 17px !important;
}

.sf-cp-main-nav-dropdown a:hover::after {
    color: #f59e0b;
    opacity: 1;
}

/* =====================================================================
   5. FAST NOTE (delivery info right side of nav bar)
   ===================================================================== */

.sf-cp-fast-note,
body.sf.sf-mobile-dock-on .sf-cp-fast-note {
    align-items: center !important;
    color: #111827 !important;
    display: inline-flex !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    gap: 4px !important;
    letter-spacing: 0.01em !important;
    margin-left: auto !important;
    padding: 0 4px 0 12px !important;
    white-space: nowrap !important;
}

.sf-cp-fast-note strong {
    color: #111827 !important;
    font-weight: 800 !important;
}

.sf-cp-fast-note .bi-chevron-right {
    font-size: 11px !important;
    opacity: 0.7;
}

/* =====================================================================
   6. UTILITY BAR refinements
   ===================================================================== */

.sf-cp-utility,
body.sf.sf-mobile-dock-on .sf-cp-utility {
    background: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.sf-cp-utility-left a,
.sf-cp-utility-right a {
    color: #4b5563 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    transition: color 0.12s ease !important;
}

.sf-cp-utility-left a:hover,
.sf-cp-utility-right a:hover {
    color: #111827 !important;
}

/* Active locale chip → yellow accent */
.sf-cp-locale-chip.active {
    background: #ffd400 !important;
    border-color: #e6b800 !important;
    color: #111827 !important;
}

.sf-cp-locale-chip:not(.active):hover {
    background: #fffbeb !important;
    border-color: #ffd400 !important;
    color: #111827 !important;
}

/* =====================================================================
   7. CATEGORY FLOATING DROPDOWN — Electro mega menu style
   ===================================================================== */

/* Container */
.sf-cat-sub-floating {
    background: #ffffff !important;
    border: 1px solid #e9ecef !important;
    border-radius: 0 0 6px 6px !important;
    border-top: 3px solid #ffd400 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16) !important;
    min-width: 240px !important;
    max-width: 300px !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Header (kategori adı) — JS ile ekleniyor */
.sf-cat-sub-floating-header {
    align-items: center;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    color: #111827;
    display: flex;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 800;
    gap: 15px;
    letter-spacing: 0.02em;
    padding: 11px 16px;
    text-transform: uppercase;
}

.sf-cat-sub-floating-header::before {
    background: #ffd400;
    border-radius: 2px;
    content: '';
    display: block;
    flex-shrink: 0;
    height: 16px;
    width: 4px;
}

/* Köşe ok'u kaldır — Electro style düz panel */
.sf-cat-sub-floating::before {
    display: none !important;
}

/* İç scroll wrapper */
.sf-cat-sub-floating-scroll {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    max-height: min(70vh, 380px) !important;
    overflow: hidden auto !important;
    padding: 4px 0 !important;
}

/* Her kategori item'i */
.sf-cat-sub-floating .sf-cat-sub-item,
.sf-cat-sub-floating-scroll .sf-cat-sub-item {
    align-items: center !important;
    border-bottom: 1px solid #f3f4f6 !important;
    border-radius: 0 !important;
    color: #374151 !important;
    display: flex !important;
    font-family: 'Inter', -apple-system, sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    justify-content: space-between !important;
    padding: 10px 16px !important;
    text-decoration: none !important;
    transition: background 0.1s ease, color 0.1s ease, padding-left 0.12s ease !important;
    white-space: nowrap !important;
}

.sf-cat-sub-floating .sf-cat-sub-item:last-child,
.sf-cat-sub-floating-scroll .sf-cat-sub-item:last-child {
    border-bottom: none !important;
}

/* Sağ ok ikonu */
.sf-cat-sub-floating .sf-cat-sub-item::after,
.sf-cat-sub-floating-scroll .sf-cat-sub-item::after {
    color: #d1d5db;
    content: "\f285"; /* bi-chevron-right */
    font-family: bootstrap-icons;
    font-size: 12px;
    flex-shrink: 0;
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.1s ease, color 0.1s ease;
}

/* Hover */
.sf-cat-sub-floating .sf-cat-sub-item:hover,
.sf-cat-sub-floating .sf-cat-sub-item:focus,
.sf-cat-sub-floating-scroll .sf-cat-sub-item:hover,
.sf-cat-sub-floating-scroll .sf-cat-sub-item:focus {
    background: #fffbeb !important;
    border-left: 3px solid #ffd400 !important;
    color: #111827 !important;
    padding-left: 13px !important;
}

.sf-cat-sub-floating .sf-cat-sub-item:hover::after,
.sf-cat-sub-floating-scroll .sf-cat-sub-item:hover::after {
    color: #f59e0b;
    opacity: 1;
}

/* Aktif item */
.sf-cat-sub-floating .sf-cat-sub-item.active,
.sf-cat-sub-floating-scroll .sf-cat-sub-item.active {
    background: #fef9c3 !important;
    border-left: 3px solid #ffd400 !important;
    color: #92400e !important;
    font-weight: 700 !important;
    padding-left: 13px !important;
}

/* Giriş animasyonu — yukarıdan değil aşağıdan */
@media (prefers-reduced-motion: no-preference) {
    .sf-cat-sub-floating {
        animation: sf-electro-drop-in 0.16s ease-out !important;
    }
}

@keyframes sf-electro-drop-in {
    from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Mobile sub panel da Electro stiliyle */
.sf-cat-mobile-sub-panel {
    background: #ffffff !important;
    border: 1px solid #e9ecef !important;
    border-radius: 6px !important;
    border-top: 3px solid #ffd400 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important;
    margin: 8px 4px 4px !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.sf-cat-mobile-sub-title {
    align-items: center !important;
    background: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef !important;
    color: #111827 !important;
    display: flex !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    gap: 8px !important;
    letter-spacing: 0.02em !important;
    padding: 10px 14px !important;
    text-transform: uppercase !important;
}

.sf-cat-mobile-sub-title::before {
    background: #ffd400;
    border-radius: 2px;
    content: '';
    display: block;
    flex-shrink: 0;
    height: 14px;
    width: 3px;
}

.sf-cat-mobile-sub-scroll .sf-cat-sub-item {
    border-bottom: 1px solid #f3f4f6 !important;
    border-radius: 0 !important;
    color: #374151 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    justify-content: space-between !important;
    padding: 10px 14px !important;
}

.sf-cat-mobile-sub-scroll .sf-cat-sub-item:hover,
.sf-cat-mobile-sub-scroll .sf-cat-sub-item.active {
    background: #fffbeb !important;
    border-left: 3px solid #ffd400 !important;
    color: #111827 !important;
    padding-left: 11px !important;
}

/* =====================================================================
   7b. CATEGORY PILL (oval kategoriler) hover effect — Electro accent
   ===================================================================== */

.sf-side-cat,
.sf-cat-pill-wrap a,
.sf-cat-pill {
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
}

.sf-side-cat:hover,
.sf-side-cat:focus,
.sf-cat-pill-wrap a:hover .sf-cat-pill-circle,
.sf-cat-pill:hover {
    background: #fffbeb !important;
    border-color: #ffd400 !important;
    box-shadow: 0 4px 14px rgba(255, 212, 0, 0.30) !important;
    transform: translateY(-2px) !important;
}

.sf-cat-pill-circle {
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.sf-cat-pill-wrap a:hover .sf-cat-pill-circle {
    border: 2px solid #ffd400 !important;
    box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.18) !important;
}

.sf-cat-pill-title {
    font-weight: 600 !important;
    transition: color 0.12s ease !important;
}

.sf-cat-pill-wrap a:hover .sf-cat-pill-title {
    color: #92400e !important;
}

/* =====================================================================
   8. SIDE MENU category items (sf-side-cat-group hover)
   ===================================================================== */

.sf-side-cat-group {
    border-bottom: 1px solid #f3f4f6 !important;
}

.sf-side-cat-group:last-child {
    border-bottom: 0 !important;
}

.sf-side-cat {
    align-items: center !important;
    border-radius: 8px !important;
    display: flex !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    gap: 8px !important;
    justify-content: space-between !important;
    padding: 9px 12px !important;
    transition: background 0.12s ease, border-color 0.12s ease !important;
}

/* =====================================================================
   9. PROMO TOP BAR
   Admin panelinden seçilen renkler inline style ile geliyor.
   Burada override YAPILMAZ — admin renkleri korunur.
   ===================================================================== */

/* Sadece buton stilini güncelle, renk override yok */
.sf-cp-shop-btn {
    font-weight: 800 !important;
}

/* =====================================================================
   10. RESPONSIVE — hide on mobile (already handled by nova.css)
   ===================================================================== */

@media (max-width: 991.98px) {
    .sf-cp-main-nav-row {
        display: none !important;
    }
}
