/* ==========================================================================
   ریسپانسیو و تجربه موبایل — مسلم امیرسالاری | KBS
   ترتیب بریک‌پوینت‌ها: 1080px → 960px → 780px → 600px → 420px
   ========================================================================== */

/* --- 1080px: فشرده‌سازی هدر و شبکه‌های چهارستونه --- */
@media (max-width: 1080px) {
  .main-nav a {
    padding-inline: 0.6rem;
    font-size: 0.88rem;
  }
  .header-phone {
    display: none;
  }
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1.2fr;
    row-gap: 2rem;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .shop-toolbar {
    grid-template-columns: 1.3fr 1fr 1fr 1fr auto;
  }
  .shop-toolbar .field--price-max {
    display: none;
  }
}

/* --- 960px: منوی کشویی، شبکه‌های دوستونه، ناوبری پایین --- */
@media (max-width: 960px) {
  :root {
    --header-h: 66px;
  }
  .main-nav,
  .header-actions .btn--gold,
  .header-call {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .header-actions {
    margin-inline-start: auto;
  }
  .header-inner {
    gap: 0.75rem;
  }
  .brand__mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 0.82rem;
  }
  .brand__text strong {
    font-size: 0.94rem;
  }
  .brand__text small {
    font-size: 0.66rem;
  }
  .bottom-nav {
    display: block;
  }
  body {
    padding-bottom: calc(66px + env(safe-area-inset-bottom));
  }
  .site-footer {
    padding-bottom: 1.5rem;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding-block: 2.5rem 3rem;
  }
  .hero__lead {
    margin-inline: auto;
  }
  .hero .btn-row {
    justify-content: center;
  }
  .hero__chips {
    justify-content: center;
  }
  .hero__portrait {
    order: -1;
    width: min(78%, 340px);
    margin-bottom: 0.5rem;
  }
  .hero__portrait-tag {
    transform: translateX(-10%);
    bottom: 0.9rem;
  }

  .product-detail {
    grid-template-columns: 1fr;
  }
  .article-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
  .sidebar-block {
    margin-bottom: 0;
  }
  .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contact-strip {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .section-head--split {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .page-hero {
    padding-block: 1.75rem 2rem;
  }
}

/* --- 780px: فشرده‌سازی تیترها و فرم‌ها --- */
@media (max-width: 780px) {
  body {
    font-size: 0.97rem;
  }
  .container {
    width: calc(100% - 2rem);
  }
  .container--narrow {
    width: calc(100% - 2rem);
  }
  .section {
    padding-block: 2.75rem;
  }
  .grid--2,
  .grid--3,
  .package-grid,
  .form-grid,
  .about-grid,
  .agency-card {
    grid-template-columns: 1fr;
  }
  .video-shell {
    aspect-ratio: 16 / 10;
  }
  .package-grid {
    gap: 1.15rem;
  }
  .package-card {
    padding: 1.4rem 1.25rem;
  }
  .shop-toolbar {
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
    padding: 0.9rem;
  }
  .shop-toolbar .field--search,
  .shop-toolbar .field--reset {
    grid-column: 1 / -1;
  }
  .shop-toolbar .field--price-max {
    display: grid;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
  }
  .product-card__body {
    padding: 0.85rem 0.85rem 1rem;
    gap: 0.35rem;
  }
  .product-card h3 {
    font-size: 0.9rem;
  }
  .product-card__desc {
    font-size: 0.78rem;
    -webkit-line-clamp: 2;
  }
  .product-card__price {
    font-size: 0.88rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
  }
  .product-card__actions {
    grid-template-columns: 1fr;
  }
  .article-grid {
    grid-template-columns: 1fr;
  }
  .cover {
    aspect-ratio: 16 / 8.5;
  }
  .stat-row {
    grid-template-columns: 1fr;
    gap: 0.9rem;
    padding-block: 1rem;
  }
  .stat-row div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    text-align: start;
    border-bottom: 1px dashed var(--line);
    padding-bottom: 0.6rem;
  }
  .stat-row div:last-child {
    border-bottom: 0;
  }
  .sidebar {
    grid-template-columns: 1fr;
  }
  .article-body {
    padding: 1.15rem 1rem 1.5rem;
    border-radius: var(--radius);
  }
  .article-figure .cover {
    aspect-ratio: 16 / 9;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-col--contact {
    grid-column: 1 / -1;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .cta-band {
    border-radius: var(--radius);
    padding: 1.5rem 1.25rem;
  }
  .btn-row .btn {
    flex: 1 1 auto;
  }
  .hero h1 .hero__role {
    font-size: 0.92rem;
  }
  .hero__portrait-tag {
    font-size: 0.72rem;
    padding: 0.5rem 0.75rem;
  }
  .notice {
    font-size: 0.82rem;
  }
  .why-item {
    padding: 1rem;
  }
  .form-actions .btn {
    width: 100%;
  }
  .gallery__thumbs {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- 600px: تبلت کوچک و موبایل بزرگ --- */
@media (max-width: 600px) {
  .hero__portrait {
    width: min(72%, 280px);
  }
  .hero__portrait-frame {
    padding: 7px;
    border-radius: 22px;
  }
  .hero__portrait-frame img {
    border-radius: 16px;
  }
  .hero__lead {
    font-size: 0.94rem;
    line-height: 2;
  }
  .hero .btn-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }
  .hero .btn-row .btn {
    width: 100%;
  }
  .hero__chips {
    font-size: 0.78rem;
    gap: 0.4rem 0.9rem;
  }
  .section {
    padding-block: 2.35rem;
  }
  .section-head {
    margin-bottom: 1.35rem;
  }
  .section-head p {
    font-size: 0.9rem;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
  .product-card__desc {
    -webkit-line-clamp: 3;
  }
  .product-card__actions {
    grid-template-columns: 1fr auto;
  }
  .article-card__body {
    padding: 1rem 1rem 1.15rem;
  }
  .package-card__head {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .package-card__title {
    font-size: 1.05rem;
  }
  .package-card__price strong {
    font-size: 1.3rem;
  }
  .page-hero .btn-row {
    margin-top: 1rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .footer-col--contact {
    grid-column: auto;
  }
  .empty-state {
    padding: 1.75rem 1.15rem;
  }
  .shop-meta {
    font-size: 0.78rem;
  }
  .filter-pills button {
    font-size: 0.78rem;
    padding: 0.38rem 0.8rem;
  }
  .article-header__meta {
    font-size: 0.74rem;
    gap: 0.35rem 0.75rem;
  }
  .form-status {
    font-size: 0.82rem;
  }
  .faq-item summary {
    font-size: 0.87rem;
    padding: 0.9rem 1rem;
  }
  .faq-item__body {
    padding: 0 1rem 1rem;
    font-size: 0.85rem;
  }
  .breadcrumb {
    font-size: 0.72rem;
  }
  .hero__portrait-tag {
    inset-inline-start: auto;
    inset-inline-end: 0;
    transform: translateX(6%);
  }
}

/* --- 420px: موبایل کوچک --- */
@media (max-width: 420px) {
  .container {
    width: calc(100% - 1.5rem);
  }
  .brand__text small {
    font-size: 0.6rem;
  }
  .brand__mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }
  .bottom-nav a {
    font-size: 0.63rem;
    gap: 0.15rem;
  }
  .bottom-nav svg {
    width: 19px;
    height: 19px;
  }
  .hero h1 .hero__name {
    font-size: 1.7rem;
  }
  .hero__portrait {
    width: min(80%, 240px);
  }
  .icon-badge {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    margin-bottom: 0.85rem;
  }
  .service-card {
    padding: 1.25rem 1.15rem;
  }
  .product-card__actions {
    grid-template-columns: 1fr;
  }
  .stat-row strong {
    font-size: 0.95rem;
  }
}
