/* ===== Extracted from second_category.php style block 1 ===== */
/*  */
    .bc-menu-toggle {
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s;
        font-size: 1.2em; /*  */
        font-weight: 700; /*  */
    }
    .bc-menu-toggle::before {
        content: '+';
        transition: all 0.2s;
        margin-top: -1px; /*  */
    }
    .bc-dropdown.active .bc-menu-toggle::before {
        content: '-';
    }

    /*  */
    .bc-toggle {
        font-size: 20px;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 2px; /*  */
        width: 20px;
        height: 20px;
        margin-top: -8px;
        padding: 4px 4px; /*  */
    }
    /*  */
    .bc-dropdown {
        position: relative;
    }
    .breadcrumb.breadcrump-light.d-flex.justify-content-center.m-0 .breadcrumb-item.small {
        color: black !important;
    }

    .bc-menu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 166px;
        background: white;
        border: 1px solid #ddd;
        box-shadow: 0 3px 6px rgba(0,0,0,0.1);
        opacity: 0;
        visibility: hidden;
        transition: all 0.2s;
        z-index: 1000;
    }

    .bc-dropdown.active .bc-menu {
        opacity: 1;
        visibility: visible;
    }

    .bc-item {
        margin-top: 5px;
    }

    /*  */
    .bc-item.has-children {
        position: relative;
    }

    .bc-submenu {
        position: absolute;
        left: 0;
        top: 100%;
        margin-top: -1px;
        min-width: 166px;
        background: white;
        border: 1px solid #ddd;
        opacity: 0;
        visibility: hidden;
        transition:
                opacity 0.2s ease,
                visibility 0.2s ease,
                transform 0.2s ease; /* transform */
        transform: translateY(5px);
    }

    /*.bc-item.has-children:hover > .bc-submenu,*/
    /*.bc-item.has-children:focus-within > .bc-submenu {*/
    /*    opacity: 1;*/
    /*    visibility: visible;*/
    /*}*/

    .bc-link-wrapper {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .bc-submenu-toggle {
        width: 34px;  /*  */
        height: 34px; /*  */
        /*font-size: 1.5em !important; !*  *!*/
        /*font-weight: 800; !*  *!*/
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s;
        font-weight: bold;
        background-image: none !important;
    }
    .bc-submenu-toggle::before {
        content: '+';
        color: #333;
        font-size: 1.2em;
        transition: transform 0.2s;
        margin-top: -1px; /*  */
    }
    .bc-item.has-children > .bc-submenu {
        opacity: 0;
        visibility: hidden;
        transform: translateY(5px);
    }

    .bc-item.has-children.submenu-open > .bc-submenu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /*  */
    .bc-item.has-children.submenu-open > .bc-link-wrapper > .bc-submenu-toggle::before {
        content: '-';
    }
    .bc-link {
        /*width: 100%!important;*/
        display: block;
        padding: 2px 2px;
        color: #333;
        text-decoration: none;
        transition: none; /*  */
    }
    ul{padding-left:0rem;}

    /*.bc-link:hover {*/
    /*    background: #f8f9fa;*/
    /*}*/

    .bc-link:hover {
        color: #333; /*  */
        background: none; /*  */
    }

    .bc-empty {
        padding: 12px;
        color: #666;
        font-style: italic;
    }
    @media (max-width: 576px) {
        .bc-submenu {
            left: 0 !important;
            transform: none !important;
            width: 100% !important;
        }
    }

/* ===== Extracted from second_category.php style block 2 ===== */
.bc-submenu {
        background-color: white;
        z-index: 999;
    }

/* ===== Extracted from second_category.php style block 3 ===== */
/*  */
                    .product-grid {
                        display: grid;
                        grid-template-columns: repeat(2, 1fr);
                        gap: 20px;
                        margin: 20px 0;
                    }
                    @media (min-width: 992px) {
                        .product-grid {
                            grid-template-columns: repeat(4, 1fr);
                        }
                    }

                    /*  */
                    .product-card {
                        /*  block， flex， */
                        display: block;
                        background: #ffffff;
                        border: none;
                        border-radius: 8px;
                        overflow: hidden;
                        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
                        transition: transform 0.3s ease, box-shadow 0.3s ease;
                    }
                    .product-card:hover {
                        transform: translateY(-5px);
                        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
                    }

                    /* ： */
                    .product-image {
                        width: 100%;
                        aspect-ratio: 1 / 1;
                        overflow: hidden;
                        background: #f5f5f5;
                    }
                    .product-image img {
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                        object-position: center;
                        display: block;
                    }

                    /* ：、、 padding */
                    .product-info {
                        display: block;         /* Block  100%  */
                        box-sizing: border-box; /* padding  */
                        width: 100%;
                        padding: 4px 8px;       /*  4px， 8px */
                        text-align: left;       /*  */
                    }

                    /*  */
                    .product-title {
                        font-size: 1.1rem;
                        margin: 0 0 2px 0;
                        font-weight: bold;
                        color: #333;
                    }
                    .product-title a {
                        text-decoration: none;
                        color: inherit;
                    }

                    /*  */
                    .rating {
                        display: inline-flex;
                        align-items: center;
                        margin: 0 0 4px 0;
                        font-size: 0.9rem;
                        color: #ffc107;
                    }
                    .rating span {
                        margin-left: 5px;
                        color: #888;
                        font-size: 0.85rem;
                    }

                    /*  */
                    .product-price {
                        display: block;
                        font-size: 1.2rem;
                        color: #0d6efd;
                        font-weight: bold;
                        margin-top: 2px;
                    }

/* ===== Extracted from second_category.php style block 4 ===== */
.product-title {
                        display: -webkit-box;
                        -webkit-box-orient: vertical;
                        overflow: hidden;
                        text-overflow: ellipsis;
                    }

                    @media (max-width: 767px) {
                        .product-title {
                            -webkit-line-clamp: 2; /*  2  */
                        }
                    }

                    @media (min-width: 768px) {
                        .product-title {
                            -webkit-line-clamp: 3; /*  3  */
                        }
                    }




                    .product-card {
                        position: relative;
                        display: flex;
                        flex-direction: column;
                        align-items: center;
                        justify-content: space-between;
                    }
                    .thumb-right {
                        position: relative;
                        display: block;
                    }

                    .thumb-loading-overlay {
                        position: absolute;
                        top: 0;
                        left: 0;
                        width: 100%;
                        height: 100%;
                        background: rgba(255, 255, 255, 0.9);
                        transition: opacity 0.3s ease;
                        z-index: 2;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        pointer-events: none; /*  */
                    }


                    .thumb-loading-overlay {
                        position: absolute;
                        top: 0;
                        left: 0;
                        width: 100%;
                        height: 100%;
                        background: rgba(255, 255, 255, 0.9);
                        transition: opacity 0.3s ease;
                        z-index: 2;
                    }

                    .thumb-loading-spinner {
                        width: 24px;
                        height: 24px;
                        border: 3px solid #f3f3f3;
                        border-top: 3px solid #3498db;
                        border-radius: 50%;
                        animation: thumb-spin 1s linear infinite;
                        margin-right: 8px;
                    }

                    .thumb-loading-text {
                        color: #666;
                        font-size: 0.875rem;
                        font-family: system-ui, sans-serif;
                    }

                    @keyframes thumb-spin {
                        0% { transform: rotate(0deg); }
                        100% { transform: rotate(360deg); }
                    }

/* ===== Extracted from second_category.php style block 5 ===== */
.title-max-45 {
                    display: -webkit-box;
                    -webkit-box-orient: vertical;
                    -webkit-line-clamp: 2;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    white-space: normal;
                }
                .thumb-loading-overlay {
                    position: absolute;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    background: rgba(255, 255, 255, 0.9);
                    transition: opacity 0.3s ease;
                    z-index: 2;
                }

                .thumb-loading-spinner {
                    width: 24px;
                    height: 24px;
                    border: 3px solid #f3f3f3;
                    border-top: 3px solid #3498db;
                    border-radius: 50%;
                    animation: thumb-spin 1s linear infinite;
                    margin-right: 8px;
                }

                .thumb-loading-text {
                    color: #666;
                    font-size: 0.875rem;
                    font-family: system-ui, sans-serif;
                }

                @keyframes thumb-spin {
                    0% { transform: rotate(0deg); }
                    100% { transform: rotate(360deg); }
                }

/* ===== Extracted from second_category.php style block 6 ===== */
/*  */
    .pagination-container {
        display: flex;
        justify-content: center;
        flex-wrap: wrap; /*  */
    }

    .pagination {
        display: flex;
        flex-wrap: wrap; /*  */
        padding-left: 0;
        list-style: none;
        justify-content: center;
    }

    .pagination .page-link {
        color: #007bff;
        border: 1px solid #dee2e6;
    }

    .pagination .page-item.active .page-link {
        background-color: #007bff;
        border-color: #007bff;
        color: white;
    }

    .pagination .page-link:hover {
        background-color: #0056b3;
        color: white;
    }

    .page-item.disabled .page-link {
        pointer-events: none;
        background-color: #e9ecef;
        color: #6c757d;
    }

    /*  */
    @media (max-width: 768px) {
        .pagination {
            flex-wrap: wrap; /*  */
        }

        .pagination .page-item {
            margin: 0 2px; /*  */
        }

        .pagination .page-link {
            padding: 0.25rem 0.5rem; /*  */
        }
    }

    /*  */
    #pageSelector {
        margin-right: 10px;
        width: 80px; /*  */
    }
    .pagination .page-link {
        color: #007bff;
        border: 1px solid #dee2e6;
    }

    .pagination .page-item.active .page-link {
        background-color: #007bff;
        border-color: #007bff;
        color: white;
    }

    .pagination .page-link:hover {
        background-color: #0056b3;
        color: white;
    }

    .page-item.disabled .page-link {
        pointer-events: none;
        background-color: #e9ecef;
        color: #6c757d;
    }

    #pageSelector {
        margin-right: 10px;
    }
    .title-max-45 {
        height: auto;

        max-height: 60px;
    }


    .card-header.position-relative.border-0.p-0 {
        position: relative;
        width: 100%;
        /*height: 350px;*/
    }

    .defualt-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0;
    }


    @media (max-width: 768px) {
        .card-header.position-relative.border-0.p-0 {
            position: relative;
            width: 100%;
            height: auto;
            max-height: 350px;
        }

        .defualt-image {
            width: 100%;
            height: auto;
            object-fit: contain;
        }

    }


    .card-body-in {
        flex: 1 1 auto;
        padding-top: 6px;
        padding-left: 4px!important;
        padding-bottom: 12px;
        color: var(--bs-card-color);
    }
    .my-product-box {
        background: #ffffff !important;
        border: 1px solid #ddd !important;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        /*padding: 16px;*/
        margin: 8px 0;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .my-product-box:hover {
        transform: translateY(-5px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    }

/* ===== Styles moved from the two original inline style attributes ===== */
.card-header.position-relative.border-0.p-0 {
    padding: 0 !important;
}

.card-header.position-relative.border-0.p-0 img.defualt-image {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
}
