/************ responsive ****************/

/* 1. Large Tablets / Small Laptops */
@media screen and (max-width: 979px) {
    html {
        -webkit-text-size-adjust: none;
    }
    #djcatalog input.button,
    #djcatalog button,
    #djcatalog .btn {
        -webkit-appearance: none;
    }
    #djcatalog .djc_attributes table {
        position: static;
        width: 100%;
        overflow-x: none;
        display: table;
    }
    #djcatalog img {
        max-width: 100%;
        box-sizing: border-box;
    }
    #djcatalog #fbcomments,
    #djcatalog .fb-comments,
    #djcatalog .fb-comments iframe,
    #djcatalog .fb-comments span {
        width: 100% !important;
    }
} /* <--- Fixed Closure */

/* 2. Medium devices (Tablets) - 2 Columns */
@media screen and (max-width: 991.98px) {
    .djc_subcategories__grid, 
    .djc_products__grid.djc_listing_items {
        display: grid; /* Added this to ensure grid is active */
        grid-template-columns: repeat(2, 1fr) !important;
    }
} /* <--- Fixed Closure */

/* 3. Small Tablets / Large Phones */
@media screen and (max-width: 767px) {
    #djcatalog .djc_subcategories_grid .djc_subcategory,
    #djcatalog .djc_items .djc_item,
    #djcatalog .djc_related_items .djc_item {
        float: none;
        width: 100% !important;
    }
    #djcatalog .djc_subcategory_bg,
    #djcatalog .djc_item_bg {
        height: auto !important;
        margin: 0 0 10px !important;
    }
    #djcatalog .djc_filter_list li,
    #djcatalog .djc_order_buttons li {
        float: none;
        margin-top: 5px;
        margin-bottom: 5px;
    }
    /* ... other 767px styles ... */
}

/* 4. Modern Smartphones - 1 Column */
@media screen and (max-width: 575.98px) {
    .djc_subcategories__grid, 
    .djc_products__grid.djc_listing_items {
        display: grid;
        grid-template-columns: repeat(1, 1fr) !important;
    }
} /* <--- Fixed Closure */

/* 5. Legacy Smartphones / Very Small Screens */
@media screen and (max-width: 480px) {
    #djcatalog .djc_attributes table tbody td {
        display: block;
        text-align: center;
        width: 100%;
    }
}

/** Cart styling (re-opened for 979px) **/
@media screen and (max-width: 979px) {
    #djcatalog .djc_cart table {
        display: flex;
        flex-direction: column;
    }
    /* ... rest of cart styles ... */
}