﻿:root {
    --rhm-accent: #f6efe6;
    --rhm-card-width: 260px;
    /* تنظیمات قاب تصویر */
    --frame-width: 100%;
    --frame-height: 400px;
    --frame-top: 140%;
    --frame-padding: 1px;
}

/* گرید دسکتاپ */
.rhm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--rhm-card-width), 1fr));
    gap: 20px;
    direction: rtl;
}

/* کارت محصول */
.rhm-item {
    display: block;
}

.rhm-card {
    background: #fff;
    border-radius: 14px;
    /* خط دور کارت مثل سایت ریه‌مزون */
    border: 1px solid #e6e6e6;
    box-shadow: 0 14px 40px rgba(0,0,0,0.08);
    overflow: visible;
    display: flex;
    flex-direction: column;
    min-height: 600px;
    transition: .3s;
}

    .rhm-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 22px 50px rgba(0,0,0,0.14);
    }

/* قوس مسجدی */
.rhm-arch {
    position: relative;
    height: 220px;
    background: linear-gradient(180deg, var(--rhm-accent), #fff);
}

.rhm-arch-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* قاب تصویر بیضی کشیده */
.rhm-img-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
}

.rhm-img-frame {
    position: absolute;
    left: 50%;
    top: var(--frame-top);
    transform: translate(-50%, -50%);
    width: var(--frame-width);
    height: var(--frame-height);
    background: #fff;
    padding: var(--frame-padding);
    /* بالا گرد – پایین صاف */
    border-radius: 80% 80% 0 0 / 100% 100% 0 0;
    box-shadow: 0 12px 36px rgba(0,0,0,0.10);
    overflow: hidden;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* تصویر داخل قاب */
.rhm-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* بدنه کارت */
.rhm-body {
    padding: 20px;
    text-align: center;
    margin-top: auto;
}

.rhm-title {
    font-size: 15px;
    margin: 0;
    min-height: 44px;
    color: #111;
}

    .rhm-title a {
        color: inherit;
        text-decoration: none;
    }

.rhm-meta {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

.rhm-price {
    font-weight: 700;
    font-size: 15px;
    color: #111;
}

.rhm-price-currency {
    font-size: 13px;
    color: #777;
}

.rhm-view-link {
    border: 1px solid #e6e6e6;
    padding: 6px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #111;
    transition: .2s;
}

    .rhm-view-link:hover {
        background: #f5f5f5;
        transform: translateY(-3px);
    }

/* موبایل: اسکرول افقی */
@media (max-width: 900px) {

    .rhm-grid {
        display: block;
    }

    .rhm-carousel {
        display: flex;
        gap: 14px;
        overflow-x: auto;
        padding: 12px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        direction: rtl;
    }

        .rhm-carousel .rhm-item {
            flex: 0 0 78%;
            scroll-snap-align: center;
        }

    :root {
        --frame-width: 96%;
        --frame-height: 320px;
        --frame-top: 86%;
    }
}

@media (max-width: 600px) {

    :root {
        --rhm-card-width: 100%;
        --frame-width: 98%;
        --frame-height: 340px;
        --frame-top: 84%;
    }

    .rhm-card {
        min-height: 480px;
    }
}
