/* ---------- کارت جزئیات آیتم ---------- */

body {
    font-family: 'Vazirmatn', sans-serif;
    background: #ffffff;
    margin: 0;
    padding: 20px;
    color: #333;
    direction: rtl;
}

/* کانتینر اصلی کارت */
.container {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    background: #fff;
    border-radius: 12px;
    gap: 20px;
    max-width: 900px;
    margin: 30px auto;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    border: 1px solid #eee;
    box-sizing: border-box;
    padding: 15px;
    height: auto;
}

/* تصویر آیتم */
.item-image {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 25px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

/* بخش اطلاعات */
.ad-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
    flex: 1;
    text-align: right;
    padding: 10px 15px;
    box-sizing: border-box;
}

/* عنوان آیتم */
.ad-info h2, .ad-info h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #222;
}

/* اطلاعات تکمیلی */
.ad-info p {
    margin: 0;
    font-size: 16px;
    color: #555;
    line-height: 1.6;
}

/* کانتینر واحد تماس و ایمیل */
.contact-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 30px 45px;
    max-width: 320px;
    background-color: #fefefe;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    margin-top: 15px;
}
.item-address {
    background: #eef6ff;
    padding: 10px 12px;
    border-left: 4px solid #2196F3;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 16px;
}
#map {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    margin-top: 16px;
}

/* هر ردیف داخل کادر */
.contact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* دکمه‌ها و لینک‌ها یکسان */
.contact-row a,
.contact-row button {
    display: inline-block;
    width: 80px;
    text-align: center;
    padding: 6px 0;
    background-color: #fff;
    color: #555;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.contact-row a:hover,
.contact-row button:hover {
    background-color: #f0f0f0;
    border-color: #999;
    color: #333;
}

/* توست کپی ایمیل */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background-color: #fffff;
    color: #000;
    padding: 12px 20px;
    border-radius: 25px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.toast svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

/* ------------------ ریسپانسیو موبایل قوی ------------------ */
@media (max-width: 600px) {
    .container {
        flex-direction: column;
        gap: 15px;
        padding: 10px;
    }

    .item-image {
        width: 100%;
        height: auto;
        max-height: 250px;
        object-fit: cover;
        border-radius: 12px;
    }

    .ad-info {
        width: 100%;
        padding: 10px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .ad-info h2 {
        font-size: 20px;
        margin: 0;
    }

    .contact-container {
        width: 90%;
        padding: 10px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .contact-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    /* دکمه‌ها و لینک‌ها در موبایل */
    .contact-row a,
    .contact-row button {
        width: 100%;
        max-width: 100%; /* حداکثر عرض به کادر والد محدود شد */
        padding: 10px;
        font-size: 14px;
        box-sizing: border-box; /* padding داخل محاسبه شود */
    }

    .ad-info p {
        font-size: 15px;
        line-height: 1.5;
    }
}
