/* ===================================================================
   Product card - fixed height, a tall cover can never stretch it.
=================================================================== */

.cw-card {
    display: flex;
    flex-direction: column;
    width: 193px;
    height: 278px;
    flex: 0 0 auto;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow .18s ease, border-color .18s ease;
}
.cw-card:hover { border-color: #E0D2CB; box-shadow: 0 10px 24px rgba(33, 28, 27, .08); }

.cw-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    min-height: 0;
}

.cw-card__cover {
    position: relative;
    width: 100%;
    height: 168px;
    flex: 0 0 168px;
    background: var(--white);
    overflow: hidden;
}
.cw-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    user-select: none;
    -webkit-user-drag: none;
}

.cw-card__body {
    padding: 9px 10px 11px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.cw-card__title {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--ink);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: calc(13.5px * 1.45 * 2);
}

.cw-card__prices {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.cw-card__old-row { display: flex; align-items: center; gap: 7px; height: 18px; }
.cw-card__old-row--empty { visibility: hidden; }

.cw-card__discount {
    background: var(--brand);
    color: #fff;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 7px;
    flex: 0 0 auto;
}

.cw-card__price-old { font-size: 13px; color: var(--muted); text-decoration: line-through; }

.cw-card__price-new { font-size: 15.5px; font-weight: 800; color: var(--ink); line-height: 1.4; }
.cw-card__price-new .cw-toman { margin-inline-start: 4px; }

.cw-card__oos {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    line-height: 1.6;
}

@media (max-width: 560px) {
    .cw-card { width: 170px; height: 261px; }
    .cw-card__cover { height: 153px; flex: 0 0 153px; }
}
