.shared-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.shared-product-card {
    display: flex;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    padding: 12px;
    border: 1px solid #eceef1;
    border-radius: 12px;
    background: #fff;
    color: inherit;
    font-family: IRANYekanWebRegular, sans-serif;
    text-decoration: none;
    transition: box-shadow .18s, transform .18s;
}

.shared-product-card:hover {
    color: inherit;
    box-shadow: 0 8px 22px rgba(16, 24, 40, .09);
    transform: translateY(-2px);
}

.shared-product-card-image,
.shared-product-card .img-div,
.shared-product-card .img-wrapper {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: .82;
    overflow: hidden;
    border-radius: 9px;
    background: #f7f7f8;
}

.shared-product-card-image img,
.shared-product-card .img-div img,
.shared-product-card .img-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.shared-product-card > img {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    height: clamp(180px, 18vw, 230px);
    border-radius: 9px;
    background: #f7f7f8;
    object-fit: contain;
}

.shared-product-card-urgent {
    position: absolute;
    top: 8px;
    right: 8px;
    margin: 0;
    padding: 4px 7px;
    border-radius: 5px;
    background: #f95738;
    color: #fff;
    font-size: 10px;
}

.shared-product-card-unavailable {
    position: absolute;
    top: 8px;
    left: 8px;
    margin: 0;
    padding: 4px 7px;
    border-radius: 5px;
    background: rgba(37, 42, 52, .82);
    color: #fff;
    font-size: 10px;
}

.shared-product-card-info,
.shared-product-card .detail {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    padding-top: 10px;
}

.shared-product-card-title,
.shared-product-card .detail .title,
.shared-product-card .title {
    display: -webkit-box;
    flex: 0 0 auto;
    min-height: 42px;
    max-height: 3.6em;
    margin: 0;
    overflow: hidden;
    color: #344054;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.8;
    white-space: normal !important;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.shared-product-card .title-row,
.discount-carousel .owl-carousel .owl-item .shared-product-card .title-row {
    display: block !important;
    height: auto !important;
    min-height: 42px;
    margin: 0 !important;
}

.discount-carousel .owl-carousel .owl-item .shared-product-card .detail .title {
    min-height: 42px;
    font-family: IRANYekanWebRegular, sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.8 !important;
    white-space: normal !important;
}

.shared-product-card-pricing {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
}

.shared-product-card-price,
.shared-product-card .detail .price-row,
.shared-product-card .detail .discount-row {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    direction: ltr;
}

.shared-product-card-price {
    flex-direction: row;
    gap: 5px;
    color: #20242c;
    direction: ltr;
}

.shared-product-card-price strong,
.shared-product-card .detail .price-row p {
    min-width: 0;
    margin: 0 !important;
    color: #20242c;
    font-family: inherit;
    font-size: 18px !important;
    font-weight: 800;
    line-height: 1.5;
    white-space: nowrap;
}

.shared-product-card-price strong { order: 2; }

.shared-product-card .detail .price-row p {
    display: flex;
    flex: 0 1 auto;
    order: 2;
    align-items: baseline;
    flex-direction: row-reverse;
    gap: 5px;
    direction: ltr;
}

.shared-product-card .detail .price-row { gap: 5px; }

.shared-product-card-price span,
.shared-product-card .detail .price-row span {
    flex: 0 0 auto;
    order: 1;
    margin: 0 !important;
    color: #667085 !important;
    font-family: inherit;
    font-size: 11px !important;
    font-weight: 400;
    white-space: nowrap;
}

.shared-product-card-price span { order: 1; }

.shared-product-card-discount,
.shared-product-card .detail .discount-row {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    direction: ltr;
}

.shared-product-card-discount del,
.shared-product-card .detail .discount-row p {
    min-width: 0;
    order: 1;
    margin: 0 !important;
    overflow: hidden;
    color: #7b7f86;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    text-decoration: line-through;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shared-product-card-discount span,
.shared-product-card .detail .discount-row span {
    display: inline-flex;
    min-width: 45px;
    height: 24px;
    flex: 0 0 auto;
    order: 2;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border: 0;
    border-radius: 999px;
    background: #ff4b2b;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.shared-product-card .detail .price-row {
    order: 2;
    margin: 6px 0 0 !important;
    padding: 0;
}

.shared-product-card .detail .discount-row {
    order: 1;
    margin: auto 0 0 !important;
    padding: 0;
}

.shared-product-card .detail:not(:has(.discount-row)) .price-row {
    margin-top: auto !important;
}

.shared-product-card.offer-card {
    flex-direction: row;
    align-items: center;
    height: 250px;
    direction: rtl;
}

.shared-product-card.offer-card .shared-product-card-image {
    flex: 0 0 140px;
    width: 140px;
    height: 100%;
    aspect-ratio: auto;
    margin: 0 0 0 12px;
}

.shared-product-card.offer-card .shared-product-card-info {
    justify-content: space-between;
    padding-top: 0;
}

.shared-product-card.offer-card .timer {
    margin-top: 8px;
}

@media (max-width: 1100px) {
    .shared-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .shared-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .shared-product-card { padding: 8px; border-radius: 10px; }
    .shared-product-card > img { height: 155px; }
    .shared-product-card-title,
    .shared-product-card .detail .title,
    .shared-product-card .title { min-height: 40px; font-size: 11px; }
    .shared-product-card .title-row,
    .discount-carousel .owl-carousel .owl-item .shared-product-card .title-row { min-height: 40px; }
    .discount-carousel .owl-carousel .owl-item .shared-product-card .detail .title {
        min-height: 40px;
        font-size: 11px !important;
    }
    .shared-product-card-price strong,
    .shared-product-card .detail .price-row p { font-size: 16px !important; }
    .shared-product-card-price span,
    .shared-product-card .detail .price-row span { font-size: 9px !important; }
    .shared-product-card-discount span,
    .shared-product-card .detail .discount-row span { min-width: 43px; height: 22px; padding: 2px 7px; font-size: 15px; }
    .shared-product-card-discount del,
    .shared-product-card .detail .discount-row p { font-size: 13px; }
    .shared-product-card.offer-card { flex-direction: column; height: auto; }
.shared-product-card.offer-card .shared-product-card-image { flex: 0 0 auto; width: 100%; height: auto; margin: 0 0 10px; aspect-ratio: .82; }
}
