/* =========================
   CATALOG PRODUCT CARDS
   Consistent Height & Layout
   ========================= */

.product_grid_inner .card {
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product_grid_inner .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.product_grid_inner .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 12px;
}

/* Product Image Container - Fixed Height */
.product_grid_inner .card-body > a:first-child {
    display: block;
    height: 200px;
    min-height: 200px;
    max-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 12px;
}

.product_grid_inner .card-body > a:first-child img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Product Title - Fixed Height with Ellipsis */
.product_grid_inner .card-title {
    min-height: 48px;
    max-height: 48px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.product_grid_inner .card-title a {
    display: block;
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product_grid_inner .card-title a:hover {
    color: #0066ff;
}

/* Rating Section - Fixed Height */
.product_grid_inner .product-rating-section {
    min-height: 20px;
    max-height: 20px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.product_grid_inner .product-rating-section .text-warning {
    margin-bottom: 0;
}

/* Brand & Code Section - Fixed Height */
.product_grid_inner .card-body > .small.text-muted {
    min-height: 40px;
    max-height: 40px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 12px;
    line-height: 1.4;
}

.product_grid_inner .card-body > .small.text-muted > div {
    margin-bottom: 2px;
}

/* Price Section - Fixed Height */
.product_grid_inner .card-body > .mb-2:has(.fw-bold) {
    min-height: 50px;
    max-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 8px;
}

/* Stock Section - Fixed Height */
.product_grid_inner .card-body > .small.text-success {
    min-height: 20px;
    max-height: 20px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    font-size: 12px;
}

/* Button Section - Fixed at Bottom */
.product_grid_inner .card-body > .mt-auto {
    margin-top: auto;
    padding-top: 8px;
}

.product_grid_inner .card-body > .mt-auto .btn {
    min-height: 38px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.product_grid_inner .card-body > .mt-auto .btn:hover {
    transform: scale(1.02);
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .product_grid_inner .card-body > a:first-child {
        height: 180px;
        min-height: 180px;
        max-height: 180px;
    }
    
    .product_grid_inner .card-title {
        min-height: 44px;
        max-height: 44px;
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .product_grid_inner .card-body > a:first-child {
        height: 160px;
        min-height: 160px;
        max-height: 160px;
    }
    
    .product_grid_inner .card-title {
        min-height: 40px;
        max-height: 40px;
        font-size: 12px;
    }
}

