/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       Prince Shojib
 Template:     woodmart
 Version:      1.0.0
*/

/* ===================================================
   ক্যাটাগরি পেজ নেভিগেশন ফিক্স (নিরাপদ সিএসএস)
   =================================================== */

/* ০ প্রোডাক্টের ফাঁকা ক্যাটাগরি হাইড */
.woodmart-product-categories .cat-item:has(.count:contains("(0)")),
.wd-nav-product-cat .cat-item:has(.count:contains("(0)")),
.page-title-categories .cat-item:has(.count:contains("(0)")) {
    display: none !important;
}

/* টাইটেলের নিচের অতিরিক্ত ক্যাটাগরি লিস্ট হাইড করে পেজ ক্লিন রাখা */
.tax-product_cat .woodmart-product-categories,
.tax-product_cat .wd-nav-product-cat,
.tax-product_cat .page-title-categories {
    display: none !important;
}

/* ========================================================
   TESKE TOOLS - PREMIUM SUBCATEGORY BOXES DESIGN
   ======================================================== */

.woodmart-product-categories,
.wd-nav-product-cat,
.page-title-categories {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px 14px !important;
    margin: 20px auto 35px auto !important;
    padding: 0 15px !important;
    max-width: 1280px !important;
}

.woodmart-product-categories .cat-item,
.wd-nav-product-cat .cat-item,
.page-title-categories .cat-item {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woodmart-product-categories .cat-item a,
.wd-nav-product-cat .cat-item a,
.page-title-categories .cat-item a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 18px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    color: #1a202c !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

/* প্রোডাক্ট কাউন্ট ব্যাজ */
.woodmart-product-categories .cat-item .count,
.wd-nav-product-cat .cat-item .count,
.page-title-categories .cat-item .count {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f1f5f9 !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 2px 7px !important;
    border-radius: 20px !important;
    transition: all 0.25s ease !important;
}

/* হোভার ইফেক্ট */
.woodmart-product-categories .cat-item a:hover,
.wd-nav-product-cat .cat-item a:hover,
.page-title-categories .cat-item a:hover {
    background: #fffaf0 !important;
    border-color: #f39c12 !important;
    color: #d97706 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.18) !important;
}

.woodmart-product-categories .cat-item a:hover .count,
.wd-nav-product-cat .cat-item a:hover .count,
.page-title-categories .cat-item a:hover .count {
    background: #f39c12 !important;
    color: #ffffff !important;
}

/* একটিভ ক্যাটাগরি */
.woodmart-product-categories .cat-item.current-cat a,
.wd-nav-product-cat .cat-item.current-cat a,
.page-title-categories .cat-item.current-cat a {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
    border-color: #d35400 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(243, 156, 18, 0.3) !important;
}

.woodmart-product-categories .cat-item.current-cat a .count,
.wd-nav-product-cat .cat-item.current-cat a .count,
.page-title-categories .cat-item.current-cat a .count {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

/* ========================================================
   TESKE TOOLS - PRODUCT GRID IMAGE UNIFORM SIZE FIX
   ======================================================== */

/* সব প্রোডাক্ট গ্রিডের ছবির বক্সের সমান হাইট ও রেশিও নিশ্চিত করা */
.products .product-grid-item .product-element-top,
.products .wd-product .product-element-top,
.product-grid-item .product-wrapper .product-element-top {
    height: 280px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    padding: 12px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* প্রোডাক্টের ছবি যেন বেশি বড় না হয় এবং কাট না যায় (Contain Fit) */
.products .product-grid-item .product-image-link,
.products .wd-product .product-image-link {
    height: 100% !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.products .product-grid-item img,
.products .wd-product img,
.product-grid-item .product-wrapper img {
    max-height: 250px !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    display: block !important;
}

/* কার্ডের নিচের টেক্সট ও প্রাইস সমান সাজানো রাখা */
.product-grid-item .product-information,
.wd-product .product-information {
    text-align: center !important;
    padding-top: 10px !important;
}

@media (max-width: 768px) {
    .products .product-grid-item .product-element-top,
    .products .wd-product .product-element-top {
        height: 200px !important;
    }
    .products .product-grid-item img,
    .products .wd-product img {
        max-height: 180px !important;
    }
}
