/* تنظیمات پایه و فونت */
body {
    font-family: Vazirmatn, Tahoma, sans-serif;
    background: #f0f2f5;
    margin: 0;
    padding: 0;
    direction: rtl;
}

/* ============================================= */
/*          هدر اصلی صفحه (بهبود یافته)         */
/* ============================================= */

/* هدر اصلی */
.custom-header {
    
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background:#5d417d;
    box-shadow: 0 3px 12px rgba(0,0,0,0.65);
    padding: 0.9rem 1.1rem;          /* کمی بیشتر از قبل */
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1440px;
    margin: 0 auto;
    gap: 12px 20px;                   /* فاصله افقی بیشتر بین عناصر */
    flex-wrap: wrap;
}

.logo {
    width: 52px;                      /* کمی بزرگ‌تر از قبل */
    height: auto;
    flex-shrink: 0;
}

.site-title {
    margin: 0;
    color: #f5f5f5;
    font-size: 1.5rem;                /* بزرگ‌تر برای حضور بیشتر */
    font-weight: 800;
    text-align: center;
    flex: 1;
    line-height: 1.25;
    text-shadow: 0 1px 5px rgba(0,0,0,0.7);
}

.catalog-btn {
    padding: 0.65rem 1.4rem;
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    background: linear-gradient(to right, #d4af37, #f0d070, #d4af37);
    border: 1.5px solid #c9a84e;
    border-radius: 50px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(212,175,85,0.4);
    transition: all 0.22s ease;
}

.catalog-btn:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 5px 15px rgba(212,175,85,0.55);
}

/* موبایل — هدف: شبیه‌تر به سایت اصلی */
@media (max-width: 768px) {
    .custom-header {
        padding: 0.85rem 1rem;       /* کمی فشرده اما نه خیلی */
    }
    
    .header-inner {
        justify-content: center;
        gap: 10px;
        flex-direction: row;          /* سعی کن سه‌تایی در یک خط بمونن */
        flex-wrap: nowrap;            /* جلوگیری از شکستن زودرس */
        overflow: hidden;
    }
    
    .logo {
        width: 48px;                  /* لوگو کمی بزرگ‌تر → حس پرتر */
    }
    
    .site-title {
        font-size: 1.38rem;           /* عنوان بزرگ‌تر از نسخه قبلی */
        flex: 1 1 auto;
        padding: 0 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;      /* اگر خیلی طولانی شد، ... بده */
    }
    
    .catalog-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.96rem;
        min-width: 140px;             /* جلوگیری از خیلی کوچک شدن دکمه */
        flex-shrink: 0;
    }
}

/* گوشی‌های خیلی کوچک */
@media (max-width: 480px) {
    .header-inner {
        flex-wrap: wrap;              /* اگر جا نشد، خط بشکند */
        justify-content: center;
    }
    
    .site-title {
        font-size: 1.28rem;
        order: 2;
        flex-basis: 100%;
        margin-top: 6px;
    }
    
    .catalog-btn {
        order: 3;
        margin-top: 4px;
        width: auto;
        max-width: 85%;
    }
}
/* 🏷️ استایل تیتر اصلی */
h1 {
    font-size: 22px;
    font-weight: 800;
    color: #f0f2f5;
    text-align: center;
    margin: 25px 0 15px;
    padding: 0 20px;
    position: relative;
    line-height: 1.6;
}

/* خط تزئینی زیر تیتر */
h1::after {
    content: "";
    display: block;
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, #6e48aa, #9d50bb);
    margin: 8px auto 0;
    border-radius: 10px;
}
.catalog-button {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #000;
    background: linear-gradient(90deg, #d4af37, #f0d070, #d4af37);
    border: 2px solid #c9a84e;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    transition: all 0.25s ease;
}

.catalog-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.55);
    background: linear-gradient(90deg, #f0d070, #ffe08a, #f0d070);
}

/* تنظیم سایز تیتر در موبایل */
@media (max-width: 480px) {
    h1 {
        font-size: 19px;
        margin: 20px 0 10px;
    }
}

/* 🔍 استایل سرچ موبایل (چسبیده به بالا) */
#mobile-search {
    display: block;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: calc(100% - 40px);
    margin: 15px auto;
    padding: 14px 20px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    outline: none;
    transition: 0.3s;
}

#mobile-search:focus {
    border-color: #5d417d;
    box-shadow: 0 4px 15px rgba(93, 65, 125, 0.2);
}

/* 🧱 استایل آکاردئون */
.accordion {
    padding: 10px;
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.accordion-header {
    background: #5d417d;
    color: white;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header::after {
    content: "▼";
    font-size: 12px;
}

.accordion-body {
    padding: 15px;
    display: none;
    background: #fdfdfd;
}

/* 💳 استایل کارت محصول معمولی */
.normal-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 15px;
    transition: transform 0.2s;
}

/* 🟣 استایل کارت اضافه‌بها (Add-on) */
.addon-card {
    background: linear-gradient(135deg, #6e48aa, #9d50bb);
    color: white !important;
    border-radius: 15px;
    padding: 18px;
    margin-bottom: 15px;
    box-shadow: 0 6px 15px rgba(110, 72, 170, 0.2);
}

/* 🔝 هدر داخل کارت (نام و ابعاد) */
.product-main-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.addon-card .product-main-info {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.product-title {
    font-size: 16px;
    font-weight: 800;
    color: #333;
    line-height: 1.4;
}

.addon-card .product-title {
    color: white;
}

.product-dim {
    background: #f0f0f0;
    color: #666;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
}

.field-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    gap: 8px;
}

.field-label {
    font-size: 13px;
    color: #7f8c8d;
    flex: 1 1 auto;
    min-width: 120px;
}

.field-value {
    text-align: left;
    font-size: 14px;
    font-weight: bold;
    color: #2c3e50;
    direction: rtl;
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    word-break: break-word;
}

/* در موبایل‌های خیلی کوچک، چیدمان عمودی اجباری شود */
@media (max-width: 400px) {
    .field-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .field-value {
        width: 100%;
        text-align: right;
        margin-top: 4px;
    }
}

.addon-card .field-row {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.addon-card .field-label {
    color: rgba(255, 255, 255, 0.8);
}

.addon-card .field-value {
    color: white;
}

.price-text {
    color: #27ae60;
}

.addon-card .price-text {
    color: #f1c40f !important;
}

/* 📱 تنظیمات مخصوص موبایل‌های کوچک */
@media (max-width: 480px) {
    .product-main-info {
        flex-direction: column;
        gap: 8px;
    }
    .product-dim {
        align-self: flex-start;
    }
    .field-row {
        flex-direction: row;
        font-size: 12px;
    }
}

/* تنظیمات کلی برای موبایل */
@media (max-width: 768px) {
    .accordion {
        padding: 5px;
    }
    .card {
        padding: 12px;
        margin-bottom: 10px;
    }
    .product-title {
        font-size: 14px !important;
        line-height: 1.4;
        max-width: 70%;
    }
    .product-dim {
        font-size: 11px !important;
        padding: 2px 6px !important;
    }
    .field-row {
        padding: 6px 0 !important;
        gap: 8px !important;
    }
    .field-label {
        font-size: 11px !important;
        color: #888;
    }
    .field-value {
        font-size: 12px !important;
    }
    .price-text {
        font-size: 13px !important;
        white-space: nowrap;
    }
    .addon-card {
        padding: 15px !important;
    }
    .addon-card .product-title {
        font-size: 15px !important;
    }
}