/* Hesap.com.tr tarzı 3 katmanlı header */
.frontend-header,
header.frontend-header,
.frontend-header.htr-header,
.frontend-header .topbar,
.frontend-header .htr-topbar,
.frontend-header .header-top,
header.frontend-header div.header-top,
.frontend-header .header-top[style],
.frontend-header .header-nav {
    background: #111318 !important;
    background-image: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.frontend-header.htr-header {
    position: relative;
    z-index: 1100;
    background: #111318 !important;
    border-bottom: 1px solid #23262f !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

.frontend-header.htr-header .header-top::after {
    display: none !important;
}

.htr-inner {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
}

/* ===== ROW 1: utility ===== */
.frontend-header .htr-topbar,
.frontend-header .topbar.htr-topbar {
    display: flex !important;
    background: #0e1015 !important;
    border-bottom: 1px solid #1d2028 !important;
    padding: 0 !important;
    font-size: 12px;
    box-shadow: none !important;
}

.htr-topbar .htr-inner {
    min-height: 38px;
    justify-content: space-between;
    gap: 16px;
}

.htr-top-left,
.htr-top-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.htr-util-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #c8ccd6 !important;
    text-decoration: none !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.htr-util-link i {
    font-size: 12px;
    color: #9aa0ad;
}

.htr-util-link:hover {
    color: #ffffff !important;
}

.htr-special {
    position: relative;
}

.htr-special-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: none;
    border: none;
    color: #d7dbe4;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    font-family: inherit;
}

.htr-special-btn .htr-gem {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    display: inline-block;
    transform: rotate(45deg);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.45);
}

.htr-special-btn i.fa-chevron-down {
    font-size: 9px;
    opacity: 0.7;
}

.htr-special:hover .htr-special-menu,
.htr-special:focus-within .htr-special-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.htr-special-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #171a21;
    border: 1px solid #2a2e38;
    border-radius: 10px;
    padding: 6px;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all 0.18s ease;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.htr-special-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e5e7eb;
    text-decoration: none;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}

.htr-special-menu a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.htr-deals {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #6d28d9 !important;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
}

.htr-deals:hover {
    background: #7c3aed !important;
    color: #fff !important;
}

.htr-theme {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid #2a2e38;
    background: #1a1d25;
    color: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.htr-theme:hover {
    background: #232734;
}

/* ===== ROW 2: brand + search + auth ===== */
.frontend-header.htr-header .header-top {
    padding: 12px 0 !important;
    border-bottom: 1px solid #1d2028 !important;
}

.frontend-header.htr-header .header-content {
    max-width: 1440px;
    padding: 0 20px;
    gap: 18px;
}

.frontend-header.htr-header .logo-section .logo {
    background: none;
    -webkit-text-fill-color: #fff;
    color: #fff;
    font-size: 26px;
    letter-spacing: -0.03em;
}

.frontend-header.htr-header .htr-brand {
    display: flex;
    align-items: baseline;
    gap: 2px;
    line-height: 1;
}

.frontend-header.htr-header .htr-brand-main {
    color: #fff;
    font-size: 26px;
    font-weight: 800;
}

.frontend-header.htr-header .htr-brand-suffix {
    color: #7d89a1;
    font-size: 15px;
    font-weight: 700;
}

.frontend-header.htr-header .header-search-container {
    display: flex !important;
    flex: 1 1 auto;
    max-width: none;
    margin: 0 28px;
}

.frontend-header.htr-header .header-search-box {
    background: #1a1d25 !important;
    border: 1px solid #2a2e38 !important;
    border-radius: 999px !important;
    height: 46px;
    padding: 0 8px 0 16px;
    box-shadow: none !important;
    gap: 10px;
}

.frontend-header.htr-header .header-search-box:hover,
.frontend-header.htr-header .header-search-box:focus-within {
    background: #1f232d !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.frontend-header.htr-header .header-search-input,
.frontend-header.htr-header .header-search-input:focus {
    color: #f3f4f6 !important;
    font-size: 14px;
}

.frontend-header.htr-header .header-search-input::placeholder {
    color: #8b93a7 !important;
}

.frontend-header.htr-header .mobile-menu-toggle,
.frontend-header.htr-header .mobile-account-btn {
    display: none;
}

.frontend-header.htr-header .header-search-btn {
    background: transparent !important;
    color: #9aa3b5 !important;
    width: 36px;
    min-width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
}

.frontend-header.htr-header .header-search-btn:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
}

.frontend-header.htr-header .header-actions {
    gap: 8px;
}

.frontend-header.htr-header .auth-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.htr-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    border: none;
    border-radius: 10px !important;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: none !important;
    transition: filter 0.15s ease, transform 0.15s ease;
    font-family: inherit;
}

.htr-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    color: #fff !important;
    text-decoration: none !important;
}

.htr-btn i {
    font-size: 14px;
}

.htr-btn-pass,
.frontend-header.htr-header .htr-btn-pass {
    background: #2563eb !important;
}

.htr-btn-register,
.frontend-header.htr-header .btn-register.htr-btn-register {
    background: #f97316 !important;
    min-width: 0;
}

.htr-btn-login,
.frontend-header.htr-header .btn-login.htr-btn-login {
    background: #16a34a !important;
    min-width: 0;
}

.htr-btn-add {
    background: #eab308 !important;
    color: #111 !important;
}

.htr-btn-add:hover {
    color: #111 !important;
}

.htr-btn-balance {
    background: #22c55e !important;
}

/* ===== ROW 3: categories ===== */
.frontend-header.htr-header .header-nav {
    display: flex !important;
    padding: 0 !important;
    gap: 0 !important;
    background: #111318 !important;
    border-top: 1px solid #1d2028 !important;
}

.htr-nav-inner {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.htr-cats.nav-item.has-dropdown {
    min-width: auto !important;
    padding: 0 !important;
    background: #2563eb !important;
    border-radius: 10px;
    color: #fff !important;
}

.htr-cats.nav-item.has-dropdown:hover {
    background: #1d4ed8 !important;
}

.htr-cats > a,
.htr-cats-trigger {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    color: #fff !important;
    text-decoration: none !important;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 14px;
}

.htr-cats .dropdown-arrow {
    display: none;
}

.htr-games {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.htr-games::-webkit-scrollbar {
    display: none;
}

.htr-quick {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #eef0f5 !important;
    text-decoration: none !important;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.htr-quick:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff !important;
}

.htr-quick-ico {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #1a1f2a;
    border: 1px solid #2a3140;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.htr-quick-ico img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
    display: block;
}

.htr-quick-ico i {
    font-size: 13px;
    color: var(--htr-ico, #93c5fd);
    text-align: center;
}

.htr-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.htr-nav-actions .htr-btn {
    height: 40px;
    padding: 0 14px;
}

/* Keep existing mega dropdowns working */
.frontend-header.htr-header .htr-cats .dropdown-menu,
.frontend-header.htr-header .nav-item.has-dropdown .dropdown-menu {
    z-index: 9999;
}

.frontend-header.htr-header .user-actions .nav-item {
    color: #e5e7eb;
}

@media (max-width: 1200px) {
    .htr-btn span.hide-narrow,
    .htr-quick span.hide-narrow {
        display: none;
    }

    .frontend-header.htr-header .header-search-container {
        max-width: 420px;
    }
}

@media (max-width: 992px) {
    .frontend-header .htr-topbar,
    .frontend-header .topbar.htr-topbar {
        display: none !important;
    }

    .frontend-header.htr-header .header-nav,
    .frontend-header.htr-header .header-search-container,
    .htr-btn-pass,
    .frontend-header.htr-header .auth-buttons {
        display: none !important;
    }

    .frontend-header.htr-header .mobile-menu-toggle {
        display: block !important;
    }

    .frontend-header.htr-header .mobile-account-btn {
        display: flex !important;
    }

    .frontend-header.htr-header .header-top {
        padding: 10px 0 !important;
    }
}

@media (max-width: 768px) {
    .frontend-header.htr-header .header-content {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr) auto;
        padding: 0 14px;
    }
}
