/* ==========================================================================
   mobile-first.css — لایه‌ی بازطراحی موبایل‌محور سایت
   --------------------------------------------------------------------------
   این فایل آخرین شیوه‌نامه‌ی base.html است و پس از theme.css بارگذاری می‌شود.
   قاعده‌ی نوشتار: همه‌ی استایل‌های پایه برای موبایل نوشته شده‌اند و ارتقاها
   فقط با @media (min-width: …) انجام می‌شوند. هیچ max-width ای در این فایل
   وجود ندارد تا ترتیب آبشاری واقعاً «موبایل اول» باشد.
   ========================================================================== */

/* ==========================================================================
   ۱) توکن‌های مقیاس سیال
   ========================================================================== */
:root {
    --mm-gutter: 1rem;
    --mm-section-y: clamp(36px, 8vw, 76px);
    --mm-gap: clamp(14px, 3vw, 24px);

    --mm-fs-display: clamp(1.7rem, 6.4vw, 3rem);
    --mm-fs-h1: clamp(1.55rem, 5.4vw, 2.5rem);
    --mm-fs-h2: clamp(1.35rem, 4.4vw, 2rem);
    --mm-fs-h3: clamp(1.12rem, 3.2vw, 1.4rem);
    --mm-fs-body: clamp(0.95rem, 2.6vw, 1.02rem);

    --mm-tap: 46px;
}

/* ==========================================================================
   ۲) پایه‌ی موبایل
   ========================================================================== */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-size: var(--mm-fs-body);
    line-height: 1.9;
    overflow-x: hidden;
}

.container,
.container-fluid {
    padding-inline: var(--mm-gutter);
}

img {
    max-width: 100%;
    height: auto;
}

h1, .h1 { font-size: var(--mm-fs-h1); line-height: 1.45; }
h2, .h2 { font-size: var(--mm-fs-h2); line-height: 1.5; }
h3, .h3 { font-size: var(--mm-fs-h3); line-height: 1.6; }

p { margin-bottom: 1rem; }

.section-title {
    font-size: var(--mm-fs-h2);
    margin-bottom: 0.9rem;
}

.section-title::after {
    width: 56px;
    height: 3px;
    bottom: -8px;
}

.section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.6rem;
}

.section-title-sm {
    font-size: var(--mm-fs-h3);
    font-weight: 700;
    color: var(--mm-ink);
}

/* ریتم عمودی بخش‌ها */
.py-5 {
    padding-top: var(--mm-section-y) !important;
    padding-bottom: var(--mm-section-y) !important;
}

section.py-4 {
    padding-top: clamp(20px, 5vw, 34px) !important;
    padding-bottom: clamp(20px, 5vw, 34px) !important;
}

/* دکمه‌ها: سطح لمسی راحت در موبایل */
.btn {
    min-height: var(--mm-tap);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.15rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.btn-sm {
    min-height: 40px;
    padding: 0.4rem 0.9rem;
    font-size: 0.86rem;
}

.btn-lg {
    min-height: 52px;
    font-size: 1rem;
}

/* فرم‌ها: جلوگیری از زوم خودکار iOS با فونت ۱۶px */
.form-control,
.form-select,
.input-group-text {
    font-size: 16px;
    min-height: var(--mm-tap);
}

textarea.form-control {
    min-height: 120px;
}

.input-group .btn {
    min-height: var(--mm-tap);
}

/* بردکرامب و صفحه‌بندی */
.breadcrumb {
    font-size: 0.8rem;
    flex-wrap: wrap;
    row-gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.pagination {
    flex-wrap: wrap;
    justify-content: center;
}

.pagination .page-link {
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* جدول‌های مشخصات: در موبایل فشرده و خوانا */
.specs-table,
.product-detail-tabs table {
    width: 100%;
    font-size: 0.9rem;
}

.specs-table td,
.specs-table th {
    padding: 0.65rem 0.6rem;
    vertical-align: top;
}

/* ==========================================================================
   ۳) هدر
   ========================================================================== */
.top-header {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--mm-line-soft);
    box-shadow: 0 1px 0 rgba(20, 38, 43, 0.04);
}

.top-header.scrolled {
    padding: 0.4rem 0;
}

.top-header .container {
    padding-inline: var(--mm-gutter);
}

.logo-img {
    height: 36px;
    width: auto;
}

.logo-text {
    display: none;
}

.mobile-brand {
    display: none;
}

.header-actions {
    gap: 0.5rem;
}

.hamburger-menu {
    width: var(--mm-tap);
    height: var(--mm-tap);
    border-radius: 13px;
    border: 1px solid var(--mm-line);
    background: var(--mm-surface-alt);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
}

.hamburger-line {
    width: 19px;
    height: 2px;
    border-radius: 2px;
    background: var(--mm-primary);
}

.mobile-sidebar {
    width: min(86vw, 340px);
    max-width: 100%;
}

.mobile-sidebar-content {
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

.mobile-menu-item > a {
    min-height: var(--mm-tap);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.mobile-search .form-control {
    font-size: 16px;
}

.mobile-social .social-link {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   ۴) قهرمان صفحه‌های داخلی (یکپارچه)
   ========================================================================== */
.page-header,
.projects-hero,
.faq-header,
.downloads-header,
.contact-hero,
.cat-hero,
.brand-hero,
.service-hero,
.project-header {
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: clamp(30px, 7vw, 60px) 0 clamp(34px, 7vw, 64px);
    color: #fff;
    text-align: start;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(233, 196, 106, 0.18) 0%, rgba(233, 196, 106, 0) 55%),
        linear-gradient(140deg, var(--mm-primary-deep) 0%, var(--mm-primary) 55%, var(--mm-primary-soft) 100%);
}

.downloads-header {
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(233, 196, 106, 0.18) 0%, rgba(233, 196, 106, 0) 55%),
        linear-gradient(140deg, var(--mm-primary-deep) 0%, var(--mm-primary) 55%, var(--mm-primary-soft) 100%) !important;
}

.page-header::after,
.projects-hero::after,
.faq-header::after,
.downloads-header::after,
.contact-hero::after,
.cat-hero::after,
.brand-hero::after,
.service-hero::after,
.project-header::after {
    content: '';
    position: absolute;
    inset-inline-start: -70px;
    bottom: -110px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.page-header h1,
.projects-hero h1,
.faq-header h1,
.downloads-header h1,
.contact-hero h1,
.cat-hero h1,
.brand-hero h1,
.service-hero h1,
.project-header h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 0.7rem;
    font-size: var(--mm-fs-h1);
    font-weight: 800;
    color: #fff;
}

.page-header p,
.projects-hero p,
.faq-header p,
.downloads-header p,
.contact-hero p,
.cat-hero p,
.brand-hero p,
.service-hero p,
.project-header p {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 62ch;
    font-size: 0.95rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.82);
}

.page-header .breadcrumb,
.projects-hero .breadcrumb,
.faq-header .breadcrumb,
.downloads-header .breadcrumb,
.contact-hero .breadcrumb,
.cat-hero .breadcrumb,
.brand-hero .breadcrumb,
.service-hero .breadcrumb,
.project-header .breadcrumb {
    position: relative;
    z-index: 1;
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item a,
.projects-hero .breadcrumb-item,
.projects-hero .breadcrumb-item a,
.faq-header .breadcrumb-item,
.faq-header .breadcrumb-item a,
.downloads-header .breadcrumb-item,
.downloads-header .breadcrumb-item a,
.contact-hero .breadcrumb-item,
.contact-hero .breadcrumb-item a,
.cat-hero .breadcrumb-item,
.cat-hero .breadcrumb-item a,
.brand-hero .breadcrumb-item,
.brand-hero .breadcrumb-item a,
.service-hero .breadcrumb-item,
.service-hero .breadcrumb-item a,
.project-header .breadcrumb-item,
.project-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.75);
}

.page-header .breadcrumb-item.active,
.projects-hero .breadcrumb-item.active,
.faq-header .breadcrumb-item.active,
.downloads-header .breadcrumb-item.active,
.contact-hero .breadcrumb-item.active {
    color: #fff;
}

/* دکمه‌های داخل قهرمان در موبایل تمام‌عرض */
.page-header .btn,
.projects-hero .btn,
.faq-header .btn,
.downloads-header .btn,
.contact-hero .btn,
.cat-hero .btn,
.brand-hero .btn,
.service-hero .btn,
.project-header .btn {
    width: 100%;
}

/* دکمه‌های داخل گروه ورودی هرگز تمام‌عرض نشوند */
.page-header .input-group .btn,
.projects-hero .input-group .btn,
.faq-header .input-group .btn,
.downloads-header .input-group .btn,
.contact-hero .input-group .btn,
.cat-hero .input-group .btn,
.brand-hero .input-group .btn,
.service-hero .input-group .btn,
.project-header .input-group .btn {
    width: auto;
    flex: 0 0 auto;
}

/* ==========================================================================
   ۵) فیلترها و چیپ‌های افقی (اسکرول لمس‌محور)
   ========================================================================== */
.filter-section,
.categories-filter,
.categories-tabs,
.search-section {
    padding-top: clamp(18px, 4vw, 28px) !important;
    padding-bottom: clamp(18px, 4vw, 28px) !important;
}

.filter-buttons,
.categories-tabs,
.category-filter-mobile {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.35rem;
    scrollbar-width: none;
}

.filter-buttons::-webkit-scrollbar,
.categories-tabs::-webkit-scrollbar,
.category-filter-mobile::-webkit-scrollbar {
    display: none;
}

.filter-btn,
.category-btn {
    flex: 0 0 auto;
    margin: 0;
    padding: 0.5rem 1.05rem;
    border-radius: var(--mm-radius-pill);
    border: 1px solid var(--mm-line);
    background: var(--mm-surface);
    color: var(--mm-text);
    font-size: 0.86rem;
    font-weight: 600;
    white-space: nowrap;
    scroll-snap-align: start;
    min-height: 40px;
}

.filter-btn:hover,
.filter-btn.active,
.category-btn:hover,
.category-btn.active {
    background: var(--mm-primary);
    border-color: var(--mm-primary);
    color: #fff;
}

.filter-section h5,
.categories-filter h5 {
    font-size: 0.92rem;
    margin-bottom: 0.85rem !important;
}

/* ==========================================================================
   ۶) کارت‌های عمومی
   ========================================================================== */
.service-card {
    border-radius: var(--mm-radius-lg);
    box-shadow: var(--mm-shadow-sm);
    height: 100%;
}

.service-card .card-img-top {
    height: clamp(180px, 52vw, 240px);
    width: 100%;
    object-fit: cover;
}

.service-card .card-body {
    padding: 1.15rem;
}

.service-card .card-title {
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
}

.service-card .card-text {
    font-size: 0.92rem;
    line-height: 1.9;
    margin-bottom: 0.9rem;
}

.service-icon-wrapper {
    top: 14px;
    right: 14px;
    width: 48px;
    height: 48px;
    font-size: 1.35rem;
}

.service-features {
    gap: 0.4rem;
    margin-top: 0.6rem;
}

.feature-tag {
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
}

.service-meta {
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
}

.service-meta .btn {
    width: 100%;
}

/* پروژه‌ها */
.project-card {
    border-radius: var(--mm-radius-lg);
    overflow: hidden;
    box-shadow: var(--mm-shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card .project-image,
.project-card .project-overlay {
    height: clamp(190px, 54vw, 260px);
}

.project-card .project-image img,
.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-title {
    font-size: 1.08rem;
    line-height: 1.6;
}

.project-description {
    font-size: 0.9rem;
    line-height: 1.9;
}

.project-info {
    padding: 1.1rem;
}

.project-meta {
    flex-wrap: wrap;
    gap: 0.55rem;
    font-size: 0.8rem;
}

/* کارت محصول در دسته‌بندی و برند */
.product-card {
    border-radius: var(--mm-radius);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card .product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--mm-surface-alt);
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card .product-info {
    padding: 0.9rem;
    gap: 0.35rem;
}

.product-card .product-title {
    font-size: 0.95rem;
    line-height: 1.6;
}

.product-card .product-actions {
    margin-top: auto;
}

.product-card .product-actions .btn {
    width: 100%;
}

/* دانلودها */
.download-card {
    border-radius: var(--mm-radius);
    padding: 1.05rem;
    height: 100%;
}

.download-card .download-icon {
    font-size: 1.8rem;
}

.download-title {
    font-size: 1rem;
    line-height: 1.6;
}

.download-description {
    font-size: 0.88rem;
    line-height: 1.85;
}

.download-card .download-btn {
    width: 100%;
}

.popular-card {
    border-radius: var(--mm-radius);
    padding: 0.9rem;
}

/* درباره ما / تیم / ارزش‌ها */
.value-card,
.mission-card,
.vision-card {
    border-radius: var(--mm-radius-lg);
    padding: 1.25rem;
    height: 100%;
}

.value-icon {
    width: 54px;
    height: 54px;
    font-size: 1.4rem;
}

.team-member {
    border-radius: var(--mm-radius-lg);
    overflow: hidden;
    height: 100%;
}

.team-member .member-image,
.team-member .member-image img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.team-member .member-info {
    padding: 1.05rem;
}

.member-name {
    font-size: 1.02rem;
}

.member-position {
    font-size: 0.82rem;
}

/* آمار */
.stats-section .row,
.projects-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--mm-gap);
    margin-inline: 0;
}

.stats-section .row > [class*='col-'],
.projects-stats > [class*='col-'] {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

.stat-item {
    padding: 1.15rem 0.75rem;
    text-align: center;
    background: var(--mm-surface);
    border: 1px solid var(--mm-line-soft);
    border-radius: var(--mm-radius);
    height: 100%;
}

.stat-number {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
    font-weight: 800;
    color: var(--mm-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--mm-muted);
}

/* ==========================================================================
   ۷) لیست محصولات (صفحه محصولات)
   ========================================================================== */
.product-list-page {
    padding-inline: 0;
}

.product-row-card {
    flex-direction: column;
    border-radius: var(--mm-radius-lg);
}

.product-row-img-col {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
}

.product-row-img-link {
    min-height: 0;
    height: auto;
    aspect-ratio: 16 / 11;
}

.product-row-img-link img {
    height: 100%;
}

.product-row-body {
    padding: 1rem;
    gap: 0.6rem;
}

.product-row-title {
    font-size: 1.02rem;
}

.product-row-subtitle {
    font-size: 0.86rem;
    line-height: 1.85;
}

.product-row-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    font-size: 0.78rem;
}

.product-row-specs {
    gap: 0.35rem;
}

.product-spec-chip {
    font-size: 0.72rem;
    padding: 0.25rem 0.55rem;
}

.product-row-meta {
    gap: 0.7rem;
    font-size: 0.75rem;
    flex-wrap: wrap;
}

.product-row-price-col {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
    border-inline-end: 0;
    border-top: 1px solid var(--mm-line-soft);
    padding: 1rem;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
}

.product-row-price-box {
    padding: 0;
    text-align: start;
}

.product-row-actions {
    flex: 1 1 100%;
    flex-direction: row;
    gap: 0.5rem;
}

.product-row-actions .btn {
    flex: 1;
}

.product-row-stock {
    justify-content: flex-start;
    background: transparent;
    padding: 0;
}

.product-modal-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ==========================================================================
   ۸) صفحه محصول (جزئیات)
   ========================================================================== */
.product-page {
    padding-top: clamp(18px, 4vw, 30px);
}

.product-header {
    padding-bottom: 0.5rem;
}

.product-title {
    font-size: var(--mm-fs-h2);
    line-height: 1.6;
}

.product-subtitle {
    font-size: 0.92rem;
}

.product-gallery .main-product-image,
.product-gallery .product-image {
    border-radius: var(--mm-radius);
    overflow: hidden;
    background: var(--mm-surface-alt);
}

.product-gallery .main-product-image img,
.product-gallery .product-image img {
    width: 100%;
    height: auto;
}

.product-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scrollbar-width: none;
}

.product-thumbnails::-webkit-scrollbar {
    display: none;
}

.thumbnail-item {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: var(--mm-radius-sm);
    overflow: hidden;
    border: 2px solid var(--mm-line);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.price-container {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
}

.final-price,
.product-price {
    font-size: clamp(1.3rem, 5vw, 1.75rem);
}

.original-price {
    font-size: 0.9rem;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    margin-top: 1rem;
}

.product-actions .btn {
    width: 100%;
}

.quantity-input {
    width: 100%;
}

.product-meta,
.product-meta-info {
    font-size: 0.82rem;
}

.product-rating {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-detail-tabs .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.25rem;
    scrollbar-width: none;
}

.product-detail-tabs .nav-tabs::-webkit-scrollbar {
    display: none;
}

.product-detail-tabs .nav-link {
    white-space: nowrap;
    font-size: 0.88rem;
    padding: 0.55rem 0.8rem;
}

.review-item {
    padding: 0.9rem;
    border-radius: var(--mm-radius);
}

.reviewer-info {
    flex-wrap: wrap;
    gap: 0.4rem;
}

.rating-summary {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
}

.benefit-card {
    padding: 0.9rem;
    border-radius: var(--mm-radius);
}

.downloads-list .download-item {
    padding: 0.8rem;
    flex-wrap: wrap;
    gap: 0.55rem;
}

/* ==========================================================================
   ۹) سرویس / پروژه / دسته / برند (جزئیات)
   ========================================================================== */
.service-hero {
    text-align: center;
}

.service-icon-large {
    width: 84px;
    height: 84px;
    font-size: 2.1rem;
    margin: 0 auto 1rem;
}

.service-content {
    font-size: 0.96rem;
    line-height: 2;
}

.service-sidebar .sidebar-card {
    margin-bottom: 0.9rem;
}

.spec-item {
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.7rem 0.85rem;
}

.feature-item {
    gap: 0.75rem;
    padding: 0.85rem;
}

.feature-icon {
    width: 46px;
    height: 46px;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.warranty-box,
.warranty-wrapper {
    padding: 1rem;
    border-radius: var(--mm-radius);
}

.application-card {
    padding: 1rem;
    border-radius: var(--mm-radius);
}

.applications-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--mm-gap);
}

.warranty-detail-item {
    padding: 0.85rem;
}

.documents-list .document-item {
    padding: 0.8rem;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.cta-section {
    padding: clamp(28px, 7vw, 64px) 1.1rem;
    margin-top: clamp(28px, 6vw, 56px);
    border-radius: var(--mm-radius-lg);
    text-align: center;
}

.cta-section h2,
.cta-section .display-6 {
    font-size: var(--mm-fs-h2);
}

.cta-section .btn {
    width: 100%;
}

.cta-section .d-flex {
    flex-direction: column;
    gap: 0.55rem !important;
}

/* پروژه */
.project-info-card {
    border-radius: var(--mm-radius-lg);
    padding: 1.1rem;
}

.project-meta-item {
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.6rem 0;
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.project-gallery {
    border-radius: var(--mm-radius);
    overflow: hidden;
}

.project-gallery .main-image,
.project-gallery img {
    width: 100%;
    height: auto;
}

.thumbnail-image {
    width: 100%;
    height: 64px;
    object-fit: cover;
    border-radius: var(--mm-radius-sm);
}

.related-project-card {
    border-radius: var(--mm-radius);
    overflow: hidden;
    height: 100%;
}

.related-project-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.related-project-content {
    padding: 0.9rem;
}

.related-project-title {
    font-size: 0.98rem;
    line-height: 1.6;
}

.related-project-description {
    font-size: 0.86rem;
    line-height: 1.8;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tech-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
}

/* دسته‌بندی و برند */
.category-header,
.brand-header {
    padding-top: clamp(24px, 6vw, 48px) !important;
    padding-bottom: clamp(24px, 6vw, 48px) !important;
}

.category-icon-placeholder,
.brand-icon-placeholder,
.brand-logo-container {
    width: 76px;
    height: 76px;
    font-size: 1.9rem;
}

.category-meta,
.brand-meta,
.brand-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    font-size: 0.82rem;
}

.subcategory-card,
.related-category,
.other-brand-card {
    border-radius: var(--mm-radius);
    padding: 0.85rem;
}

/* ==========================================================================
   ۱۰) سایدبارها و ستون‌های کنار محتوا
   ========================================================================== */
.sidebar-card,
.info-sidebar,
.downloads-sidebar,
.reviews-sidebar,
.service-sidebar,
.video-sidebar {
    border-radius: var(--mm-radius-lg);
    padding: 1.05rem;
    margin-bottom: 1rem;
}

.sidebar-card h3,
.sidebar-card h4,
.sidebar-card h5 {
    font-size: 1.02rem;
    margin-bottom: 0.7rem;
}

.sidebar-video-item,
.video-info {
    font-size: 0.86rem;
}

/* ==========================================================================
   ۱۱) مقالات
   ========================================================================== */
.blog-card,
.hover-card {
    border-radius: var(--mm-radius-lg);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hover-card img,
.blog-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.hover-card .p-4,
.hover-card .card-body {
    padding: 1rem !important;
}

.post-content {
    font-size: 1rem;
    line-height: 2.05;
}

.post-content img {
    border-radius: var(--mm-radius);
    margin: 1rem 0;
}

.post-content h2,
.post-content h3 {
    margin-top: 1.6rem;
    color: var(--mm-ink);
}

.post-content h2 {
    font-size: clamp(1.25rem, 4.6vw, 1.75rem) !important;
    border-right: 0;
    border-inline-start: 4px solid var(--mm-accent);
    padding-right: 0;
    padding-inline-start: 1rem;
}

.post-content h3 {
    font-size: clamp(1.1rem, 3.8vw, 1.5rem) !important;
}

.post-content blockquote {
    border-right: 0;
    border-inline-start: 4px solid var(--mm-accent);
    background: var(--mm-surface-alt) !important;
    padding: 1rem !important;
}

.post-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
}

.post-content pre {
    border-radius: var(--mm-radius);
    padding: 0.9rem;
    overflow-x: auto;
    font-size: 0.85rem;
}

.post-content blockquote {
    margin: 1.2rem 0;
    padding: 0.9rem 1rem;
    border-inline-start: 3px solid var(--mm-accent);
    background: var(--mm-surface-alt);
    border-radius: var(--mm-radius-sm);
    font-size: 0.95rem;
}

/* ==========================================================================
   ۱۲) تماس با ما
   ========================================================================== */
.contact-hero {
    text-align: center;
}

.contact-main {
    padding-top: clamp(28px, 6vw, 48px) !important;
    padding-bottom: clamp(28px, 6vw, 48px) !important;
}

.contact-form-card,
.contact-info-card {
    border-radius: var(--mm-radius-lg);
    padding: 1.15rem;
    height: 100%;
}

.contact-info-wrapper {
    display: grid;
    gap: 0.8rem;
}

.contact-info-icon {
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.map-container iframe,
.map-container > div {
    width: 100%;
    min-height: 260px;
}

.contact-form-card form .btn {
    width: 100%;
}

/* ==========================================================================
   ۱۳) سوالات متداول
   ========================================================================== */
.faq-header {
    text-align: center;
}

.faq-search form,
.faq-search .input-group {
    width: 100%;
}

.faq-categories {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    scrollbar-width: none;
}

.faq-categories::-webkit-scrollbar {
    display: none;
}

.faq-categories .btn,
.faq-categories a {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.85rem;
}

.faq-accordion .accordion-item {
    border-radius: var(--mm-radius) !important;
    margin-bottom: 0.6rem;
    border: 1px solid var(--mm-line) !important;
    overflow: hidden;
}

.faq-accordion .accordion-button {
    font-size: 0.94rem;
    line-height: 1.8;
    padding: 0.9rem 1rem;
    gap: 0.5rem;
}

.faq-accordion .accordion-body {
    padding: 0.9rem 1rem;
    font-size: 0.92rem;
    line-height: 1.95;
}

.faq-item {
    border-radius: var(--mm-radius) !important;
    padding: 0.9rem 1rem;
    margin-bottom: 0.6rem;
}

.faq-question {
    font-size: 0.94rem;
    line-height: 1.8;
}

.faq-answer {
    font-size: 0.9rem;
    line-height: 1.95;
}

/* ==========================================================================
   ۱۴) صفحه اصلی — تنظیم موبایل‌محور بخش‌ها
   ========================================================================== */
.mm-section {
    padding: clamp(38px, 9vw, 84px) 0;
}

.mm-container,
.mm-hero .container,
.mm-section > .container {
    padding-inline: var(--mm-gutter);
}

.mm-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: clamp(18px, 4vw, 32px);
}

.mm-head__aside {
    text-align: start;
}

.mm-deck {
    grid-template-columns: minmax(0, 1fr);
}

.mm-deck__item,
.mm-deck__item:nth-child(odd) {
    border-inline-start: 0;
}

.mm-deck__item + .mm-deck__item {
    border-top: 1px solid var(--mm-line);
}

.mm-deck__item {
    padding: 1.15rem;
}

.mm-deck__top {
    margin-bottom: 0.75rem;
}

.mm-deck__icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
}

.mm-deck__title {
    font-size: 1rem;
}

.mm-deck__text {
    font-size: 0.86rem;
    line-height: 1.9;
}

.mm-rail {
    scroll-padding-inline: var(--mm-gutter);
}

.mm-rail__item {
    width: 82vw;
    max-width: 320px;
    scroll-snap-align: start;
}

.mm-rail-wrap {
    margin-inline: calc(var(--mm-gutter) * -1);
    padding-inline: var(--mm-gutter);
}

.mm-nav {
    display: none;
}

.mm-project__media {
    height: clamp(210px, 56vw, 280px);
}

.mm-project--wide .mm-project__media {
    height: clamp(210px, 56vw, 280px);
}

.mm-project__body {
    padding: 1.05rem;
}

.mm-project__title {
    font-size: 1.1rem;
}

.mm-project__text {
    font-size: 0.88rem;
}

.mm-about__figure {
    margin-bottom: 1rem;
}

.mm-about__figure img {
    width: 100%;
}

.mm-about__body {
    text-align: start;
}

.mm-about__body ul,
.mm-about__body ol {
    padding-inline-start: 1.1rem;
}

.mm-about__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

.mm-about__actions .btn {
    width: 100%;
}

.mm-quote {
    padding: 1.15rem;
}

.mm-quotes__foot {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.75rem;
}

.mm-quotes__arrows {
    justify-content: center;
}

.mm-qarrow {
    width: 44px;
    height: 44px;
}

.mm-faq__aside {
    padding: 1.2rem;
    border-radius: var(--mm-radius-lg);
}

.mm-cta__box {
    padding: clamp(1.2rem, 5vw, 3rem);
    text-align: center;
}

.mm-cta__box h2,
.mm-cta__title {
    font-size: var(--mm-fs-h2);
}

.mm-cta__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

.mm-cta__actions .btn {
    width: 100%;
}

.mm-cta__rings {
    display: none;
}

.mm-post {
    border-radius: var(--mm-radius-lg);
}

.mm-post__body {
    padding: 1rem;
}

.mm-post__title {
    font-size: 1rem;
    line-height: 1.7;
}

.mm-post__media {
    height: clamp(180px, 48vw, 230px);
}

/* ==========================================================================
   ۱۵) فوتر
   ========================================================================== */
.footer {
    padding-top: clamp(28px, 7vw, 56px) !important;
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)) !important;
}

.footer .row {
    row-gap: 1.6rem;
}

.footer h5 {
    font-size: 1rem;
    margin-bottom: 0.85rem !important;
}

.footer ul.list-unstyled li {
    margin-bottom: 0.4rem !important;
}

.footer a {
    font-size: 0.9rem;
}

.footer .social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.footer .social-links a {
    width: 40px;
    height: 40px;
}

.footer .footer-logo {
    align-items: flex-start;
}

.footer .btn-sm {
    width: 100%;
}

.footer hr {
    margin-block: 1.4rem;
}

/* ==========================================================================
   ۱۶) ارتقاها — تبلت
   ========================================================================== */
@media (min-width: 576px) {
    :root {
        --mm-gutter: 1.25rem;
    }

    .btn {
        font-size: 0.98rem;
    }

    .page-header .btn,
    .projects-hero .btn,
    .faq-header .btn,
    .downloads-header .btn,
    .contact-hero .btn,
    .cat-hero .btn,
    .brand-hero .btn,
    .service-hero .btn,
    .project-header .btn {
        width: auto;
    }

    .product-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mm-about__actions,
    .mm-cta__actions {
        flex-direction: row;
        align-items: center;
    }

    .mm-about__actions .btn,
    .mm-cta__actions .btn {
        width: auto;
    }

    .applications-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-modal-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ==========================================================================
   ۱۷) ارتقاها — تبلت بزرگ
   ========================================================================== */
@media (min-width: 768px) {
    :root {
        --mm-gutter: 1.5rem;
        --mm-section-y: clamp(48px, 6vw, 84px);
    }

    .top-header {
        padding: 10px 0;
    }

    .top-header.scrolled {
        padding: 8px 0;
    }

    .logo-img {
        height: 44px;
    }

    .logo-text {
        display: flex;
    }

    .company-name {
        font-size: 1.05rem;
    }

    .company-tagline {
        font-size: 0.72rem;
    }

    .filter-buttons,
    .categories-tabs,
    .category-filter-mobile {
        flex-wrap: wrap;
        overflow: visible;
    }

    .service-card .card-body {
        padding: 1.4rem;
    }

    .service-meta .btn {
        width: auto;
    }

    .product-card .product-actions .btn {
        width: auto;
    }

    .download-card {
        padding: 1.25rem;
    }

    .download-card .download-btn {
        width: auto;
    }

    .stats-section .row,
    .projects-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .stat-item {
        padding: 1.25rem 1rem;
    }

    /* لیست محصولات: چیدمان ردیفی */
    .product-row-card {
        flex-direction: row;
    }

    .product-row-img-col {
        flex: 0 0 200px;
        max-width: 200px;
        width: auto;
    }

    .product-row-img-link {
        aspect-ratio: auto;
        height: 100%;
        min-height: 210px;
    }

    .product-row-body {
        padding: 1.1rem 1.15rem;
    }

    .product-row-info-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product-row-price-col {
        flex: 0 0 210px;
        max-width: 210px;
        width: auto;
        border-top: 0;
        border-inline-start: 1px solid var(--mm-line-soft);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }

    .product-row-actions {
        flex: 0 0 auto;
        flex-direction: column;
    }

    .product-row-actions .btn {
        width: 100%;
    }

    .product-row-stock {
        justify-content: center;
        background: var(--mm-surface-alt);
        padding: 0.45rem 0.6rem;
        border-radius: var(--mm-radius-sm);
    }

    .product-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quantity-input {
        width: 110px;
    }

    .thumbnail-item {
        flex: 0 0 74px;
        width: 74px;
        height: 74px;
    }

    .product-gallery {
        position: sticky;
        top: 96px;
    }

    .rating-summary {
        flex-direction: row;
        align-items: center;
    }

    .cta-section .btn {
        width: auto;
    }

    .cta-section .d-flex {
        flex-direction: row;
        justify-content: center;
    }

    .mm-deck {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mm-deck__item:nth-child(2n + 1) {
        border-inline-start: 0;
    }

    .mm-deck__item:nth-child(n + 3) {
        border-top: 1px solid var(--mm-line);
    }

    .mm-rail__item {
        width: 42vw;
        max-width: 340px;
    }

    .mm-nav {
        display: inline-flex;
    }

    .mm-quotes__foot {
        flex-direction: row;
        align-items: center;
    }

    .mm-cta__rings {
        display: block;
    }

    .contact-info-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ==========================================================================
   ۱۸) ارتقاها — دسکتاپ
   ========================================================================== */
@media (min-width: 992px) {
    :root {
        --mm-gutter: 1.5rem;
    }

    .top-header {
        padding: 15px 0;
    }

    .top-header.scrolled {
        padding: 10px 0;
    }

    .logo-img {
        height: 50px;
    }

    .company-name {
        font-size: 1.15rem;
    }

    .page-header,
    .projects-hero,
    .faq-header,
    .downloads-header,
    .contact-hero,
    .cat-hero,
    .brand-hero,
    .service-hero,
    .project-header {
        text-align: start;
    }

    .page-header p,
    .projects-hero p,
    .faq-header p,
    .downloads-header p,
    .contact-hero p {
        font-size: 1.05rem;
    }

    .service-card .card-img-top {
        height: 235px;
    }

    .mm-head {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }

    .mm-head__aside {
        text-align: end;
    }

    .mm-deck {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .mm-deck__item,
    .mm-deck__item:nth-child(2n + 1) {
        border-inline-start: 1px solid var(--mm-line);
        border-top: 0;
    }

    .mm-deck__item:first-child {
        border-inline-start: 0;
    }

    .mm-rail__item {
        width: min(360px, 31vw);
        max-width: 360px;
    }

    .mm-project__media,
    .mm-project--wide .mm-project__media {
        height: 300px;
    }

    .product-row-img-col {
        flex: 0 0 250px;
        max-width: 250px;
    }

    .product-row-img-link {
        min-height: 240px;
    }

    .product-row-price-col {
        flex: 0 0 240px;
        max-width: 240px;
    }

    .product-row-info-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product-row-body {
        padding: 1.35rem 1.5rem;
    }

    .product-row-title {
        font-size: 1.1rem;
    }

    .contact-info-wrapper {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ==========================================================================
   ۱۹) ارتقاها — نمایشگر بزرگ
   ========================================================================== */
@media (min-width: 1200px) {
    .product-row-img-col {
        flex: 0 0 280px;
        max-width: 280px;
    }

    .product-row-img-link {
        min-height: 260px;
    }

    .product-row-price-col {
        flex: 0 0 260px;
        max-width: 260px;
    }

    .service-card .card-img-top {
        height: 250px;
    }
}

/* ==========================================================================
   ۲۰) دسترس‌پذیری و ترجیح حرکت
   ========================================================================== */
@media (hover: none) {
    .product-row-card:hover,
    .card:hover,
    .service-card:hover,
    .project-card:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
