/* Дополнительные адаптивные правила страницы подключены в category.css и styles.css. */
/* =========================================================
   LESTNICY ALMATY — responsive styles
   ========================================================= */

@media (max-width: 1080px) {
  .container {
    width: min(calc(100% - 44px), var(--container));
  }

  .main-nav {
    gap: 15px;
    font-size: 12px;
  }

  .header-inner {
    gap: 17px;
  }

  .hero-content {
    width: 64%;
  }

  .catalog-grid {
    gap: 16px;
  }

  .card-image {
    height: 170px;
  }

  .about-grid {
    gap: 45px;
  }
}

@media (max-width: 860px) {
  .site-header {
    position: sticky;
    top: 0;
  }

  .header-inner {
    min-height: 66px;
    justify-content: space-between;
  }

  .menu-toggle {
    display: block;
    order: 3;
  }

  .header-btn {
    margin-left: auto;
    margin-right: 2px;
  }

  .main-nav {
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 22px 18px;
    border-top: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 12px 25px rgba(0,0,0,.08);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 13px 0;
    border-bottom: 1px solid #eeeae1;
    font-size: 14px;
  }

  .hero,
  .hero-inner {
    min-height: 590px;
  }

  .hero-content {
    width: 70%;
    padding: 60px 0 70px;
  }

  .hero-media::after {
    background: linear-gradient(
      90deg,
      rgba(250,248,243,.99) 0%,
      rgba(250,248,243,.88) 46%,
      rgba(250,248,243,.30) 100%
    );
  }

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

  .product-card,
  .product-card:nth-child(4),
  .product-card:nth-child(5) {
    grid-column: auto;
  }

  .product-card:last-child {
    grid-column: 1 / -1;
    width: calc(50% - 8px);
    justify-self: center;
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 42px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .about-content p {
    max-width: none;
  }

  .about-image {
    height: 360px;
  }

  .contacts-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 40px;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(calc(100% - 30px), var(--container));
  }

  .logo span {
    font-size: 18px;
  }

  .header-btn {
    min-height: 38px;
    padding-inline: 12px;
    font-size: 10px;
  }

  .hero,
  .hero-inner {
    min-height: 640px;
  }

  .hero-media img {
    object-position: 63% center;
  }

  .hero-media::after {
    background: linear-gradient(
      180deg,
      rgba(250,248,243,.98) 0%,
      rgba(250,248,243,.92) 52%,
      rgba(250,248,243,.38) 100%
    );
  }

  .hero-inner {
    align-items: flex-start;
  }

  .hero-content {
    width: 100%;
    padding-top: 58px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-subtitle {
    font-size: 19px;
  }

  .section {
    padding: 60px 0;
  }

  .section-heading {
    margin-bottom: 27px;
  }

  .section-heading h2 {
    font-size: 32px;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .product-card,
  .product-card:last-child {
    width: 100%;
    grid-column: auto;
  }

  .card-image {
    height: 210px;
  }

  .card-body {
    min-height: 115px;
  }

  .advantage-strip-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 23px;
  }

  .strip-divider {
    width: 100%;
    height: 1px;
    margin: 0;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    height: 280px;
  }

  .cta,
  .cta-inner {
    min-height: 330px;
  }

  .cta {
    margin-inline: 15px;
  }

  .faq-item summary {
    font-size: 18px;
    padding-top: 19px;
    padding-bottom: 19px;
  }

  .contacts {
    padding: 55px 0 45px;
  }

  .contacts-grid {
    grid-template-columns: 1fr 1fr;
    gap: 35px 25px;
  }

  .footer-description {
    margin-bottom: 5px;
  }

  .footer-col:first-of-type {
    grid-column: 2;
  }

  .footer-col:last-of-type {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .header-btn {
    display: none;
  }

  .hero h1 {
    font-size: 35px;
  }

  .hero,
  .hero-inner {
    min-height: 610px;
  }

  .hero-content {
    padding-top: 48px;
  }

  .card-image {
    height: 185px;
  }

  .contacts-grid {
    grid-template-columns: 1fr;
  }

  .footer-col:first-of-type,
  .footer-col:last-of-type {
    grid-column: auto;
  }
}

/* =====================================================
   ПОПАП СОРТОВ — МОБИЛЬНАЯ ВЕРСИЯ
   ===================================================== */

@media (max-width: 700px) {

    .sort-modal {
        padding: 15px;
    }

    .sort-modal-window {
        max-height: 92vh;
        padding: 35px 20px 25px;
        border-radius: 14px;
    }

    .sort-modal-close {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
        font-size: 25px;
    }

    .sort-modal-header {
        margin-bottom: 25px;
        padding-right: 40px;
    }

    .sort-modal-header h2 {
        font-size: 38px;
    }

    .sort-modal-item {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 15px;
    }

    .sort-modal-image {
        height: 210px;
    }

    .sort-modal-content h3 {
        font-size: 30px;
    }

}