/* _StoreLayout için tema üzerine eklemeler: temada karşılığı olmayan işlevsel parçalar. */

/* Logo: şeffaf header'da beyaz, açık header'da normal logo. Temanın siyaha çeviren filtresi kapatılır. */
.store-header .brand-logo,
.catalog-page .brand-logo,
.store-header.is-menu-open .brand-logo,
.store-header.is-search-open .brand-logo { filter: none; max-height: 72px; object-fit: contain; }
.store-logo-dark { display: none; }
/* Logo boyutu: masaüstünde 190px (tema 150px), logo sütunu da genişletilir; header 88px olduğundan 72px yüksekliğe sığar. */
@media (min-width: 1200px) {
    .header-main { grid-template-columns: 230px minmax(0, 1fr) 280px; }
    .store-header .brand-logo { width: 190px; }
}
@media (max-width: 767.98px) {
    .store-header .brand-logo { width: 130px; max-height: 48px; }
}
@media (max-width: 380px) {
    .store-header .brand-logo { width: 116px; }
}
.catalog-page .store-logo-light,
.store-header.is-menu-open .store-logo-light,
.store-header.is-search-open .store-logo-light { display: none; }
.catalog-page .store-logo-dark,
.store-header.is-menu-open .store-logo-dark,
.store-header.is-search-open .store-logo-dark { display: block; }
/* Tek logo yüklüyse açık header'da (iç sayfalar, mobil menü/arama) aynı logo koyulaştırılır — beyaz logo açık zeminde görünür. */
.store-header .brand-logo.store-logo-darken,
.catalog-page .store-header .brand-logo.store-logo-darken { filter: brightness(0); opacity: .86; }
.store-brand-text { font-size: 18px; font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.store-header.is-menu-open .brand,
.store-header.is-search-open .brand { color: #242a2c; }

/* Üst menü çok öğede alt satıra geçer */
.store-nav { flex-wrap: wrap; row-gap: 6px; }

/* Dil ve hesap menüleri: gerçek link ve form */
.language-label { text-transform: uppercase; }
.language-menu a,
.account-menu a,
.account-menu button {
    width: 100%; display: block; padding: 11px 12px; border: 0; background: transparent;
    color: #687579; font: 600 12px/1.2 'BioCore Montserrat', Arial, sans-serif;
    text-align: center; text-transform: uppercase; white-space: nowrap;
}
.language-menu a:hover,
.language-menu a:focus-visible,
.account-menu a:hover,
.account-menu a:focus-visible,
.account-menu button:hover,
.account-menu button:focus-visible { background: #ededed; color: #000; outline: 0; }
.account-menu form { margin: 0; }
.account-selector .account-menu { color: #687579; }

/* Sepet rozeti */
.store-cart-badge {
    position: absolute; top: -6px; right: -8px; min-width: 17px; height: 17px; padding: 0 4px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9px; background: var(--navy); color: #fff; font-size: 10px; font-weight: 600; line-height: 1;
}
/* Temanın ".header-icon>span{display:none}" kuralını aşar; gizleme JS'in satır içi stiliyle yapılır */
.header-links .bag-link .store-cart-badge { display: flex; }
.home-page .store-header:not(.is-menu-open):not(.is-search-open) .store-cart-badge { background: #fff; color: var(--navy); }

/* Mega menü: temadaki 100vw, dikey kaydırma çubuğu varken yatay taşma üretir */
.store-header.is-menu-open .mega-menu { width: 100%; }

/* Mega menü: kategori sayısına göre kolonlar */
.mega-menu-panel.mega-menu-wide.store-mega-panel {
    grid-template-columns: repeat(auto-fit, minmax(170px, 240px));
    align-items: start; justify-content: center; column-gap: 32px; row-gap: 24px;
}
.mega-menu-wide .mega-menu-column > a.mega-menu-eyebrow { color: #303638; font-size: .9rem; font-weight: 600; }
.mega-menu-wide .mega-menu-column > a.mega-menu-eyebrow:hover { color: #000; }
.store-mega-panel .mega-menu-tile-media { height: 200px; }

/* Arama: tarayıcının kendi temizleme düğmesi kapatma düğmesiyle çakışmasın */
.search-form input[type="search"]::-webkit-search-cancel-button { display: none; }

/* Arama önerileri */
.store-search-suggestions {
    position: absolute; top: 100%; right: 0; left: 0; z-index: 60; display: none; max-height: 60vh; overflow-y: auto;
    border-top: 1px solid #e4e4e4; background: #f8f8f8; box-shadow: 0 12px 24px rgba(0, 20, 29, .12);
}
.store-search-suggestions.is-open { display: block; }
.store-search-item { display: flex; align-items: center; gap: 14px; padding: 10px 2.5vw; color: #30383d; font-size: 14px; }
.store-search-item:hover, .store-search-item:focus-visible { background: #ededed; color: #000; outline: 0; }
.store-search-thumb { width: 44px; height: 44px; flex: none; overflow: hidden; background: #e5e5e3; }
.store-search-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.store-search-empty { padding: 16px 2.5vw; color: #687579; font-size: 14px; }

/* Bildirim */
.toast-message { z-index: 2000; font-size: 14px; max-width: 320px; }
.toast-message.is-error { background: #991b1b; }

/* Footer */
.store-footer .footer-top.store-footer-top { grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr)); }
.store-footer .footer-logo-link { display: inline-block; margin: 0 0 18px; }
.store-footer .footer-logo { display: block; width: auto; max-width: 180px; max-height: 64px; object-fit: contain; filter: none; }
.store-footer .footer-logo.footer-logo-darken { filter: brightness(0); opacity: .86; }
@media (max-width: 767.98px) { .store-footer .footer-logo { max-width: 145px; max-height: 52px; } }
.store-footer-contact { display: grid; gap: 8px; margin-top: 4px; color: #687278; font-size: .9rem; line-height: 1.5; }
.store-footer-contact a { color: inherit; }
.store-footer-contact a:hover { color: #000; }
.store-footer-contact address { margin: 0; white-space: pre-line; }
.store-payment-methods { grid-column: 3; }
.store-payment-text { width: auto !important; color: #354249 !important; font: 500 12px/1.2 var(--sans) !important; letter-spacing: 0 !important; white-space: nowrap; }

/* WhatsApp sekmesi */
.store-whatsapp-tab {
    position: fixed; z-index: 40; right: 20px; bottom: 20px; display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 14px; border-radius: 24px; background: #1f8f55; color: #fff; font-size: 13px; font-weight: 500;
    box-shadow: 0 6px 18px rgba(0, 20, 29, .2);
}
.store-whatsapp-tab:hover { background: #17754a; color: #fff; }
.store-whatsapp-tab svg { flex: none; width: 20px; height: 20px; fill: currentColor; stroke: none; }

/* Çerez banner'ı */
.store-cookie-banner {
    position: fixed; z-index: 1500; right: 0; bottom: 0; left: 0; display: none; align-items: center; justify-content: center; gap: 24px;
    padding: 14px 24px; border-top: 1px solid #dedede; background: #f8f8f8; color: #354249; font-size: 13px;
}
.store-cookie-banner.is-visible { display: flex; }
.store-cookie-banner p { margin: 0; }
.store-cookie-banner a { text-decoration: underline; text-underline-offset: 2px; }
.store-cookie-banner button {
    flex: none; min-height: 38px; padding: 0 22px; border: 1px solid var(--navy); border-radius: 6px;
    background: var(--navy); color: #fff; font-size: 13px; font-weight: 500;
}
.store-cookie-banner button:hover { background: var(--blue); }

/* Mobil panel */
.store-mobile-panel { display: none; }

@media (max-width: 767.98px) {
    .header-links .language-selector { display: none; }
    .header-links svg, .search-toggle svg, .bag-link svg { width: 22px; height: 22px; }
    .header-links { gap: 14px; }
    .header-main { grid-template-columns: 30px minmax(75px, 1fr) auto; gap: 10px; }
    /* Logo ortada değil, hamburger menünün hemen yanında (solda) dursun. */
    .store-header .brand { justify-self: start; justify-content: flex-start; margin: 0; text-align: left; }
    .mobile-menu-toggle span { width: 20px; height: 2px; }
    .store-header.is-menu-open .mobile-menu-toggle span,
    .store-header.is-search-open .mobile-menu-toggle span { background: #242a2c; }
    .store-header.is-menu-open { z-index: 50; }
    .store-brand-text { font-size: 15px; }

    .store-mobile-panel:not([hidden]) {
        position: absolute; top: 100%; right: 0; left: 0; z-index: 45; display: block;
        max-height: calc(100dvh - 68px); overflow-y: auto; padding: 4px 18px 24px;
        border-top: 1px solid #e5e8e9; background: #f8f8f8; color: #25343a;
    }
    body.store-mobile-open { overflow: hidden; }
    body.store-mobile-open .store-cookie-banner,
    body.store-mobile-open .store-whatsapp-tab { display: none; }
    .store-mobile-link,
    .store-mobile-group > summary,
    .store-mobile-section > a,
    .store-mobile-section button {
        min-height: 46px; display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 8px 0;
        border: 0; border-bottom: 1px solid #e5e8e9; background: transparent; color: #25343a;
        font: 600 14px/1.3 'BioCore Montserrat', Arial, sans-serif; text-align: left; cursor: pointer;
    }
    .store-mobile-group > summary { list-style: none; }
    .store-mobile-group > summary::-webkit-details-marker { display: none; }
    .store-mobile-group > summary::after {
        width: 8px; height: 8px; flex: none; margin-right: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
        content: ''; transform: rotate(45deg); transition: transform .18s ease;
    }
    .store-mobile-group[open] > summary::after { transform: rotate(-135deg); }
    .store-mobile-children { padding-left: 14px; }
    .store-mobile-children .store-mobile-link,
    .store-mobile-children .store-mobile-group > summary { font-weight: 500; }
    .store-mobile-all { color: #687579; }
    .store-mobile-section { margin-top: 18px; }
    .store-mobile-section form { margin: 0; }
    .store-mobile-languages { display: flex; gap: 22px; }
    .store-mobile-languages > a { width: auto; border: 0; color: #687579; text-transform: uppercase; }
    .store-mobile-languages > a.is-active { color: #25343a; text-decoration: underline; text-underline-offset: 4px; }

    .store-footer .footer-top.store-footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .store-payment-methods { grid-column: auto; justify-content: center; }
    .store-whatsapp-tab { right: 12px; bottom: 16px; padding: 10px; }
    .store-whatsapp-tab span { display: none; }
    .store-cookie-banner { flex-direction: column; gap: 12px; padding: 14px 16px; text-align: center; }
    .store-search-item { padding: 10px 18px; }
    .store-search-empty { padding: 16px 18px; }
}
