
/* Dynamic Shop Product Improvements */

.shop-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.shop-product-card .shop-product-body {
    flex: 1;
}

.shop-product-card form {
    width: 100%;
    margin-top: auto;
}

.shop-product-card form .shop-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    cursor: pointer;
}

.shop-product-image {
    display: block;
    overflow: hidden;
}

.shop-product-image img {
    width: 100%;
    height: 190px;
    object-fit: contain;
}

.shop-category-card .category-placeholder {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f5f8;
    color: #a5adba;
    font-size: 35px;
}

.product-filter .btn {
    border-radius: 8px;
    padding: 11px;
    font-weight: 600;
}

.shop-pagination {
    margin-top: 30px;
}

.shop-pagination nav {
    width: 100%;
}

@media (max-width: 575px) {
    .shop-product-image img {
        height: 145px;
    }
}

/* Category dropdown */
.category-dropdown-item {
    border-bottom: 1px solid #eeeeee;
    padding: 8px 0;
}

.category-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.category-checkbox {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.category-checkbox span {
    overflow-wrap: anywhere;
}

.subcategory-toggle {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.subcategory-toggle:hover {
    background: #f5f5f5;
}

.subcategory-toggle i {
    transition: transform .2s ease;
}

.subcategory-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* Nested subcategory list */
.subcategory-filter-list {
    padding: 8px 0 4px 22px;
    margin-left: 7px;
    border-left: 2px solid #eeeeee;
}

.subcategory-filter-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
}

.subcategory-filter-check:last-child {
    margin-bottom: 0;
}

.subcategory-filter-check span {
    overflow-wrap: anywhere;
}

/* ==========================================
   PRODUCT TOOLBAR - RESPONSIVE DESIGN
========================================== */

.product-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    margin-bottom: 22px;
    padding: 18px;
    background: #fff;
    border: 1px solid #e8ebef;
    border-radius: 10px;
    box-sizing: border-box;
}

.product-toolbar > div:first-child {
    min-width: 0;
}

.product-toolbar h2 {
    margin: 0 0 5px;
    font-size: 22px;
    font-weight: 700;
    color: #172337;
}

.product-toolbar p {
    margin: 0;
    font-size: 12px;
    color: #7b8492;
}

.product-toolbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

/* SEARCH BAR */
.product-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 300px;
    min-width: 0;
    height: 42px;
    margin: 0;
    padding: 0 42px 0 38px;
    background: #fff;
    border: 1px solid #dfe4eb;
    border-radius: 7px;
    box-sizing: border-box;
    overflow: hidden;
}

.product-search > i.bi-search {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    display: block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    font-size: 14px;
    color: #7b8492;
    pointer-events: none;
}

.product-search input[type="search"] {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    box-shadow: none;
    font-size: 12px;
    color: #172337;
    appearance: none;
    -webkit-appearance: none;
}

.product-search input[type="search"]::-webkit-search-decoration,
.product-search input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.product-search input[type="search"]::placeholder {
    color: #9299a4;
    opacity: 1;
}

.product-search button {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0 6px 6px 0;
    background: #f5f7fa;
    color: #202a38;
    cursor: pointer;
}

.product-search button i {
    position: static;
    display: block;
    font-size: 15px;
    line-height: 1;
    transform: none;
}

/* SORT DROPDOWN */
.product-toolbar-right > select,
#productSort {
    flex: 0 0 165px;
    width: 165px;
    max-width: 100%;
    height: 42px;
    margin: 0;
    padding: 0 30px 0 11px;
    border: 1px solid #dfe4eb;
    border-radius: 7px;
    background-color: #fff;
    color: #263244;
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
}

/* TABLET */
@media (max-width: 991.98px) {
    .product-toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .product-toolbar-right {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 165px;
        width: 100%;
        gap: 10px;
    }

    .product-search {
        max-width: none;
        width: 100%;
    }

    .product-toolbar-right > select,
    #productSort {
        width: 100%;
        min-width: 0;
    }
}

/* MOBILE */
@media (max-width: 575.98px) {
    .product-toolbar {
        width: 100%;
        padding: 13px;
        margin-bottom: 16px;
        gap: 12px;
        border-radius: 8px;
    }

    .product-toolbar h2 {
        font-size: 19px;
        line-height: 1.3;
    }

    .product-toolbar p {
        font-size: 11px;
        line-height: 1.5;
    }

    .product-toolbar-right {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        width: 100%;
    }

    .product-search {
        width: 100%;
        max-width: none;
        height: 42px;
    }

    .product-search input[type="search"] {
        font-size: 13px;
    }

    .product-toolbar-right > select,
    #productSort {
        width: 100%;
        height: 42px;
        font-size: 12px;
    }
}


