﻿:root {
    --bg-main: #FAF9F7;
    --bg-soft: #E6E1DA;
    --text-main: #2E2E2E;
    --accent: #C9A96A;
    --font-accent: 'Playfair Display', serif;
    --header-h: 76px;
    --topbar-h: 76px; /* eskiden 38px — isteğine göre ayarla */
    --container-w: 1200px;
}

.header-top-logo {
    font-family: var(--font-accent);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: .6px;
    color: var(--text-main);
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s;
}

    .header-top-logo:hover {
        color: var(--accent);
    }

    .header-top-logo img {
        height: 60px;
        width: 200px; /* istediğin genişliği ver */
        display: block;
        object-fit: contain;
    }
/* ===== HEADER BASE ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: var(--bg-main);
    border-bottom: 1px solid transparent;
    transition: box-shadow .2s ease, border-color .2s ease;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

    .site-header.is-sticky {
        box-shadow: 0 10px 28px rgba(0,0,0,.07);
        border-bottom-color: var(--bg-soft);
    }

/* ===== TOP BAR (TİTREMEYİ BİTİREN) =====
   ÖNEMLİ: height/max-height ile oynamıyoruz. Sadece transform+opacity.
*/
.header-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 1;
    transform: translateY(0);
    transition: transform .22s ease, opacity .18s ease;
    will-change: transform, opacity;
    z-index: 2;
}

.site-header.is-sticky .header-top {
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
}

/* TOP BAR INNER */
.header-top-inner {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: var(--topbar-h);
    position: relative;
}

/* ===== PEARL SEPARATOR (header-top ile header-main arası) ===== */
/* header-top ile header-main arasına düz çizgi */
.header-top::after {
    content: "";
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 0px;
    height: 1px;
    background: var(--accent);
    opacity: .45;
}


    .header-social a,
    .header-contact a {
        margin-right: 12px;
        text-decoration: none;
        color: var(--text-main);
        font-size: 16px;
    }

        .header-social a:hover,
        .header-contact a:hover {
            color: var(--accent);
        }

/* ===== MAIN BAR =====
   Layout sabit: padding-top daima topbar-h. Sticky'de SIFIRLAMA yok.
*/
.header-main {
    padding-top: var(--topbar-h);
    position: relative;
    z-index: 1;
    background: var(--bg-main);
}

.site-header.is-sticky .header-main {
    padding-top: var(--topbar-h);
}

.header-main-inner {
    max-width: var(--container-w);
    margin: 0 auto;
    height: var(--header-h);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

/* Logo */
.header-logo a {
    text-decoration: none;
    color: var(--text-main);
    font-family: var(--font-accent);
    font-size: 1.5em;
    font-weight: 500;
    letter-spacing: .8px;
}

/* Nav */
.header-nav {
    text-align: center;
    white-space: nowrap;
}

    .header-nav a {
        margin: 0 7px;
        text-decoration: none;
        font-size: 0.8rem;
        color: var(--accent);
        position: relative;
        display: inline-block;
        padding: 2px 0;
    }

        .header-nav a::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: -6px;
            width: 100%;
            height: 1px;
            background: var(--accent);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform .2s ease;
        }

        .header-nav a:hover::after {
            transform: scaleX(1);
        }

/* Actions */
.header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap; /* aşağı düşmeyi engelle */
    min-width: 0;
}

    .header-actions .icon {
        font-size: 1.05rem;
        text-decoration: none;
        color: var(--text-main);
    }

        .header-actions .icon:hover {
            color: var(--accent);
        }

/* ===== HAMBURGER ===== */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

    .hamburger span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--text-main);
        margin: 4px 0;
    }

/* ===== MOBILE DRAWER ===== */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 998;
}

.mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: min(82vw, 320px);
    background: var(--bg-main);
    border-right: 1px solid var(--bg-soft);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform .25s ease;
    padding: 16px;
    will-change: transform;
}

.mobile-drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 4px 14px;
    border-bottom: 1px solid var(--bg-soft);
    margin-bottom: 10px;
}

.mobile-close {
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-main);
}

.mobile-menu {
    display: flex;
    flex-direction: column;
    padding: 8px 4px;
}

    .mobile-menu a {
        padding: 12px 0;
        text-decoration: none;
        color: var(--text-main);
        font-size: .95rem;
        border-bottom: 1px solid rgba(230,225,218,.6);
    }

        .mobile-menu a:hover {
            color: var(--accent);
        }

.site-header.menu-open .mobile-overlay {
    display: block;
}

.site-header.menu-open .mobile-drawer {
    display: block;
    transform: translateX(0);
}

body.no-scroll {
    overflow: hidden;
}

/* ===== USER DROPDOWN ===== */
.user-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.user-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    color: var(--text-main);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 210px;
    background: #fff;
    border: 1px solid var(--bg-soft);
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 18px 40px rgba(0,0,0,.08);
    display: none;
    z-index: 1001;
}

.user-menu.is-open .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    padding: 10px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: rgba(46,46,46,.9);
    font-size: .93rem;
    transition: .2s;
}

    .user-dropdown a:hover {
        background: rgba(201,169,106,.10);
        color: var(--text-main);
    }

.user-sep {
    height: 1px;
    background: var(--bg-soft);
    margin: 6px 6px;
}

/* Cart badge */
.cart-icon {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -20px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Logout */
.logout-form {
    margin: 6px 0 2px 0;
}

.logout-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
    transition: all .15s ease;
}

    .logout-link:hover {
        background: var(--bg-main);
        color: #B89555;
    }

    .logout-link i {
        font-size: 13px;
        opacity: .9;
        transition: transform .15s ease;
    }

    .logout-link:hover i {
        transform: translateX(3px);
    }

    .logout-link:active {
        transform: scale(.98);
    }

/* ===== RESPONSIVE ===== */
@media (max-width:768px) {
    .header-nav {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .header-main-inner {
        grid-template-columns: 1fr auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header,
    .header-top,
    .mobile-drawer,
    .header-nav a::after {
        transition: none !important;
    }
}

/* ===== SEARCH PANEL ===== */
.search-trigger {
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

/* panel header-main altında açılır */
.header-search {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 998;
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    pointer-events: none;
}

.site-header.search-open .header-search {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.header-search-inner {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-form {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--bg-soft);
    background: rgba(250,249,247,0.92);
    backdrop-filter: blur(10px);
    border-radius: 999px;
    padding: 10px 14px;
    box-shadow: 0 16px 34px rgba(46,46,46,0.10);
}

    .search-form i {
        color: rgba(46,46,46,.55);
        font-size: 14px;
    }

    .search-form input {
        flex: 1;
        border: 0;
        outline: 0;
        background: transparent;
        color: var(--text-main);
        font-size: .95rem;
        min-width: 0;
    }

.search-submit {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: .85rem;
    cursor: pointer;
    transition: .2s ease;
}

    .search-submit:hover {
        background: rgba(201,169,106,0.85);
    }

/* kapatma */
.search-close {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(46,46,46,0.14);
    background: rgba(250,249,247,0.86);
    color: var(--text-main);
    cursor: pointer;
    transition: .2s ease;
}

    .search-close:hover {
        border-color: rgba(201,169,106,0.7);
        background: rgba(250,249,247,0.96);
    }

/* mobilde submit’i gizle, enter ile ara */
@media (max-width: 520px) {
    .search-submit {
        display: none;
    }
}

.gift-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 38px; /* ikonlarla hizalı */
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(201,169,106,.55);
    background: rgba(250,249,247,.90);
    backdrop-filter: blur(8px);
    color: var(--text-main);
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(46,46,46,.08);
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
    white-space: nowrap; /* yazı kırılmasın */
}

    .gift-cta i {
        color: var(--accent);
        font-size: 16px;
    }

    .gift-cta span {
        font-size: .9rem;
        font-weight: 500;
    }

    /* hover */
    .gift-cta:hover {
        transform: translateY(-1px);
        border-color: var(--accent);
        background: rgba(250,249,247,.98);
    }

/* dar ekranlarda yazıyı gizle, sadece hediye ikonu kalsın */
@media (max-width: 980px) {
    .gift-cta span {
        display: none;
    }

    .gift-cta {
        width: 38px;
        padding: 0;
        justify-content: center;
    }
}

/* ===== DESKTOP DROPDOWN NAV ===== */
.nav-root {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 22px;
}

.header-nav {
    position: relative;
}

.nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-link {
    margin: 0; /* eski margin'i sıfırlıyoruz */
    text-decoration: none;
    font-size: 1rem;
    color: var(--accent);
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 6px 0;
}

    .nav-link::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: -6px;
        width: 100%;
        height: 1px;
        background: var(--accent);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform .2s ease;
    }

.nav-item:hover .nav-link::after,
.nav-item:focus-within .nav-link::after {
    transform: scaleX(1);
}

/* dropdown panel */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 6px); /* 14px -> 6px */
    left: 50%;
    transform: translateX(-50%);
    min-width: 240px;
    background: #fff;
    border: 1px solid var(--bg-soft);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 18px 40px rgba(0,0,0,.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    z-index: 1002;
}

/* link ile dropdown arasındaki boşluğu kapatan hover köprüsü */
.nav-item.has-sub::after {
    content: "";
    position: absolute;
    left: -14px; /* biraz geniş tut */
    right: -14px;
    top: 100%;
    height: 14px; /* boşluğun tamamını kapsasın */
    background: transparent;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown,
.nav-item.is-open .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* dropdown links */
.nav-dropdown a {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: rgba(46,46,46,.92);
    font-size: .95rem;
    transition: .2s;
}

    .nav-dropdown a:hover {
        background: rgba(201,169,106,.10);
        color: var(--text-main);
    }

/* küçük "ok" efekti */
.nav-dropdown::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: #fff;
    border-left: 1px solid var(--bg-soft);
    border-top: 1px solid var(--bg-soft);
    transform: translateX(-50%) rotate(45deg);
}

/* ===== MOBILE ACCORDION MENU ===== */
.mobile-menu .m-item {
    border-bottom: 1px solid rgba(230,225,218,.6);
    padding: 6px 0;
}

.mobile-menu .m-parent {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0;
    border: 0;
    background: transparent;
    color: var(--text-main);
    font-size: .95rem;
    cursor: pointer;
    text-align: left;
}

.mobile-menu .m-chevron {
    color: rgba(46,46,46,.55);
    transition: transform .2s ease;
}

.mobile-menu .m-sub {
    display: grid;
    gap: 6px;
    padding: 0 0 12px 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .22s ease, opacity .18s ease;
}

    .mobile-menu .m-sub a {
        padding: 10px 0 10px 10px;
        text-decoration: none;
        color: rgba(46,46,46,.9);
        font-size: .92rem;
    }

        .mobile-menu .m-sub a:hover {
            color: var(--accent);
        }

/* open state */
.mobile-menu .m-item.is-open .m-sub {
    max-height: 260px; /* alt link sayına göre yeterli */
    opacity: 1;
}

.mobile-menu .m-item.is-open .m-chevron {
    transform: rotate(180deg);
}

/* CTA link */
.mobile-menu .m-cta {
    display: block;
    margin-top: 10px;
    padding: 12px 0;
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
}