/**
 * Aksu Bal Header Styles
 *
 * Boxer header: Kenarlardan boşluklu, blur efektli.
 *
 * @package Aksu_Bal
 * @since 1.0.0
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

.aksu-header {
    --header-bg: #fffbeb;
    --header-main-bg: rgba(255, 251, 235, 0.85);
    --header-text: #451a03;
    --header-text-muted: #78350f;
    --header-accent: #f59e0b;
    --header-honey: #fbbf24;
    --header-honey-light: #fef3c7;
    --header-border: rgba(251, 191, 36, 0.15);
    --header-shadow: 0 8px 32px rgba(180, 83, 9, 0.1);
    --header-font: var(--aksu-font-body, 'Inter', sans-serif);
    --header-font-heading: var(--aksu-font-heading, 'Playfair Display', serif);
    --header-transition: cubic-bezier(0.4, 0, 0.2, 1);
    --header-radius: 1rem;
    --header-blur: 12px;

    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    font-family: var(--header-font);
    padding: 0.5rem 1rem;
}

/* ==========================================================================
   Top Bar
   ========================================================================== */

.aksu-header__topbar {
    background: linear-gradient(90deg, var(--header-honey) 0%, var(--header-accent) 100%);
    color: var(--header-text);
    font-size: 0.8rem;
    padding: 0.5rem 1.25rem;
    border-radius: var(--header-radius) var(--header-radius) 0 0;
    transition: all 0.3s var(--header-transition);
}

.aksu-header__topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.aksu-header__promo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.aksu-header__promo-icon {
    font-size: 1rem;
    animation: wobble 2s ease-in-out infinite;
}

@keyframes wobble {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.aksu-header__contact {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.aksu-header__contact-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--header-text);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.aksu-header__contact-item:hover {
    opacity: 0.8;
}

.aksu-header__contact-item svg {
    flex-shrink: 0;
}

/* ==========================================================================
   Main Header - Boxer Style with Blur
   ========================================================================== */

.aksu-header__main {
    background: var(--header-main-bg);
    backdrop-filter: blur(var(--header-blur));
    -webkit-backdrop-filter: blur(var(--header-blur));
    padding: 0.75rem 1.25rem;
    border-radius: 0 0 var(--header-radius) var(--header-radius);
    box-shadow: var(--header-shadow);
    transition: all 0.3s var(--header-transition);
}

.aksu-header__main-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ==========================================================================
   Logo
   ========================================================================== */

.aksu-header__logo {
    flex-shrink: 0;
}

.aksu-header__logo-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--header-text);
    transition: transform 0.3s var(--header-transition);
}

.aksu-header__logo-link:hover {
    transform: translateY(-2px);
}

.aksu-header__logo-icon {
    font-size: 2rem;
    line-height: 1;
}

.aksu-header__logo-text {
    display: flex;
    flex-direction: column;
}

.aksu-header__logo-name {
    font-family: var(--header-font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--header-text);
    line-height: 1.1;
}

.aksu-header__logo-tagline {
    font-size: 0.7rem;
    color: var(--header-text-muted);
    font-weight: 400;
}

/* Custom logo image */
.aksu-header__logo .custom-logo-link {
    display: block;
}

.aksu-header__logo .custom-logo {
    max-height: 48px;
    width: auto;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.aksu-header__nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.aksu-header__menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.aksu-header__menu > li {
    position: relative;
}

.aksu-header__menu > li > a {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    color: var(--header-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--header-radius);
    transition: all 0.2s ease;
}

.aksu-header__menu > li > a:hover,
.aksu-header__menu > li.current-menu-item > a,
.aksu-header__menu > li.current-menu-parent > a {
    background: var(--header-honey-light);
    color: var(--header-text);
}

/* Dropdown */
.aksu-header__menu > li > .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: white;
    border-radius: var(--header-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s var(--header-transition);
    list-style: none;
    margin: 0;
}

.aksu-header__menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.aksu-header__menu .sub-menu li a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--header-text);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.aksu-header__menu .sub-menu li a:hover {
    background: var(--header-honey-light);
}

/* ==========================================================================
   Actions (Search, Cart, Mobile Toggle)
   ========================================================================== */

.aksu-header__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.aksu-header__action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--header-text);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.aksu-header__action:hover {
    background: var(--header-honey-light);
    color: var(--header-text);
}

/* Cart */
.aksu-header__cart {
    text-decoration: none;
}

.aksu-header__cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.aksu-header__cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 1.1rem;
    height: 1.1rem;
    background: var(--header-accent);
    color: var(--header-text);
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
}

/* Hamburger */
.aksu-header__hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 22px;
}

.aksu-header__hamburger span {
    display: block;
    height: 2px;
    background: var(--header-text);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.aksu-header__hamburger span:nth-child(2) {
    width: 75%;
}

.aksu-header__mobile-toggle[aria-expanded="true"] .aksu-header__hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.aksu-header__mobile-toggle[aria-expanded="true"] .aksu-header__hamburger span:nth-child(2) {
    opacity: 0;
}

.aksu-header__mobile-toggle[aria-expanded="true"] .aksu-header__hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.aksu-header__mobile-toggle {
    display: none;
}

/* ==========================================================================
   Search Overlay
   ========================================================================== */

.aksu-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--header-transition);
}

.aksu-search-overlay[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.aksu-search-overlay__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(69, 26, 3, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.aksu-search-overlay__content {
    position: relative;
    width: 100%;
    max-width: 600px;
    padding: 0 1.5rem;
    transform: translateY(-20px);
    transition: transform 0.3s var(--header-transition);
}

.aksu-search-overlay[aria-hidden="false"] .aksu-search-overlay__content {
    transform: translateY(0);
}

.aksu-search-overlay__form {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 1rem;
    padding: 0.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.aksu-search-overlay__input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    color: var(--header-text);
    outline: none;
    font-family: inherit;
}

.aksu-search-overlay__input::placeholder {
    color: #92400e;
}

.aksu-search-overlay__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: var(--header-honey);
    border: none;
    border-radius: 0.75rem;
    color: var(--header-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.aksu-search-overlay__submit:hover {
    background: var(--header-accent);
    transform: scale(1.05);
}

.aksu-search-overlay__close {
    position: absolute;
    top: -4rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.aksu-search-overlay__close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Mobile Menu
   ========================================================================== */

.aksu-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--header-transition);
}

.aksu-mobile-menu[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.aksu-mobile-menu__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.aksu-mobile-menu__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 320px;
    background: white;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s var(--header-transition);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
}

.aksu-mobile-menu[aria-hidden="false"] .aksu-mobile-menu__panel {
    transform: translateX(0);
}

.aksu-mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--header-border);
    background: var(--header-honey-light);
}

.aksu-mobile-menu__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--header-font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--header-text);
}

.aksu-mobile-menu__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--header-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.aksu-mobile-menu__close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.aksu-mobile-menu__nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.aksu-mobile-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.aksu-mobile-menu__list li {
    border-bottom: 1px solid var(--header-border);
}

.aksu-mobile-menu__list li a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--header-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.aksu-mobile-menu__list li a:hover,
.aksu-mobile-menu__list li.current-menu-item > a {
    background: var(--header-honey-light);
    color: var(--header-text);
}

.aksu-mobile-menu__list .sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.02);
}

.aksu-mobile-menu__list .sub-menu li {
    border-bottom: none;
}

.aksu-mobile-menu__list .sub-menu a {
    padding-left: 2.5rem;
    font-size: 0.9rem;
    font-weight: 400;
}

.aksu-mobile-menu__footer {
    padding: 1.5rem;
    border-top: 1px solid var(--header-border);
    background: var(--header-bg);
}

.aksu-mobile-menu__contact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--header-text);
    text-decoration: none;
    font-weight: 500;
}

/* ==========================================================================
   Scrolled State
   ========================================================================== */

.aksu-header.scrolled .aksu-header__topbar {
    height: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    margin-bottom: 0;
}

.aksu-header.scrolled .aksu-header__main {
    border-radius: var(--header-radius);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1200px) {
    .aksu-header {
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 991px) {
    .aksu-header__nav {
        display: none;
    }

    .aksu-header__mobile-toggle {
        display: flex;
    }
}

@media (max-width: 767px) {
    .aksu-header {
        padding: 0.35rem 0.5rem;
    }

    .aksu-header__topbar {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
    }

    .aksu-header__promo-text {
        font-size: 0.7rem;
    }

    .aksu-header__contact-item--email {
        display: none;
    }

    .aksu-header__contact-item span {
        display: none;
    }

    .aksu-header__contact-item svg {
        width: 18px;
        height: 18px;
    }

    .aksu-header__main {
        padding: 0.6rem 1rem;
    }

    .aksu-header__logo-icon {
        font-size: 1.6rem;
    }

    .aksu-header__logo-name {
        font-size: 1.15rem;
    }

    .aksu-header__logo-tagline {
        display: none;
    }
}

@media (max-width: 480px) {
    .aksu-header__topbar-inner {
        justify-content: center;
    }

    .aksu-header__contact {
        display: none;
    }

    .aksu-header__promo-text {
        display: inline;
        font-size: 0.7rem;
    }

    .aksu-mobile-menu__panel {
        max-width: 100%;
    }
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
    .aksu-header {
        position: static;
    }

    .aksu-header__topbar,
    .aksu-header__actions,
    .aksu-search-overlay,
    .aksu-mobile-menu {
        display: none !important;
    }
}
