/******* Do not edit this file *******
Simple Custom CSS and JS - by Silkypress.com
Saved: Aug 01 2026 | 15:43:51 */
/* ==================== پایه ==================== */
* {
    box-sizing: border-box;
}

.brand-accordion {
    direction: rtl;
    max-width: 1140px;
    margin: 24px auto;
    font-family: inherit;
    padding: 0 12px;
}

/* ==================== هدر آکاردئون ==================== */
.accordion-item {
    margin-bottom: 14px;
}

.accordion-header {
    width: 100%;
    background: #fff;
    border: 1.5px solid #f0e6dc;
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(0,0,0,0.04);
}

.accordion-header:hover {
    border-color: #e67e22;
    background: #fffaf5;
    box-shadow: 0 6px 18px rgba(230, 126, 34, 0.12);
}

.brand-info {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-logo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f5e6d3;
    flex-shrink: 0;
}

.brand-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
}

.toggle-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fdf2e9;
    position: relative;
    flex-shrink: 0;
    transition: background 0.3s;
}

.accordion-header:hover .toggle-icon {
    background: #fdebd0;
}

.toggle-icon::before,
.toggle-icon::after {
    content: "";
    position: absolute;
    background: #e67e22;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 1px;
}

.toggle-icon::before {
    width: 14px;
    height: 2px;
}

.toggle-icon::after {
    width: 2px;
    height: 14px;
    transition: transform 0.3s, opacity 0.3s;
}

.accordion-item.active .toggle-icon {
    background: #e67e22;
}

.accordion-item.active .toggle-icon::before,
.accordion-item.active .toggle-icon::after {
    background: #fff;
}

.accordion-item.active .toggle-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

/* ==================== محتوای کشو ==================== */
.accordion-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    background: #faf7f4;
    border-radius: 0 0 14px 14px;
}

.accordion-inner {
    padding: 22px 16px 18px;
}

/* ==================== گرید محصولات (مهم‌ترین بخش) ==================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 20px;
    justify-content: center; /* وقتی ۱ یا ۲ محصول باشه وسط‌چین می‌شه */
}

/* ==================== کارت محصول ==================== */
.khandan-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #eee;
    padding: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    max-width: 320px; /* جلوگیری از کشیده شدن بیش از حد وقتی فقط ۱ تا باشه */
    width: 100%;
    margin: 0 auto; /* وسط‌چین کردن کارت تکی */
}

.khandan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.09);
}

.main-img-wrap {
    overflow: hidden;
    border-radius: 12px;
    cursor: zoom-in;
    background: #fafafa;
}

.main-img {
    width: 100%;
    height: 210px;
    object-fit: contain;
    display: block;
    transition: transform 0.35s ease;
}

.main-img-wrap:hover .main-img {
    transform: scale(1.04);
}

.thumb-list {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.thumb-list img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.55;
    transition: all 0.25s;
    border: 2px solid transparent;
    background: #fff;
}

.thumb-list img:hover {
    opacity: 0.9;
}

.thumb-list img.active-thumb {
    opacity: 1;
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
    transform: scale(1.06);
}

.p-title {
    margin: 14px 0 6px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.35;
}

.p-title-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.p-specs {
    margin: 8px 0 16px;
    padding: 0;
    list-style: none;
    border-top: 1px dashed #e8e0d8;
}

.p-specs li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 0.85rem;
    color: #666;
    gap: 12px;
}

.p-specs li strong {
    color: #333;
    font-weight: 600;
}

.p-btn {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #25d366, #1ebe57);
    color: #fff !important;
    text-decoration: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.25s;
    margin-top: auto;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.p-btn:hover {
    background: linear-gradient(135deg, #1ebe57, #189e48);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

/* ==================== مدال تصویر ==================== */
.img-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.img-modal.show {
    display: flex;
    opacity: 1;
}

.img-modal-content {
    max-width: min(90%, 900px);
    max-height: 82vh;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    object-fit: contain;
    background: #fff;
    padding: 8px;
    transform: scale(0.92);
    transition: transform 0.3s ease;
}

.img-modal.show .img-modal-content {
    transform: scale(1);
}

.img-modal-close {
    position: absolute;
    top: 18px;
    right: 20px;
    color: #fff;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.25s;
    z-index: 100001;
    line-height: 1;
}

.img-modal-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.08);
}

.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.18);
    color: #fff;
    border: none;
    font-size: 26px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.25s;
    user-select: none;
    z-index: 100000;
}

.modal-nav-btn:hover {
    background: #e67e22;
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    right: 18px;
}

.modal-next {
    left: 18px;
}

/* ==================== ریسپانسیو ==================== */
@media (max-width: 640px) {
    .brand-accordion {
        padding: 0 8px;
    }
    .accordion-header {
        padding: 12px 14px;
    }
    .brand-logo {
        width: 44px;
        height: 44px;
    }
    .brand-title {
        font-size: 0.98rem;
    }
    .accordion-inner {
        padding: 16px 10px 14px;
    }
    .products-grid {
        gap: 16px;
        grid-template-columns: 1fr; /* موبایل: همیشه یک ستون */
    }
    .khandan-card {
        max-width: 100%;
        padding: 12px;
    }
    .main-img {
        height: 190px;
    }
    .modal-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .modal-prev { right: 10px; }
    .modal-next { left: 10px; }
    .img-modal-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}