/*
Theme Name: TH Shop Mania Child
Theme URI: https://adpgroupuaetek.com/
Description: Child Theme for TH Shop Mania — customized by Zaheer Arshad for ADP GROUP UAE TEK.
Author: Zaheer Arshad
Author URI: https://adpgroupuaetek.com/
Template: th-shop-mania
Version: 1.0
*/

/* === Custom CSS Starts Here === */

/* Basic product wrapper */
.thunk-product,.thunk-product-hover {
    border: 1px solid #f2f2f275;
    background: #FDFDFD;
    border-radius: 5px;
}

.thunk-woo-product-list .thunk-product-wrap:hover .thunk-product,.thunk-product:hover .thunk-product-hover {
    box-shadow: 0 2px 7px #f4f4f4; 
}

.woocommerce ul.products li.product.thunk-woo-product-list .price, 
.woocommerce .thunk-list-view ul.products li.product.thunk-woo-product-list .price,
.wc-block-grid__product-price{
    color:#3f3737;
}

/* Shopmenia layout */
.shopmenia-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.shopmenia-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.shopmenia-top-bar #shopmenia-count {
    font-weight: bold;
}

.shopmenia-top-bar .shopmenia-sort-wrapper select {
    width: 130px !important;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Products grid */
.products-loop {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(220px,1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
}

/* Load more button */
#shopmenia-load-more {
    display: block;
    margin: 30px auto;
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    background: #ff3377;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}





.shopmenia-heading {
    color: #ffffff;
    text-align: center;
    font-size: 24px; /* default desktop size */
    margin-bottom: 25px;
    font-weight: bold;
    line-height: 1.3;
}

/* Tablet */
@media (max-width: 1024px) {
    .shopmenia-heading {
        font-size: 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .shopmenia-heading {
        font-size: 18px;
        margin-bottom: 20px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .shopmenia-heading {
        font-size: 14px;
        margin-bottom: 15px;
    }
}

/* Change border color on focus */
        #shopmenia-keyword:focus {
        outline: none; /* remove default outline */
        border-color: #0000ff; /* blue border */
        box-shadow: 0 0 5px rgba(0, 0, 255, 0.5); /* optional blue glow */
        transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }


/* FORCE 4 COLUMN GRID — TH SHOP MANIA FIX */
@media (min-width: 1200px) {
    .woocommerce ul.products.thunk-woo-products-wrapper li.product {
        width: 25% !important;
        max-width: 25% !important;
        flex: 0 0 25% !important;
    }
}

/* TABLET — 2 COLUMNS */
@media (max-width: 1199px) and (min-width: 768px) {
    .woocommerce ul.products.thunk-woo-products-wrapper li.product {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
    }
}

/* MOBILE — 1 COLUMN */
@media (max-width: 767px) {
    .woocommerce ul.products.thunk-woo-products-wrapper li.product {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
}




/* Popup product image fix */
#splite_form_container #popup-product-image {
    width: 100%;
    max-width: 180px;
    height: auto;
    display: block;
    margin: 0 auto 12px;
    object-fit: contain;
}




/* ===============================
   AJAX-SAFE 4-COLUMN PRODUCT GRID
   =============================== */

#shopmenia-results {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 !important;
    padding: 0 !important;
}

/* 🔒 OVERRIDE THEME AJAX OVERRIDES */
#shopmenia-results > li.product,
#shopmenia-results > li.thunk-woo-product-list {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    float: none !important;
}

/* Inner wrappers must not restrict width */
#shopmenia-results .thunk-product,
#shopmenia-results .thunk-product-wrap,
#shopmenia-results .th-shop-mania-shop-page-layout-default {
    width: 100% !important;
}

/* Responsive */
@media (max-width:1200px){
    #shopmenia-results { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width:1024px){
    #shopmenia-results { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width:768px){
    #shopmenia-results { grid-template-columns: 1fr; }
}

