/* Product cards: 2 per row on phones (grids with .product-grid) */
@media (max-width: 639px) {
    .product-grid {
        gap: 12px !important;
    }

    .product-grid > div {
        border-radius: 14px !important;
    }

    /* Image */
    .product-grid > div > div:first-child {
        height: auto !important;
        aspect-ratio: 1 / 1;
    }

    .product-grid .top-4 { top: 8px !important; }
    .product-grid .left-4 { left: 8px !important; }
    .product-grid .right-4 { right: 8px !important; }
    .product-grid .bottom-4 { bottom: 8px !important; }

    .product-grid > div > div:first-child > span {
        font-size: 9px !important;
        padding: 3px 7px !important;
        letter-spacing: .03em;
    }

    .product-grid > div > div:first-child > button {
        width: 30px !important;
        height: 30px !important;
        font-size: 13px;
    }

    /* Body */
    .product-grid > div > div:last-child {
        padding: 10px 10px 12px !important;
    }

    .product-grid > div > div:last-child > span:first-child {
        font-size: 9px !important;
    }

    .product-grid h3 {
        font-size: 15px !important;
        line-height: 1.25 !important;
        white-space: normal !important;
        margin: 2px 0 6px !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-grid > div > div:last-child > p {
        display: none;
    }

    /* Price + "Voir" */
    .product-grid .flex.justify-between {
        flex-direction: column;
        align-items: stretch !important;
        gap: 8px;
    }

    .product-grid .text-2xl,
    .product-grid .text-xl:not(h3) {
        font-size: 15px !important;
        line-height: 1.3 !important;
        white-space: nowrap;
    }

    .product-grid .line-through {
        font-size: 11px !important;
    }

    .product-grid .flex.justify-between > a {
        text-align: center;
        font-size: 12px !important;
        padding: 6px 8px !important;
    }

    /* Add to cart */
    .product-grid button.mt-3 {
        margin-top: 8px !important;
        padding: 8px 6px !important;
        font-size: 12px !important;
        gap: 6px !important;
    }
}

/* Category cards: 2 per row, text over the image (grids with .category-grid) */
@media (max-width: 767px) {
    .category-grid > a {
        position: relative;
        border-radius: 16px !important;
        box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
    }

    .category-grid > a > div:first-child {
        height: auto !important;
        aspect-ratio: 3 / 4;
    }

    .category-grid > a:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .category-grid > a:last-child:nth-child(odd) > div:first-child {
        aspect-ratio: 16 / 9;
    }

    .category-grid > a > div:first-child > .absolute {
        background: linear-gradient(to top, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .25) 45%, rgba(0, 0, 0, 0) 70%) !important;
    }

    .category-grid > a > div:last-child {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
        padding: 14px 12px !important;
        text-align: left !important;
        background: transparent;
        color: #fff;
    }

    .category-grid h3 {
        font-size: 19px !important;
        line-height: 1.15 !important;
        margin: 0 0 6px !important;
        color: #fff;
        text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .category-grid > a > div:last-child > p {
        display: none;
    }

    .category-grid > a > div:last-child > span {
        font-size: 10px !important;
        font-weight: 600;
        letter-spacing: .14em;
        text-transform: uppercase;
        text-decoration: none !important;
        color: #D4B483;
    }

    .category-grid > a > div:last-child > span::after {
        content: " \2192";
    }
}
