/* Adaptive overrides for the base layout, hero and shared blocks. */

@media (max-width: 1500px) {
    .feature-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-strip__card {
        min-height: 118px;
    }

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

    .block--catalog-home .catalog-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-slide {
        grid-template-columns: minmax(0, 0.98fr) minmax(480px, 1.02fr);
    }
}

@media (max-width: 1180px) {
    .page-hero,
    .product-layout,
    .footer-bottom {
        align-items: flex-start;
    }

    .feature-strip,
    .product-grid,
    .page-card-grid,
    .contact-grid,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .service-showcase,
    .page-hero,
    .product-layout,
    .hero--home,
    .twin-grid {
        grid-template-columns: 1fr;
    }

    .product-panel--media {
        --product-media-height: clamp(360px, 56vw, 540px);
    }

    .product-summary-head.has-certificate {
        grid-template-columns: 1fr;
    }

    .product-certificate {
        justify-self: start;
    }

    .partner-band__track {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-slide {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-bottom: 110px;
    }
}

@media (max-width: 920px) {
    .wrap {
        width: min(calc(100% - 12px), 100%);
    }

    .scroll-top-button {
        right: max(12px, env(safe-area-inset-right));
        bottom: max(12px, env(safe-area-inset-bottom));
        width: 42px;
        height: 42px;
        font-size: 24px;
        box-shadow: 0 10px 22px rgba(245, 122, 31, 0.32);
    }

    .catalog-grid,
    .product-grid,
    .page-card-grid,
    .service-showcase,
    .feature-strip,
    .contact-grid,
    .footer-grid,
    .partner-band__track {
        grid-template-columns: 1fr;
    }

    .hero-slide {
        padding: 26px 20px 96px;
        border-radius: 28px;
    }

    .hero-carousel__controls {
        left: 18px;
        right: 18px;
    }

    .feature-strip__card {
        min-height: 110px;
        padding: 18px 20px;
        border-radius: 24px;
    }

    .feature-strip__card::before {
        left: 20px;
        right: 20px;
    }

    .feature-strip__title {
        font-size: 19px;
    }

    .product-card {
        grid-template-rows: 330px minmax(0, auto);
        min-height: auto;
    }

    .product-card__image {
        min-height: 330px;
        padding: 22px 24px 0;
    }

    .product-card__image img {
        height: 306px;
    }
}

@media (max-width: 640px) {
    .page-hero h1 {
        font-size: 34px;
    }

    .product-panel--summary h1 {
        font-size: 17px;
    }

    .product-panel--summary .price--big {
        font-size: 16px;
    }

    .page-hero,
    .product-hero,
    .block--soft {
        padding: 22px;
    }

    .product-panel--media {
        --product-media-height: clamp(280px, 82vw, 420px);
    }

    .product-certificate {
        width: 132px;
    }

    .product-certificate__preview {
        width: 104px;
        height: 128px;
    }

    .product-card {
        grid-template-rows: 288px minmax(0, auto);
    }

    .product-card__image {
        min-height: 288px;
        padding: 18px 18px 0;
    }

    .product-card__image img {
        height: 270px;
    }

    .product-card__body {
        padding: 14px 20px 22px;
    }

    .product-card h3 {
        font-size: 15px;
    }

    .product-card__footer {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 14px;
        padding-top: 22px;
    }

    .product-card__link {
        width: 100%;
    }

    .product-certificate-modal {
        padding: 10px;
    }

    .product-certificate-modal__dialog {
        width: calc(100vw - 20px);
        height: calc(100dvh - 20px);
        padding: 10px;
    }

    .product-certificate-modal__close {
        top: 6px;
        right: 6px;
        width: 36px;
        height: 36px;
        font-size: 24px;
    }

    .feature-strip {
        gap: 12px;
    }

    .feature-strip__card {
        gap: 14px;
        min-height: 98px;
        padding: 16px 16px 15px;
        border-radius: 22px;
    }

    .feature-strip__icon {
        width: 52px;
        height: 52px;
        border-radius: 18px;
    }

    .feature-strip__icon img {
        width: 24px;
        height: 24px;
    }

    .feature-strip__title {
        font-size: 17px;
        line-height: 1.22;
    }
}
