/* =============================================================
 * PRODUCT CARDS DESIGN (Full Fixed v1.7.1)
 * ============================================================= */

/* ১. গ্রিড লেআউট (সব কার্ড সমান উচ্চতার হবে) */
.best-grid, .mini-grid { 
    align-items: stretch !important; 
    display: grid !important;
    gap: 16px !important;
}
.best-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.mini-grid { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }

.best-grid > .product-card-wrap,
.mini-grid > .product-card-wrap {
    display: flex !important; 
    flex-direction: column !important;
    height: 100% !important; 
    min-width: 0 !important;
}

/* ২. কার্ডের বেসিক ডিজাইন */
.product-card-wrap .product-card,
.product-card-wrap .mini-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important;
    position: relative !important;
    display: flex !important; 
    flex-direction: column !important;
    height: 100% !important; 
    min-height: 100% !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.product-card-wrap .product-card:hover,
.product-card-wrap .mini-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08) !important;
}

/* ৩. প্রোডাক্টের ছবি */
.product-card-wrap .product-media,
.product-card-wrap .mini-media { 
    flex: 0 0 auto !important; 
    padding: 15px 15px 5px !important;
    background: #fff !important;
    aspect-ratio: 1/1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.product-card-wrap .product-media img,
.product-card-wrap .mini-media img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

/* ৪. কার্ডের বডি (নাম, দাম, বাটন) */
.product-card-wrap .product-body,
.product-card-wrap .mini-body {
    padding: 12px 14px 14px !important;
    display: flex !important; 
    flex-direction: column !important;
    flex: 1 1 auto !important; 
    min-height: 0 !important;
}

/* ৫. প্রোডাক্টের নাম */
.product-card-wrap .product-name,
.product-card-wrap .mini-name {
    margin: 0 0 10px !important;
    min-height: 44px !important; 
    max-height: 44px !important;
    overflow: hidden !important;
}
.product-card-wrap .product-name a,
.product-card-wrap .mini-name a {
    display: -webkit-box !important; 
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important; 
    overflow: hidden !important;
    text-overflow: ellipsis !important; 
    line-height: 1.35 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    text-decoration: none !important;
    word-break: break-word !important;
}
.product-card-wrap .product-name a:hover,
.product-card-wrap .mini-name a:hover {
    color: #78c93e !important;
}

/* ৬. প্রাইস (দাম) */
.product-card-wrap .price-row,
.product-card-wrap .mini-price {
    margin-top: 0 !important; 
    margin-bottom: 12px !important;
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
}
.product-card-wrap .new-price {
    color: #b13c2f !important;
    font-weight: 800 !important;
    font-size: 15px !important;
}
.product-card-wrap .old-price {
    color: #9ca3af !important;
    font-size: 13px !important;
    text-decoration: line-through !important;
}

/* ৭. ডিসকাউন্ট ব্যাজ (-২৫%) */
.product-card-wrap .discount,
.product-card-wrap .badge {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    background: #78c93e !important;
    color: #fff !important;
    padding: 4px 8px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    z-index: 2 !important;
}

/* ৮. কার্ড অ্যাকশন বাটন (Add to Cart & Buy Now) */
.product-card-wrap .card-actions {
    margin-top: auto !important; 
    padding-top: 5px !important;
    display: flex !important; 
    flex-direction: column !important;
    gap: 8px !important;
}

.product-card-wrap .btn-soft,
.product-card-wrap .btn-cart {
    width: 100% !important; 
    min-height: 42px !important;
    display: flex !important; 
    align-items: center !important;
    justify-content: center !important; 
    text-align: center !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border: none !important;
}

/* Add to Cart বাটন (সাদা/ধূসর) */
.product-card-wrap .btn-soft {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border: 1px solid #e5e7eb !important;
}
.product-card-wrap .btn-soft:hover {
    background: #e5e7eb !important;
    color: #111827 !important;
}

/* Buy Now বাটন (সবুজ) */
.product-card-wrap .btn-cart {
    background: #78c93e !important;
    color: #ffffff !important;
}
.product-card-wrap .btn-cart:hover {
    background: #5ca827 !important;
}

/* ৯. রেসপন্সিভ (মোবাইল/ট্যাব) */
@media (max-width: 1200px) {
    .best-grid { grid-template-columns: repeat(4, 1fr) !important; }
    .mini-grid { grid-template-columns: repeat(4, 1fr) !important; }
}
@media (max-width: 992px) {
    .best-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .mini-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 767px) {
    .best-grid, .mini-grid { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 10px !important;
    }
    .product-card-wrap .product-name,
    .product-card-wrap .mini-name { 
        min-height: 40px !important; 
        max-height: 40px !important; 
    }
    .product-card-wrap .product-name a,
    .product-card-wrap .mini-name a { 
        min-height: 40px !important; 
        max-height: 40px !important; 
        font-size: 12px !important; 
        line-height: 1.3 !important; 
    }
    .product-card-wrap .price-row,
    .product-card-wrap .mini-price { 
        margin-bottom: 8px !important; 
    }
    .product-card-wrap .btn-soft,
    .product-card-wrap .btn-cart { 
        min-height: 38px !important; 
        font-size: 12px !important;
    }
}