﻿/* ============================================================
   EUPETSPA - Header / MenÃ¼ Stilleri
   ------------------------------------------------------------
   Minimal, ince, yatay, premium. Gradient yok, kalÄ±n gÃ¶lge yok,
   bÃ¼yÃ¼k yuvarlak buton yok. Logo CSS Grid ile tam merkezde.
   ============================================================ */

:root {
    --brand: #47667A;
    --header-line: #B7C2CC;
    --ink-soft: #6B7B88;
    --paper: #FDFCFA;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 120;
    height: 62px;
    background: var(--header-bg, #F7F6F3);
    color: var(--header-text, #17212B);
    border-bottom: 1px solid transparent;
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Ãœstteki ince Ã§izgi */
.site-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--header-line, #B7C2CC);
}

.site-header.is-scrolled {
    background: rgba(var(--header-bg-rgb, 247, 246, 243), 0.92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom-color: rgba(23, 33, 43, 0.08);
    box-shadow: 0 1px 0 rgba(23, 33, 43, 0.04);
}

/* Grid dÃ¼zeni: sol | logo | saÄŸ â€” logo geniÅŸliklerden baÄŸÄ±msÄ±z tam merkez */
.site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    height: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 28px;
    position: relative;
}

/* ============================================================
   SOL MENÃœ
   ============================================================ */

.site-nav {
    min-width: 0;
}

.site-nav--left {
    display: flex;
    justify-content: flex-start;
}

.site-nav--right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    min-width: 0;
}

.site-nav__list {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav__item {
    position: relative;
    height: 62px;
    display: flex;
    align-items: center;
}

.site-nav__link {
    display: inline-flex;
    align-items: center;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: inherit;
    white-space: nowrap;
    transition: color 0.2s ease;
    padding: 4px 0;
}

.site-nav__link:hover {
    color: var(--brand);
}

/* ============================================================
   LOGO
   ============================================================ */

.site-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-width: 0;
}

.site-logo__img {
    display: block;
    max-width: 100%;
    max-height: 40px;
    width: auto;
    height: auto;
}

.site-logo__text {
    font-size: 21px;
    font-weight: 400;
    letter-spacing: 0.34em;
    text-indent: 0.34em; /* harf aralÄ±ÄŸÄ±na gÃ¶re gÃ¶rsel ortalama dÃ¼zeltmesi */
    color: inherit;
    line-height: 1;
    white-space: nowrap;
}

.site-logo__text--sm {
    font-size: 17px;
}

/* ============================================================
   SAÄ MENÃœ / Ä°KONLAR
   ============================================================ */

.site-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-actions__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: inherit;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.site-actions__btn:hover {
    background: rgba(23, 33, 43, 0.05);
    color: var(--brand);
}

.site-actions__count {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    color: var(--header-text, #17212B);
    border: 1px solid rgba(23, 33, 43, 0.25);
    border-radius: 999px;
    background: transparent;
}

/* ============================================================
   MEGA MENÃœ
   ============================================================ */

.mega-menu {
    position: absolute;
    top: calc(100% - 2px);
    left: 12px;
    transform: translateY(10px);
    width: min(920px, calc(100vw - 48px));
    background: var(--paper);
    border: 1px solid #E6E3DC;
    border-radius: 12px;
    box-shadow: 0 24px 48px rgba(23, 33, 43, 0.09);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    z-index: 130;
}

.site-nav__item:hover .mega-menu,
.site-nav__item:focus-within .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Ana yerleÅŸim: kategori alanÄ± + tanÄ±tÄ±m kartÄ± */
.mega-menu-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 40px;
    width: 100%;
    padding: 28px;
    align-items: start;
}

/* Kategori alanÄ±: kategori sayÄ±sÄ±ndan baÄŸÄ±msÄ±z 2 sÃ¼tunlu akÄ±ÅŸ,
   satÄ±rlar otomatik bÃ¼yÃ¼r, hiÃ§bir Ã¶ÄŸe kesilmez ya da taÅŸmaz */
.mega-menu-cats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 32px;
    align-content: start;
    min-width: 0;
}

.mega-menu__cat {
    display: block;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.5;
    color: var(--header-text, #17212B);
    padding: 12px 0;
    border-bottom: 1px solid #ECEAE4;
    transition: color 0.2s ease;
    overflow-wrap: break-word;
}

.mega-menu__cat:hover {
    color: var(--brand);
}

/* Promo kart */
.mega-menu__promo {
    min-width: 0;
}

.mega-menu__promo-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 190px;
    background: #F2F0EB;
    border-radius: 10px;
    overflow: hidden;
    transition: background-color 0.2s ease;
}

.mega-menu__promo-card:hover {
    background: #EBE8E1;
}

.mega-menu__promo-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.mega-menu__promo-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    flex: 1;
}

.mega-menu__promo-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--header-text, #17212B);
}

.mega-menu__promo-text {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--ink-soft);
}

.mega-menu__promo-cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand);
}

/* ============================================================
   ARAMA PANELÄ°
   ============================================================ */

.search-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 24px;
    width: min(380px, calc(100vw - 32px));
    background: var(--paper);
    border: 1px solid #E6E3DC;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(23, 33, 43, 0.1);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    z-index: 125;
}

.search-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-panel__form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px 4px 14px;
    border-bottom: 1px solid #E6E3DC;
    color: var(--ink-soft);
}

.search-panel__form input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    font-family: inherit;
    color: var(--header-text, #17212B);
    padding: 8px 0;
}

.search-panel__form input::placeholder {
    color: #9AA7B2;
}

.search-panel__submit {
    border: none;
    background: transparent;
    color: var(--brand);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
}

.search-panel__submit:hover {
    background: rgba(71, 102, 122, 0.08);
}

.search-panel__close {
    border: none;
    background: transparent;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    padding: 6px;
    border-radius: 6px;
}

.search-panel__close:hover {
    color: var(--header-text, #17212B);
    background: rgba(23, 33, 43, 0.05);
}

/* ============================================================
   MOBÄ°L MENÃœ (soldan kayan tam yÃ¼kseklik)
   ============================================================ */

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(340px, 88vw);
    background: var(--paper);
    z-index: 150;
    transform: translateX(-102%);
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 24px 0 48px rgba(23, 33, 43, 0.12);
}

.mobile-menu.is-open {
    transform: translateX(0);
}

.mobile-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 18px;
    border-bottom: 1px solid #ECEAE4;
}

.mobile-menu__close {
    border: none;
    background: transparent;
    color: var(--header-text, #17212B);
    display: flex;
    padding: 6px;
    border-radius: 6px;
}

.mobile-menu__nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.mobile-menu__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--header-text, #17212B);
    border-bottom: 1px solid #F1EFEA;
}

.mobile-menu__group {
    border-bottom: 1px solid #F1EFEA;
}

.mobile-menu__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--header-text, #17212B);
    cursor: pointer;
    list-style: none;
    transition: color 0.2s ease;
}

.mobile-menu__toggle::-webkit-details-marker {
    display: none;
}

.mobile-menu__toggle svg {
    transition: transform 0.22s ease;
    color: var(--ink-soft);
}

.mobile-menu__group[open] > .mobile-menu__toggle svg {
    transform: rotate(180deg);
}

.mobile-menu__sub {
    padding: 4px 0 10px;
}

.mobile-menu__sub .mobile-menu__link {
    padding: 11px 20px 11px 34px;
    font-size: 14px;
    font-weight: 400;
    border-bottom: none;
}

.mobile-menu__links {
    list-style: none;
    margin: 0;
    padding: 0 20px 8px 48px;
}

.mobile-menu__links li a {
    display: block;
    padding: 9px 0;
    font-size: 13.5px;
    color: var(--ink-soft);
    transition: color 0.2s ease;
}

.mobile-menu__links li a:hover {
    color: var(--brand);
}

.mobile-menu__foot {
    border-top: 1px solid #ECEAE4;
    padding: 14px 20px;
}

.mobile-menu__user {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--header-text, #17212B);
}

/* ============================================================
   MÄ°NÄ° SEPET (saÄŸdan kayan)
   ============================================================ */

/* Karartma katmanÄ± */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(23, 33, 43, 0.32);
    z-index: 140;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.drawer-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* Genel: aÃ§Ä±k drawer iken gÃ¶vde kaydÄ±rmasÄ±nÄ± kilitle */
body.no-scroll {
    overflow: hidden;
}

/* ============================================================
   MOBÄ°L GÃ–RÃœNÃœM (hamburger + logo + arama/sepet)
   ============================================================ */

.site-mobile {
    display: none;
}

.site-mobile__btn {
    border: none;
    background: transparent;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.site-mobile__actions {
    display: flex;
    align-items: center;
}

@media (max-width: 1080px) {
    .site-nav--right > nav {
        display: none;
    }
}

@media (max-width: 860px) {
    .site-header {
        height: 56px;
    }

    .site-nav--left,
    .site-nav--right,
    .site-logo {
        display: none;
    }

    .site-header__inner {
        grid-template-columns: 1fr;
        padding: 0 12px;
    }

    /* Mobil satÄ±r: hamburger | logo | arama+sepet */
    .site-mobile {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }

    .site-mobile__btn {
        justify-self: start;
    }

    .site-mobile__logo {
        justify-self: center;
        display: flex;
        align-items: center;
    }

    .site-mobile__actions {
        justify-self: end;
    }

    .search-panel {
        right: 16px;
        top: calc(100% + 8px);
    }
}

@media (max-width: 480px) {
    .site-header__inner {
        gap: 8px;
        padding: 0 12px;
    }

    .site-logo__text--sm {
        font-size: 15px;
    }
}

/* Genel sepet işlem butonu (sepet sayfası, boş durum vb.) */
.btn-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 14px;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #fff;
    background: var(--header-text, #17212B);
    border: 1px solid var(--header-text, #17212B);
    border-radius: 4px;
    text-decoration: none;
    transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn-cart:hover {
    opacity: 0.88;
}

.btn-cart--outline {
    background: transparent;
    color: var(--header-text, #17212B);
}

.btn-cart--outline:hover {
    background: rgba(23, 33, 43, 0.04);
    opacity: 1;
}
