.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: #e4d3b0;
    box-shadow: 0 22px 50px rgba(15, 23, 42, .11);
}

.product-card__media {
    position: relative;
    background: linear-gradient(180deg, #fff 0%, #faf7f1 100%);
}

.product-card__image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    padding: 18px;
    text-decoration: none;
    color: #1f2937;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .25s ease;
}

.product-card:hover .product-card__image img {
    transform: scale(1.045);
}

.product-card__placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border: 1px dashed #d9dee8;
    border-radius: 14px;
    color: #8a94a6;
    font-size: 13px;
}

.product-card__badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .10);
}

.product-card__badge--discount {
    top: 12px;
    left: 12px;
    color: #fff;
    background: linear-gradient(135deg, #111827, #c59b45);
}

.product-card__badge--stock {
    left: 12px;
    bottom: 12px;
    color: #374151;
    background: rgba(255, 255, 255, .94);
    border: 1px solid #edf0f5;
}

.product-card__badge--stock.is-out-stock {
    color: #991b1b;
    background: #fff1f2;
    border-color: #fecdd3;
}

.product-card__wishlist {
    position: absolute;
    z-index: 3;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 1px solid #edf0f5;
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    color: #111827;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .10);
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.product-card__wishlist:hover {
    transform: scale(1.06);
    border-color: #c59b45;
    background: #fffaf0;
}

.product-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
}

.product-card__brand {
    min-height: 16px;
    color: #8a6b24;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.product-card__title {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    color: #111827;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
    text-decoration: none;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card__title:hover {
    color: #9a7228;
}

.product-card__category {
    overflow: hidden;
    color: #6b7280;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.product-card__price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.product-card__price {
    color: #111827;
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -.03em;
}

.product-card__old-price {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 700;
}

.product-card__saving {
    min-height: 18px;
    color: #b45309;
    font-size: 12px;
    font-weight: 800;
}

.product-card__saving--muted {
    color: #9ca3af;
    font-weight: 700;
}

.product-card__cart {
    margin-top: 4px;
}

.product-card__add {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #111827, #2f3542);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(17, 24, 39, .18);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.product-card__add:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(17, 24, 39, .24);
}

.product-card__add:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.csh-products .product-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

/* Tablet */
@media (max-width: 1200px) {
    .csh-products .product-grid,
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .csh-products .product-grid,
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }
}

/* Mobile premium */
@media (max-width: 640px) {
    .csh-products {
        padding-inline: 0 !important;
    }

    .csh-products .product-grid,
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
    }

    .product-card {
        border-radius: 14px;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
    }

    .product-card:hover {
        transform: none;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
    }

    .product-card__image {
        aspect-ratio: 1 / 1.05;
        padding: 10px;
    }

    .product-card__badge {
        min-height: 22px;
        padding: 4px 7px;
        font-size: 10px;
        box-shadow: 0 8px 16px rgba(15, 23, 42, .10);
    }

    .product-card__badge--discount {
        top: 8px;
        left: 8px;
    }

    .product-card__badge--stock {
        display: none;
    }

    .product-card__wishlist {
        top: 8px;
        right: 8px;
        width: 31px;
        height: 31px;
        font-size: 18px;
        box-shadow: 0 8px 16px rgba(15, 23, 42, .10);
    }

    .product-card__body {
        padding: 9px;
        gap: 5px;
    }

    .product-card__brand {
        min-height: 13px;
        font-size: 9px;
        letter-spacing: .06em;
    }

    .product-card__title {
        min-height: 36px;
        font-size: 12px;
        line-height: 1.45;
    }

    .product-card__category {
        display: none;
    }

    .product-card__price-row {
        gap: 5px;
    }

    .product-card__price {
        font-size: 15px;
        line-height: 1.1;
    }

    .product-card__old-price {
        font-size: 11px;
    }

    .product-card__saving {
        min-height: 14px;
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .product-card__saving--muted {
        display: none;
    }

    .product-card__cart {
        margin-top: 2px;
    }

    .product-card__add {
        min-height: 36px;
        border-radius: 10px;
        font-size: 11px;
        box-shadow: none;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .csh-products .product-grid,
    .product-grid {
        gap: 8px !important;
    }

    .product-card__body {
        padding: 8px;
    }

    .product-card__title {
        font-size: 11.5px;
    }

    .product-card__price {
        font-size: 14px;
    }

    .product-card__old-price,
    .product-card__saving {
        font-size: 10px;
    }

    .product-card__add {
        min-height: 34px;
        font-size: 10.5px;
    }
}

.product-card.is-out-of-stock .product-card__image img {
    opacity: .48;
    filter: grayscale(.25);
}

.product-card.is-out-of-stock .product-card__add {
    background: #d1d5db;
    color: #6b7280;
    box-shadow: none;
}

.product-card__saving--out {
    color: #991b1b;
}

.product-card.is-out-of-stock .product-card__image img {
    opacity: 1;
    filter: none;
}

.product-card.is-out-of-stock .product-card__add,
.product-card__add.is-out-of-stock {
    cursor: not-allowed !important;
    background: #d1d5db !important;
    color: #6b7280 !important;
    box-shadow: none !important;
}

.product-card__saving--out {
    color: #991b1b !important;
}
