/* =========================
   Products Grid
========================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Desktop */
    gap: 30px;
    width: 100%;
}

/* =========================
   Product Card
========================= */
.product-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    margin: 0;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

/* Product Image */
.image-link {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-link:hover img {
    transform: scale(1.05);
}

/* Product Content */
.product-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
}

/* Title & Price */
.title-price {
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-price h3 {
    font-size: 0.85rem;
    font-weight: 400;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.title-link {
    color: #000;
    text-decoration: none;
    max-width: 70%;
}

.title-link:hover h3 {
    text-decoration: underline;
}

.title-price .price {
    margin-left: auto;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

/* =========================
   Responsive Fixes
========================= */

/* Tablet */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

/* Mobile – GUARANTEED 2 COLUMN */
@media (max-width: 768px) {

    /* Container must not steal width */
    .site-container {
        padding-left: 4px !important;
        padding-right: 4px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Grid must allow shrink */
    .products-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        width: 100% !important;
    }

    /* Card safety */
    .product-card {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    .title-link {
        max-width: 58%;
    }
}

/* Small Mobile – still 2 column */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .title-price h3 {
        font-size: 0.8rem;
    }

    .title-price .price {
        font-size: 0.8rem;
    }
}
