/* Filtre + ürün bloğu — sayfada ortalanmış, dengeli genişlik */
.cat-shop-container {
    max-width: 1280px;
    width: 100%;
    padding-left: clamp(20px, 4vw, 48px);
    padding-right: clamp(20px, 4vw, 48px);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

@media only screen and (min-width: 1200px) {
    .cat-shop-container {
        max-width: 1360px;
    }
}

@media only screen and (min-width: 1400px) {
    .cat-shop-container {
        max-width: 1440px;
    }
}

.cat-filter-layout {
    align-items: flex-start;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.cat-filter-col {
    padding-right: 8px;
}

.cat-products-column {
    padding-left: 8px;
}

@media only screen and (min-width: 992px) {
    .cat-filter-col {
        padding-right: 16px;
    }

    .cat-products-column {
        padding-left: 16px;
    }
}

.cat-filter-sidebar {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.cat-filter-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.cat-filter-mobile-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.cat-filter-close {
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #666;
    padding: 0;
}

.cat-filter-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.cat-filter-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.cat-filter-section-title {
    list-style: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    padding: 0;
    margin-bottom: 12px;
}

.cat-filter-section-title::-webkit-details-marker {
    display: none;
}

.cat-filter-section-body {
    padding-bottom: 4px;
}

.cat-filter-scroll {
    max-height: 220px;
    overflow-y: auto;
}

label.cat-filter-check {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px !important;
    cursor: pointer;
    font-size: 14px;
    color: #444;
    width: 100%;
    min-width: 0;
}

.cat-filter-check input {
    flex-shrink: 0;
    margin: 4px 0 0;
    width: 16px;
    height: 16px;
}

.cat-filter-check-label {
    flex: 1;
    min-width: 0;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.cat-filter-count {
    color: #999;
    font-size: 13px;
}

.cat-filter-price-inputs {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.cat-filter-price-field {
    flex: 1;
}

.cat-filter-price-field label {
    display: block;
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
}

.cat-filter-price-field input {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
}

.cat-filter-price-sep {
    color: #999;
    padding-bottom: 10px;
}

.cat-filter-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #999;
}

.cat-filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.cat-filter-apply,
.cat-filter-reset {
    flex: 1;
    text-align: center;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.cat-filter-apply {
    border: none;
    background: #40A944;
    color: #fff;
    cursor: pointer;
}

.cat-filter-apply:hover {
    background: #36963a;
    color: #fff;
}

.cat-filter-reset {
    border: 1px solid #ddd;
    background: #fff;
    color: #555;
}

.cat-filter-reset:hover {
    color: #222;
}

.cat-filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.cat-shop-header-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 20px;
    row-gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eee;
}

.cat-shop-header-row > .ec-pro-list-top--filter,
.cat-shop-header-row > .shop_toolbar_wrapper,
.cat-shop-header-row > .tf-shop-control,
.cat-shop-header-row > .cat-shop-toolbar {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0 !important;
    min-width: 0;
}

.cat-shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    width: 100%;
}

.cat-grid-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.cat-grid-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #888;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.cat-grid-switch:hover {
    border-color: #bbb;
    color: #444;
}

.cat-grid-switch.active {
    border-color: #3474d4;
    background: #3474d4;
    color: #fff;
}

.theme-accent-green .cat-grid-switch.active {
    border-color: #40A944;
    background: #40A944;
}

/* Bootstrap grid görünüm (tema1, tema3) */
.cat-product-grid[data-grid-mode="bootstrap"][data-cols="1"] > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
}

.cat-product-grid[data-grid-mode="bootstrap"][data-cols="2"] > [class*="col-"] {
    flex: 0 0 50%;
    max-width: 50%;
}

.cat-product-grid[data-grid-mode="bootstrap"][data-cols="3"] > [class*="col-"] {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.cat-product-grid[data-grid-mode="bootstrap"][data-cols="4"] > [class*="col-"] {
    flex: 0 0 25%;
    max-width: 25%;
}

/* CSS grid görünüm (tema2) */
.cat-product-grid[data-grid-mode="tf-grid"][data-cols="1"] {
    grid-template-columns: 1fr !important;
}

.cat-product-grid[data-grid-mode="tf-grid"][data-cols="2"] {
    grid-template-columns: repeat(2, 1fr) !important;
}

.cat-product-grid[data-grid-mode="tf-grid"][data-cols="3"] {
    grid-template-columns: repeat(3, 1fr) !important;
}

.cat-product-grid[data-grid-mode="tf-grid"][data-cols="4"] {
    grid-template-columns: repeat(4, 1fr) !important;
}

/* Tekli / ikili — yatay kart (foto sol, detay sağ) */
.cat-with-filters .cat-product-grid.cat-list-view {
    row-gap: 16px;
}

/* Tema1 */
.cat-with-filters .cat-product-grid.cat-list-view .ec-product-fw {
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 16px;
    padding: 14px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    height: auto !important;
}

.cat-with-filters .cat-product-grid.cat-list-view .ec-product-image {
    width: 200px !important;
    min-width: 140px !important;
    max-width: 32% !important;
    height: 170px !important;
    min-height: 140px !important;
    max-height: 200px !important;
    flex-shrink: 0;
    margin: 0 !important;
}

.cat-with-filters .cat-product-grid.cat-list-view--dual .ec-product-image {
    width: 130px !important;
    max-width: 38% !important;
    height: 130px !important;
    min-height: 120px !important;
    max-height: 150px !important;
}

.cat-with-filters .cat-product-grid.cat-list-view .ec-product-image img {
    object-fit: contain !important;
    object-position: center !important;
}

.cat-with-filters .cat-product-grid.cat-list-view .ec-product-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    text-align: left !important;
    padding: 4px 8px !important;
    min-width: 0;
}

.cat-with-filters .cat-product-grid.cat-list-view .ec-product-body .ec-title {
    min-height: 0 !important;
    -webkit-line-clamp: 3;
    text-align: left !important;
    width: 100%;
}

.cat-with-filters .cat-product-grid.cat-list-view .ec-product-body .ec-rating {
    text-align: left !important;
    margin: 6px 0 !important;
    padding: 0 !important;
    width: 100%;
}

.cat-with-filters .cat-product-grid.cat-list-view .ec-product-body .ec-price {
    text-align: left !important;
    width: 100%;
    margin-bottom: 8px !important;
}

.cat-with-filters .cat-product-grid.cat-list-view .ec-link-btn {
    margin-top: 4px !important;
    width: auto !important;
    align-self: flex-start !important;
}

.cat-with-filters .cat-product-grid.cat-list-view .ec-link-btn .ec-add-to-cart,
.cat-with-filters .cat-product-grid.cat-list-view .ec-link-btn .btn {
    width: auto !important;
    display: inline-block !important;
    min-width: 130px;
    max-width: 200px;
    padding: 8px 20px !important;
    line-height: 1.4 !important;
    text-align: center !important;
}

.cat-with-filters .cat-product-grid.cat-list-view[data-cols="1"] .ec-link-btn .ec-add-to-cart,
.cat-with-filters .cat-product-grid.cat-list-view[data-cols="1"] .ec-link-btn .btn {
    min-width: 150px;
    max-width: 180px;
}

/* Tema3 — liste görünümü (absolute grid stillerini sıfırla) */
.cat-with-filters .cat-product-grid.cat-list-view .single_product {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px;
    padding: 12px !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
}

.cat-with-filters .cat-product-grid.cat-list-view .product_thumb {
    width: 200px !important;
    min-width: 140px !important;
    max-width: 32% !important;
    height: 170px !important;
    min-height: 140px !important;
    max-height: 200px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    align-self: center !important;
}

.cat-with-filters .cat-product-grid.cat-list-view--dual .product_thumb {
    width: 120px !important;
    max-width: 40% !important;
    height: 120px !important;
    min-height: 110px !important;
    max-height: 140px !important;
}

.cat-with-filters .cat-product-grid.cat-list-view .product_content,
.cat-with-filters .cat-product-grid.cat-list-view .product_content.grid_content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    text-align: left !important;
    padding: 0 8px !important;
    min-width: 0;
    min-height: 0 !important;
    position: static !important;
}

.cat-with-filters .cat-product-grid.cat-list-view .product_content .product_name {
    flex: 0 0 auto !important;
    position: static !important;
    width: 100% !important;
    margin-bottom: 6px !important;
    text-align: left !important;
}

.cat-with-filters .cat-product-grid.cat-list-view .product_content .product_name h4 {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    height: auto !important;
    min-height: 0 !important;
    display: block !important;
    text-align: left !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    margin: 0 !important;
}

.cat-with-filters .cat-product-grid.cat-list-view .product_content .product_name h4 a {
    text-align: left !important;
}

.cat-with-filters .cat-product-grid.cat-list-view .product_content .price_box {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 0 10px 0 !important;
    justify-content: flex-start !important;
}

.cat-with-filters .cat-product-grid.cat-list-view .product_content .product_action_btn {
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    justify-content: flex-start !important;
    width: auto !important;
    z-index: auto !important;
}

.cat-with-filters .cat-product-grid.cat-list-view .action_links {
    bottom: 8px !important;
}

/* Tema2 — list-st-2 + ek düzeltmeler */
.cat-with-filters .cat-product-grid.cat-list-view .card-product.list-st-2 {
    align-items: center;
    padding: 12px 14px;
    background: #fff;
}

.cat-with-filters .cat-product-grid.cat-list-view .card-product.list-st-2 .card-product-wrapper {
    aspect-ratio: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex-shrink: 0;
}

.cat-with-filters .cat-product-grid.cat-list-view .card-product.list-st-2 .product-img {
    height: 100% !important;
    min-height: 140px;
    padding: 0 !important;
}

.cat-with-filters .cat-product-grid.cat-list-view .card-product.list-st-2 .img-hover {
    display: none !important;
}

.cat-with-filters .cat-product-grid.cat-list-view .card-product.list-st-2 .card-product-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 8px;
    min-width: 0;
    padding: 0 !important;
}

.cat-with-filters .cat-product-grid.cat-list-view .card-product .list-btn-main,
.cat-with-filters .cat-product-grid.cat-list-view .card-product .list-btn-main--inline {
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    margin-top: 6px !important;
    width: auto !important;
    max-width: 100%;
    z-index: auto !important;
}

.cat-with-filters .cat-product-grid.cat-list-view .card-product .list-btn-main .btn-main-product {
    width: auto !important;
    min-width: 130px;
    padding: 8px 18px !important;
}

.cat-with-filters .cat-product-grid.cat-list-view--dual .card-product.list-st-2 .card-product-wrapper {
    max-width: 110px !important;
    width: 38% !important;
}

.cat-with-filters .cat-product-grid.cat-list-view--dual .card-product.list-st-2 .product-img {
    min-height: 110px;
}

@media (max-width: 575px) {
    .cat-with-filters .cat-product-grid.cat-list-view[data-cols="1"] .ec-product-fw,
    .cat-with-filters .cat-product-grid.cat-list-view[data-cols="1"] .single_product {
        flex-direction: column !important;
    }

    .cat-with-filters .cat-product-grid.cat-list-view[data-cols="1"] .ec-product-image,
    .cat-with-filters .cat-product-grid.cat-list-view[data-cols="1"] .product_thumb {
        width: 100% !important;
        max-width: 100% !important;
        height: 200px !important;
    }

    .cat-with-filters .cat-product-grid.cat-list-view[data-cols="1"] .card-product.list-st-2 {
        flex-direction: column;
    }

    .cat-with-filters .cat-product-grid.cat-list-view[data-cols="1"] .card-product.list-st-2 .card-product-wrapper {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 767px) {
    .cat-product-grid[data-grid-mode="bootstrap"][data-cols="3"] > [class*="col-"],
    .cat-product-grid[data-grid-mode="bootstrap"][data-cols="4"] > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .cat-product-grid[data-grid-mode="tf-grid"][data-cols="3"],
    .cat-product-grid[data-grid-mode="tf-grid"][data-cols="4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .cat-grid-switcher {
        width: 100%;
        justify-content: flex-start;
    }
}

.cat-shop-header-row > .cat-result-count {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    margin: 0 !important;
    width: auto !important;
    white-space: nowrap;
}

.cat-shop-header-row > .cat-filter-toolbar {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-bottom: 0 !important;
}

@media only screen and (min-width: 992px) {
    .cat-shop-header-row > .cat-filter-toolbar:not(:has(.cat-active-filters)) {
        display: none;
    }
}

.cat-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.cat-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #40A944;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.cat-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.cat-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 20px;
    background: #f4f6f8;
    border: 1px solid #e3e7eb;
    color: #444;
    font-size: 13px;
    text-decoration: none;
}

.cat-active-tag span {
    font-size: 16px;
    line-height: 1;
    color: #888;
}

.cat-active-tag:hover {
    background: #eef1f4;
    color: #222;
}

.cat-active-clear {
    font-size: 13px;
    color: #c0392b;
    text-decoration: none;
    font-weight: 600;
}

.cat-active-clear:hover {
    color: #96281b;
}

.cat-result-count {
    margin: 0 0 0 auto;
    font-size: 14px;
    color: #777;
}

.cat-filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1040;
}

.cat-filter-overlay.is-open {
    display: block;
}

@media (max-width: 991.98px) {
    .cat-shop-header-row {
        grid-template-columns: 1fr;
    }

    .cat-shop-header-row > .cat-filter-toolbar {
        grid-row: 1;
    }

    .cat-shop-header-row > .ec-pro-list-top--filter,
    .cat-shop-header-row > .shop_toolbar_wrapper,
    .cat-shop-header-row > .tf-shop-control {
        grid-row: 2;
    }

    .cat-shop-header-row > .cat-result-count {
        grid-column: 1;
        grid-row: 3;
        justify-self: start;
    }

    .cat-filter-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(320px, 88vw);
        height: 100vh;
        z-index: 1050;
        border-radius: 0;
        overflow-y: auto;
        transform: translateX(-110%);
        transition: transform 0.25s ease;
        border-right: 1px solid #e9ecef;
        border-left: none;
        border-top: none;
        border-bottom: none;
    }

    .cat-filter-sidebar.is-open {
        transform: translateX(0);
    }

    .cat-result-count {
        margin-left: 0;
        width: 100%;
    }
}
