/**
 * Product Grid Component
 *
 * Reusable row of WooCommerce product cards (image, brand, title, price).
 * BEM prefix: .mesa-product-grid
 *
 * @package Mesa
 * @since 1.6.0
 */

/* =============================================
   Container
   ============================================= */
.mesa-product-grid {
    display: flex;
    gap: 1.5%;
    direction: rtl;
    margin-top: 40px;
}

/* =============================================
   Item (card link)
   ============================================= */
.mesa-product-grid__item {
    flex: 1 1 0;
    min-width: 0;
    text-decoration: none;
    text-align: right;
    color: inherit;
    display: flex;
    flex-direction: column;
    background-color: #FFFFFF;
    border-radius: 0;
    padding-bottom: 1.25rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mesa-product-grid__item:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.08);
}

/* =============================================
   Image
   ============================================= */
.mesa-product-grid__image-wrap {
    width: 100%;
    aspect-ratio: 264 / 260;
    overflow: hidden;
    border-radius: 0;
    flex-shrink: 0;
    background-color: var(--mesa-light-gray, #F1F1F1);
}

.mesa-product-grid__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =============================================
   Brand
   ============================================= */
.mesa-product-grid__brand {
    display: block;
    margin-top: 0.75rem;
    padding: 0 0.75rem;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 140%;
    color: #000000;
}

/* =============================================
   Title
   ============================================= */
.mesa-product-grid__title {
    margin: 0.25rem 0 0;
    padding: 0 0.75rem;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 140%;
    color: #000000;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden;
}

/* =============================================
   Price
   ============================================= */
.mesa-product-grid__price {
    display: block;
    margin-top: auto;
    padding: 0.75rem 0.75rem 0;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 140%;
    color: #08050C;
}

/* =============================================
   Responsive — Tablet (≤1200px)
   ============================================= */
@media screen and (max-width: 1200px) {
    .mesa-product-grid {
        gap: 3%;
    }
}

/* =============================================
   Responsive — Mobile (≤768px)
   ============================================= */
@media screen and (max-width: 768px) {
    .mesa-product-grid {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .mesa-product-grid__item {
        flex: 0 0 calc(50% - 0.5rem);
    }

    .mesa-product-grid__brand {
        font-size: 14px;
        margin-top: 14px;
    }

    .mesa-product-grid__title {
        font-size: 16px;
    }

    .mesa-product-grid__price {
        font-size: 16px;
        margin-top: 10px;
    }
}
