/* =========================================================
   Atlas — eklemeler (atlas.css eski sistemle birebir kalsın diye ayrı dosya)
   Ürün bulucu: "Temizle" butonu + "Son aramalar"
========================================================= */

/* ERTpanel ortak stili (wi-revizyon.css) gövdeyi 15px / 1.6 yapıyor; eski Atlas: 14px / 1.5 */
body {
    font-size: 14px;
    line-height: 1.5;
}

.atlas-search-tools {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.atlas-search-history {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.atlas-search-history[hidden] {
    display: none;
}

.atlas-search-history-title {
    font-size: 11px;
    font-weight: 700;
    color: #777e82;
}

.atlas-search-history-item {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border: 1px solid #dfe3df;
    border-radius: 999px;
    background: #fff;
    color: #34383b;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: border-color .2s ease, color .2s ease;
}

.atlas-search-history-item:hover {
    border-color: #80c44a;
    color: #6bad38;
}

.atlas-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    height: 43px;
    padding: 0 18px;
    border: 1px solid #dfe3df;
    border-radius: 7px;
    background: #fff;
    color: #555;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.atlas-search-clear:hover {
    border-color: #d9534f;
    color: #c9302c;
}

/* Arama sayfası: Ara + Temizle yan yana, son aramalar formun altında tam satır */
.search-page-actions {
    display: flex;
    gap: 8px;
}

.search-page-form .atlas-search-clear {
    height: 43px;
    padding: 0 16px;
    background: #fff;
    color: #555;
    border: 1px solid #dfe3df;
}

.search-page-form .atlas-search-clear:hover {
    border-color: #d9534f;
    color: #c9302c;
}

.search-page-history {
    grid-column: 1 / -1;
    margin-top: 0;
}

.search-page-history .atlas-search-history:empty,
.search-page-history:has(.atlas-search-history[hidden]) {
    display: none;
}

/* Ana sayfa bulucusu (koyu zemin) */
.atlas-search-tools--dark .atlas-search-history-title {
    color: rgba(255, 255, 255, .45);
}

.atlas-search-tools--dark .atlas-search-history-item {
    border-color: rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .85);
}

.atlas-search-tools--dark .atlas-search-history-item:hover {
    border-color: #80c44a;
    color: #80c44a;
}

.atlas-search-tools--dark .atlas-search-clear {
    height: 32px;
    padding: 0 12px;
    margin-left: auto;
    border-color: rgba(255, 255, 255, .16);
    background: transparent;
    color: rgba(255, 255, 255, .75);
    font-size: 11px;
}

.atlas-search-tools--dark .atlas-search-clear:hover {
    border-color: #ff8a80;
    color: #ff8a80;
}

@media (max-width: 767px) {
    .search-page-actions > button {
        flex: 1;
    }
}

/* =========================================================
   Atlas 1.2 — üst menü: hesap / favori / sepet (ERTpanel 6.x)
========================================================= */

/* Boş sayaç gösterilmez (shop.js "is-empty" sınıfını günceller) */
.site-cart-count.is-empty {
    display: none !important;
}

.site-member-button.is-active {
    border-color: var(--atlas-green, #80c44a);
    color: #fff;
}

.site-member-button.is-active i {
    color: var(--atlas-green, #80c44a);
}

/* Dar masaüstü: etiketler gizlenir ama sayaç rozeti görünür kalır */
@media (min-width: 992px) and (max-width: 1450px) {
    .site-cart-button .site-cart-count:not(.is-empty) {
        display: inline-flex;
    }
}

/* Masaüstü: üyelik butonları yalnız simge (yazı title ipucunda) — e-ticaret açıkken menü taşmasın.
   atlas.css'teki "KESİN DÜZELTME" bloğu !important kullandığı için burada da !important gerekir. */
@media (min-width: 992px) {
    .site-navbar-actions .site-member-button {
        width: 42px !important;
        min-width: 42px;
        padding: 0 !important;
        justify-content: center;
    }

    .site-navbar-actions .site-member-button span {
        display: none !important;
    }
}

/* Dar masaüstü (992–1599 px): B2B kısaltılır, sepet yalnız simge */
@media (min-width: 992px) and (max-width: 1599.98px) {
    .site-b2b-suffix,
    .site-navbar-actions .site-cart-button .site-cart-label {
        display: none;
    }

    .site-navbar-actions .site-cart-button {
        width: 42px;
        padding: 0;
    }

    .site-navbar-actions .site-cart-button .site-cart-count:not(.is-empty) {
        position: absolute;
        top: -7px;
        right: -7px;
    }

    .site-b2b-button {
        padding-left: 14px;
        padding-right: 14px;
    }
}

@media (min-width: 992px) and (max-width: 1399.98px) {
    .site-menu-link {
        padding: 0 9px;
    }

    .site-navbar-actions {
        gap: 6px;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .site-menu-link {
        padding: 0 6px;
        font-size: 13px;
    }

    .site-b2b-button i {
        display: none;
    }
}

/* 992–1365 px: logo küçülür, dil seçici yalnız simge, "Üye Ol" gizlenir (giriş sayfasında kayıt bağlantısı var) */
@media (min-width: 992px) and (max-width: 1365.98px) {
    .site-logo-image {
        height: 44px;
        max-width: 140px;
    }

    .site-language-button {
        padding-left: 10px;
        padding-right: 10px;
    }

    .site-language-button > span,
    .site-language-button .language-arrow {
        display: none;
    }

    .site-navbar-actions .site-member-register {
        display: none;
    }

    .site-menu-link {
        padding: 0 7px;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .site-navbar-actions .site-wish-button {
        display: none;
    }

    .site-menu-link {
        padding: 0 5px;
        font-size: 12.5px;
    }

    .site-navbar-actions {
        gap: 5px;
        padding-left: 8px;
    }
}

/* Arama: sayfa sonuçları */
.atlas-page-results {
    margin-top: 34px;
}

.atlas-page-results h2 {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 800;
    color: #34383b;
}

.atlas-page-results h2 small {
    margin-left: 6px;
    font-size: 13px;
    color: #80c44a;
}

.atlas-page-results-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.atlas-page-result {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid #e5e9e5;
    border-radius: 12px;
    background: #fff;
    color: #34383b;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.atlas-page-result:hover {
    border-color: #80c44a;
    box-shadow: 0 8px 22px rgba(128, 196, 74, .12);
}

.atlas-page-result span {
    font-size: 13px;
    color: #777e82;
}

/* Satın alma kutusu (Atlas) */
.atlas-variant-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #555;
}

.atlas-buy-secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.atlas-buy-secondary > * {
    flex: 1 1 140px;
}

.atlas-quote-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
