.nw-d-flex{
    display: flex;
}
.nw-items-center{
    align-items: center;
}
.nw-flex-col{
    flex-direction: column;
}
.nw-gap-5{
    gap: 5px;
}
.nw-gap-10{
    gap: 10px;
}
.nw-gap-15{
    gap: 15px;
}
.nw-p-50{
    padding: 50px;
}
.nw-justify-between{
    justify-content: space-between;
}
h3 a{
    text-decoration: none !important;
}
h4{
    margin: 0 !important;
}

#nw-catalog-form h3, body.single-nw_product h3{
    line-height: 30px;
    margin: 0 0 15px 0;
    font-size: 24px;
}

.nw-catalog-container{
    display:flex; gap:30px; position: relative;
}
.nw-catalog-filters{
    width:20%;
    position: sticky;
    top: 105px;
    height: fit-content;
    align-self: flex-start;
    border:1px solid #ddd;
    background: #ffffff;
    padding: 20px;
}
.nw-catalog-filters b{
    margin: 20px 0 5px 0;
    padding-top: 20px;
    border-top: 1px solid #dddddd;
    display: block;
    font-weight: 500;
}
.nw-catalog-products{
    width:80%;
}
.nw-viw-toggle{
    display:flex; gap:10px; align-items:center;
}
.nw-catalog-sort{
    display:flex; justify-content:space-between; margin-bottom:15px;
}
.nw-catalog-sort select{
    padding: 5px 10px;
    height: auto;
    font-size: 16px;
    border: 1px solid #dddddd;
    color: #6f6f6f;
}
.nw-sort-left-col{
    flex: 1 1 auto;
}
.nw-sort-right-col{
    flex: 0 0 auto;
}
.nw-product-search{
    width: 100%;
    max-width: 360px;
    border: 1px solid #dddddd;
    border-radius: 6px;
    padding: 8px 12px;
    height: 42px;
}
.nw-products-grid{
    display:grid; grid-template-columns:repeat(3,1fr); gap:25px;
}
.nw-product-card{
    border:1px solid #ddd;
    background: #ffffff;
}
.nw-product-image{
    box-shadow: 0 0 40px 0px #efeaea;
    margin: 0 auto;
    display: block;
}
.nw-product-actions{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}
.nw-inquire-btn{
    text-transform: uppercase !important;
}

.nw-read-more{
    text-decoration: none !important;
}

.nw-pagination {
    text-align: center;
    margin: 25px 0;
}
.nw-pagination a,
.nw-pagination span {
    padding: 8px 12px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none !important;
}

.nw-pagination .current {
    background: #5f0015;
    color: #fff;
    border-color: #5f0015;
}
.nw-filter-actions{
    margin: 15px 0;
    padding-top: 15px;
}
.nw-view-toggle{
    background: #fff;
    border: 1px solid #dddddd;
    padding: 4px;
    gap: 4px;
}
.nw-view-toggle button{
    border: 0;
    background: transparent;
    color: #666;
    padding: 6px;
    line-height: 0;
    cursor: pointer;
}
.nw-view-toggle button svg{
    width: 18px;
    height: 18px;
}
.nw-view-toggle button.is-active{
    background: #5f0015;
    color: #fff;
}
.nw-view-toggle button:focus-visible{
    outline: 2px solid #5f0015;
    outline-offset: 1px;
}
.nw-product-excerpt{
    margin-bottom: 5px !important;
}
.nw-apply-filter{
    text-transform: uppercase !important;
}
.nw-filters-inner label{
    display: block;
    margin-bottom: 5px;
}
.nw-filters-inner input[type="checkbox"]{
    width: 16px;
    height: 16px;
    margin-top: 0;
}
.nw-filters-header{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.nw-filters-header label{
    font-size: 20px;
    margin: 0;
}

.nw-product-category{
    position: absolute;
    background: #80a9bd;
    padding: 2px 5px;
    margin: 10px;
    color: #fff;
    font-size: 12px;
}
.nw-product-info{
    padding: 20px;
}
.nw-products-archive{
    padding: 40px 15px;
}
.nw-archive-wrapper{
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.nw-products-grid.is-list-view{
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.nw-products-grid.is-list-view .nw-product-card{
    display: grid;
    grid-template-columns: minmax(220px, 300px) 1fr;
}
.nw-products-grid.is-list-view .nw-product-card > a{
    display: block;
    height: 100%;
}
.nw-products-grid.is-list-view .nw-product-image{
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
}

/* Single nw_product template styles */
body.single-nw_product section{
    padding: 40px 15px;
}

body.single-nw_product section.nw-related-products{
    background-color: #f4f8f9;
    border-bottom: 1px solid #d0d0d0;
}
body.single-nw_product h1{
    font-size: 40px;
    line-height: 46px;
    margin-top: 0;
    text-transform: uppercase;
}
body.single-nw_product h2{
    font-size: 34px;
    line-height: 40px;
    margin: 0 0 10px 0;
}
body.single-nw_product .nw-product-wrapper{
    max-width: 1200px;
    margin: 0 auto;
}
body.single-nw_product .nw-product-inner{
    display: flex;
    gap: 20px;
    margin-top: 20px;
}
body.single-nw_product .nw-product-gallery{
    width: 33%;
}
body.single-nw_product .nw-product-content{
    width: 60%;
}
body.single-nw_product .nw-main-img{
    width: 100%;
    border: 1px solid #ddd;
    padding: 5px;
}
body.single-nw_product .nw-thumb-wrap{
    display: flex;
    gap: 10px;
    width: 7%;
    flex-direction: column;
}
body.single-nw_product .nw-thumb{
    object-fit: cover;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: 0.2s;
    padding: 3px;
}
body.single-nw_product .nw-thumb:hover{
    border-color: #0073aa;
    transform: scale(1.05);
}
body.single-nw_product .nw-product-sku{
    margin: 14px 0 4px;
    font-size: 15px;
    line-height: 21px;
}
body.single-nw_product .nw-product-meta{
    margin: 24px 0 18px;
}
body.single-nw_product .nw-meta-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
body.single-nw_product .nw-meta-card{
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #d5d5d5;
    background: #f7f7f7;
}
body.single-nw_product .nw-meta-icon{
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    color: #5f0015;
    margin-top: 2px;
}
body.single-nw_product .nw-meta-label{
    margin: 0;
    font-size: 14px;
    line-height: 20px;
    text-transform: uppercase;
    font-weight: 500;
}
body.single-nw_product .nw-meta-value{
    margin: 0;
    font-weight: 500;
    font-size: 15px;
}
body.single-nw_product .nw-product-price{
    grid-template-columns: auto;
}
body.single-nw_product .nw-product-price .nw-meta-card{
    align-items: center;
    background: #fff0f0;
    border-color: #ffcccc;
}
body.single-nw_product .nw-product-price .nw-meta-value{
    font-size: 24px;
    color: #5f0015;
}
body.single-nw_product .nw-related-products .nw-related-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

@media (max-width: 1199px) {
    .nw-catalog-filters{
        width:25%;
        padding-right:30px;
    }
    .nw-catalog-products{
        width:75%;
    }
    .nw-products-grid{
        grid-template-columns:repeat(2,1fr); gap:15px;
    }
}

@media (max-width: 991px) {
    .nw-products-grid{
        grid-template-columns:repeat(1,1fr); gap:15px;
    }
    .nw-products-grid.is-list-view .nw-product-card{
        grid-template-columns: 1fr;
    }
    .nw-products-grid.is-list-view .nw-product-image{
        min-height: 0;
        height: auto;
    }
}

@media (max-width: 767px) {
    .nw-catalog-sort{
        flex-direction: column;
        align-items: stretch;
    }
    .nw-sort-right-col{
        justify-content: space-between;
    }
    .nw-product-search{
        max-width: 100%;
    }
    .nw-catalog-container{
        flex-direction: column;
    }
    .nw-catalog-filters, .nw-catalog-products{
        width:100%;
    }
    .nw-catalog-filters{
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 10;
        padding: 30px;
        transition: left 0.3s ease; /* animation */
        background: #00000080;
        display: flex;
        align-items: center;
        height: auto;
        align-self: normal;
    }
    .nw-filters-inner{
        background: #fff;
        border: 1px solid #555;
        padding: 30px;
        width: 100%;
        max-height: 90vh;
        overflow: auto;
    }
    .nw-catalog-filters-hidden .nw-catalog-filters{
        left: -100vw
    }
    .nw-products-grid{
        grid-template-columns: repeat(1, 1fr);
    }
    .nw-toggle-filters{
        display: inline-block !important;
        padding: 5px 20px;
        border-radius: 100px;
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 999;
        border: 1px solid #333;
        box-shadow: 0 0 20px 0px #aaa;
        background: #5f0015;
        font-size: larger;
        text-decoration: none !important;
        cursor: pointer;
        color: #ffffff !important
    }
    .nw-toggle-filters:hover{
        background: #38000f;
    }
    
}

@media (max-width: 767px) {
    body.single-nw_product .nw-product-inner{
        flex-direction: column;
    }
    body.single-nw_product .nw-thumb-wrap{
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
    }
    body.single-nw_product .nw-thumb{
        max-width: 20%;
    }
    body.single-nw_product .nw-thumb-wrap,
    body.single-nw_product .nw-product-gallery,
    body.single-nw_product .nw-product-content{
        width: 100%;
    }
    body.single-nw_product .nw-meta-grid{
        grid-template-columns: 1fr;
        gap: 12px;
    }
    body.single-nw_product .nw-meta-value{
        font-size: 24px;
    }
    body.single-nw_product .nw-related-products .nw-related-grid{
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 1199px) {
    body.single-nw_product .nw-related-products .nw-related-grid{
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    body.single-nw_product .nw-related-products .nw-related-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
