/* ==========================================================
   DIGBANG RECIPE — RELATED PRODUCT CARD
========================================================== */

.db-related-product-card {
    position: relative;

    display: flex;
    flex-direction: column;

    width: 336px;
    height: 386.62px;

    box-sizing: border-box;
    overflow: hidden;

    background: #FFFFFF;
    border: 1px solid #F6EDDE;
    border-radius: 12.92px;

    direction: rtl;
}

/*
 * لینک نامرئی روی کل کارت
 */
.db-related-product-card__main-link {
    position: absolute;
    inset: 0;
    z-index: 1;

    border-radius: inherit;
}

/* =======================
   IMAGE
======================= */

.db-related-product-card__media {
    width: 100%;
    height: 246px;
    flex: 0 0 246px;

    overflow: hidden;

    background: #FFFFFF;
    border-radius: 12.92px 12.92px 0 0;
}

.db-related-product-card__image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

/* =======================
   CONTENT
======================= */

/*
 * با توجه به ارتفاع کل 386.62 و ارتفاع تصویر 246،
 * ارتفاع باقی‌مانده کارت 140.62px است.
 */
.db-related-product-card__content {
    position: relative;

    display: flex;
    flex-direction: column;

    width: 100%;
    height: 140.62px;
    flex: 0 0 140.62px;

    box-sizing: border-box;
    padding: 17.23px;

    background: #FDF6F6;
}

.db-related-product-card__top-row {
    display: flex;
    align-items: baseline;
    gap: 10px;

    min-width: 0;
}

.db-related-product-card__title {
    min-width: 0;
    margin: 0;

    color: #030100;

    font-family: Vazirmatn, sans-serif;
    font-size: 23.69px;
    font-weight: 700;
    line-height: 1.35;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.db-related-product-card__weight {
    flex: 0 0 auto;

    color: #8E7D71;

    font-family: Vazirmatn, sans-serif;
    font-size: 16.15px;
    font-weight: 400;
    line-height: 1.35;

    white-space: nowrap;
}

/* =======================
   PRICE + BUTTON
======================= */

.db-related-product-card__bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-top: 17.23px;
}

.db-related-product-card__prices {
    display: flex;
    align-items: baseline;
    gap: 7px;

    min-width: 0;
}

.db-related-product-card__current-price {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;

    color: #000000;

    font-family: Vazirmatn, sans-serif;
    font-size: 17.23px;
    font-weight: 700;
    line-height: 1;

    white-space: nowrap;
}

.db-related-product-card__current-price
.db-related-product-card__currency {
    font-size: 12px;
    font-weight: 700;
}

.db-related-product-card__old-price {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;

    color: #B8A292;

    font-family: Vazirmatn, sans-serif;
    font-size: 10.77px;
    font-weight: 300;
    line-height: 1;

    white-space: nowrap;

    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.db-related-product-card__old-price
.db-related-product-card__currency {
    font-size: 9px;
    font-weight: 300;
}

/* =======================
   BUTTON
======================= */

.db-related-product-card__button {
    position: absolute;
    left: 17.23px;
    bottom: 17.53px;
    z-index: 2;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 56px;
    height: 28px;
    padding: 0;

    box-sizing: border-box;

    color: #FFFFFF;
    background: #FF6600;

    border-radius: 6px;

    font-family: Vazirmatn, sans-serif;
    font-size: 11.26px;
    font-weight: 600;
    line-height: 1;

    text-decoration: none;
    white-space: nowrap;

    transition:
        background-color 0.25s ease,
        transform 0.25s ease;
}

.db-related-product-card__button:hover,
.db-related-product-card__button:focus-visible {
    color: #FFFFFF;
    background: #CC5200;
}

.db-related-product-card__button:active {
    transform: scale(0.97);
}

/* =======================
   CARD INTERACTION
======================= */

.db-related-product-card:hover {
    border-color: #EED9C7;
}

.db-related-product-card:focus-within {
    outline: 2px solid #FF6600;
    outline-offset: 3px;
}

/* =======================
   MOBILE
======================= */

@media (max-width: 767px) {

    .db-related-product-card {
        width: 100%;
        max-width: 336px;
    }
}