.admin-sidebar-scroll {
    padding: 0 !important;
    overflow: hidden !important;
    height: 100vh !important;
    max-height: 100vh !important;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column !important;
}

.admin-sidebar-scroll .logo-box {
    padding: 24px 24px 12px 24px;
    flex-shrink: 0;
    /* küçülmesini engeller */
}

.admin-sidebar-scroll .admin-sidebar-scroll__inner {
    flex: 1 1 0%;
    min-height: 0 !important;
    height: auto !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0 24px 56px 24px;
    box-sizing: border-box;
}

.page-sidebar-inner.admin-sidebar-scroll__inner {
    height: auto !important;
}

/* Scroll bar daha stabil olsun */
.admin-sidebar-scroll .admin-sidebar-scroll__inner::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar-scroll .admin-sidebar-scroll__inner::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* Compact sidebar fix */
body.compact-sidebar .admin-sidebar-scroll .admin-sidebar-scroll__inner {
    overflow-y: auto !important;
}

/* Mobile */
@media (max-width: 991px) {
    .admin-sidebar-scroll {
        height: 100dvh !important;
        max-height: 100dvh !important;
    }

    .admin-sidebar-scroll .logo-box {
        padding: 20px 20px 10px 20px;
    }

    .admin-sidebar-scroll .admin-sidebar-scroll__inner {
        padding: 0 20px 72px 20px;
    }
}

/* Product categories list responsive horizontal scroll */
.variation-categories-page .col-xl,
.variation-categories-page .card,
.variation-categories-page .card-body {
    min-width: 0;
}

.variation-categories-page .variation-categories-table-wrap {
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
}

.variation-categories-page .variation-categories-table {
    width: 100%;
    min-width: 100%;
}

@media (max-width: 1366px) {
    .variation-categories-page .variation-categories-table {
        min-width: 1450px;
        width: max-content;
    }

    .variation-categories-page .variation-categories-table th,
    .variation-categories-page .variation-categories-table td {
        white-space: nowrap;
    }
}

/* Blog category select2 */
#bg_categories+.select2-container {
    width: 100% !important;
}

#bg_categories+.select2-container .select2-selection--multiple,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    min-height: 38px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 2px 6px;
    background-color: #fff;
}

#bg_categories+.select2-container .select2-search__field {
    margin-top: 6px !important;
}

#bg_categories+.select2-container .select2-selection__choice,
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #4caf50 !important;
    border: 1px solid #43a047 !important;
    color: #fff !important;
    border-radius: 0.25rem !important;
    padding: 2px 8px !important;
    margin-top: 5px !important;
}

#bg_categories+.select2-container .select2-selection__choice__remove,
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #fff !important;
    margin-right: 6px !important;
}

.select2-container--open {
    z-index: 9999;
}

.select2-dropdown {
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
}

.select2-container--default .select2-results__option {
    color: #495057 !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #4f8ee8 !important;
    color: #fff !important;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #e9f7ef !important;
    color: #2e7d32 !important;
}

/* Blog list category badge */
.blog-category-badge {
    font-size: 0.75rem !important;
}

.product-category-badge {
    font-size: 0.75rem !important;
}

/* Keep horizontal overflow only inside products table */
.product-list-page .col-xl,
.product-list-page .card,
.product-list-page .card-body {
    min-width: 0;
}

.product-list-page .table-responsive {
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
}

.product-list-page .product-list-table {
    min-width: 100%;
    width: 100%;
    table-layout: fixed;
    font-size: 12px;
}

.product-list-page .table-responsive table th,
.product-list-page .table-responsive table td {
    white-space: normal;
    word-break: break-word;
    vertical-align: middle;
}

.product-list-page .product-category-col {
    max-width: 90px;
    white-space: normal !important;
    font-size: 12px;
}

/* Keep actions column always visible on right */
.product-list-page .product-actions-col {
    position: sticky;
    right: 0;
    z-index: 2;
    background: var(--bs-table-bg, transparent);
    min-width: 140px;
    width: 140px;
}

.product-list-page .product-actions-col .btn {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 3px;
    padding: 2px 4px;
    font-size: 11px;
}

@media (max-width: 991px) {
    .product-list-page .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .product-list-page .product-list-table {
        min-width: 980px;
        width: max-content;
        table-layout: auto;
    }

    .product-list-page .product-actions-col {
        position: static;
    }

    .product-list-page .table-responsive table th,
    .product-list-page .table-responsive table td {
        white-space: nowrap;
        word-break: normal;
        padding: 10px 8px;
    }
}

/* Product categories list: keep overflow only in table area */
.product-categories-page .col-xl,
.product-categories-page .card,
.product-categories-page .card-body {
    min-width: 0;
}

.product-categories-page .product-categories-table-wrap {
    display: block;
    max-width: 100%;
    width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.product-categories-page .card-body > .row.g-2 {
    margin-left: 0;
    margin-right: 0;
}

.product-categories-page .product-categories-table {
    width: 100%;
    min-width: 100%;
}

@media (max-width: 1366px) {
    .product-categories-page .product-categories-table {
        min-width: 1450px;
        width: 1450px;
    }

    .product-categories-page .product-categories-table th,
    .product-categories-page .product-categories-table td {
        white-space: nowrap;
    }
}

@media (max-width: 1425px) {
    .product-categories-page .product-categories-toolbar__filter-col,
    .product-categories-page .product-categories-toolbar__action-col {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .product-categories-page .product-categories-toolbar__action-col {
        justify-content: flex-start !important;
        margin-top: 4px;
    }

    .product-categories-page .product-categories-toolbar__filter-form .col-12.col-md-6 {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }
}
