@media (max-width: 1100px) {
    .site-footer__main {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 0.84fr);
        gap: 34px;
        padding-top: 44px;
    }

    .site-footer__brand {
        grid-column: 1;
        grid-row: 1;
    }

    .site-footer__navigation {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .site-footer__contact {
        grid-column: 2;
        grid-row: 1;
    }
}

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

    .site-search {
        max-width: 280px;
    }

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

    .catalog-header,
    .detail-layout,
    .checkout-grid,
    .order-status-grid,
    .admin-order-summary,
    .beam-card-amount-summary,
    .beam-card-form > div,
    .beam-card-form > div:nth-of-type(2),
    .payment-method-grid,
    .bank-transfer-panel dl,
    .order-info-panels,
    .order-panels {
        grid-template-columns: 1fr;
    }

    .catalog-header {
        padding: 34px;
        background:
            linear-gradient(90deg, rgba(0, 184, 223, 0.12) 1px, transparent 1px),
            linear-gradient(rgba(0, 184, 223, 0.1) 1px, transparent 1px),
            linear-gradient(180deg, var(--color-deep) 0%, var(--color-navy) 58%, #ffffff 58%, #ffffff 100%);
        background-size: 42px 42px, 42px 42px, auto;
    }

    .detail-media {
        min-height: 320px;
    }

    .banner-carousel {
        min-height: 330px;
    }

    .banner-slide-fallback strong {
        font-size: 38px;
    }
}

/* Compact storefront navigation is shared by phones, tablets, and narrow laptops. */
@media (max-width: 1180px) {
    .header-inner {
        position: relative;
        justify-content: flex-start;
        gap: 14px;
    }

    .brand {
        flex: 0 0 auto;
    }

    .site-search {
        flex: 1 1 320px;
        max-width: none;
        min-width: 180px;
        min-height: 44px;
    }

    .nav-toggle {
        position: relative;
        z-index: 51;
        display: inline-flex;
        flex: 0 0 44px;
        align-items: center;
        justify-content: center;
        width: 44px;
        min-height: 44px;
        margin-left: 0;
    }

    .header-actions {
        margin-left: auto;
    }

    .language-switch--header {
        display: none;
    }

    .site-nav .language-switch--nav {
        display: flex !important;
        width: 100%;
        min-height: 52px;
        justify-content: space-between;
        margin-top: 6px;
        padding: 5px 7px 5px 12px;
        border-radius: 10px;
        background: linear-gradient(135deg, rgba(13, 116, 216, 0.07), rgba(15, 143, 168, 0.1));
        color: var(--color-navy);
        transform: none;
    }

    .site-nav .language-switch--nav:hover {
        background: linear-gradient(135deg, rgba(13, 116, 216, 0.11), rgba(15, 143, 168, 0.14));
        color: var(--color-navy);
        transform: none;
    }

    .language-switch--nav .language-switch__label {
        display: inline;
        font-size: 14px;
        font-weight: 700;
    }

    .language-switch--nav .language-switch__choices {
        margin-left: auto;
    }

    body.has-mobile-nav-open {
        overflow: hidden;
    }

    .site-nav {
        position: fixed;
        top: var(--site-header-height, 112px);
        left: 0;
        right: 0;
        z-index: 50;
        display: none;
        width: auto;
        max-height: calc(100vh - var(--site-header-height, 112px));
        max-height: calc(100dvh - var(--site-header-height, 112px));
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding:
            12px
            max(12px, env(safe-area-inset-right))
            max(12px, env(safe-area-inset-bottom))
            max(12px, env(safe-area-inset-left));
        border-top: 1px solid var(--color-line);
        border-bottom: 1px solid var(--color-line);
        background: #ffffff;
        box-shadow: 0 22px 46px rgba(8, 24, 39, 0.18);
        transform: none;
        -webkit-overflow-scrolling: touch;
    }

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

    .site-nav > a,
    .nav-dropdown-trigger,
    .nav-account-trigger,
    .nav-form button,
    .site-nav .cart-link {
        width: 100%;
        min-height: 44px;
        justify-content: flex-start;
        padding: 0 12px;
    }

    .nav-form,
    .nav-dropdown {
        display: block;
        width: 100%;
    }

    .site-nav .nav-dropdown-trigger,
    .site-nav .nav-account-trigger {
        justify-content: space-between;
    }

    .nav-dropdown-menu,
    .nav-submenu {
        position: static;
        display: none;
        width: 100%;
        min-width: 0;
        margin: 4px 0 8px;
        border-color: rgba(13, 116, 216, 0.12);
        border-radius: 8px;
        box-shadow: none;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        visibility: visible;
    }

    .nav-dropdown.is-menu-open > .nav-dropdown-menu,
    .nav-dropdown-row.is-menu-open > .nav-submenu {
        display: grid;
    }

    .nav-mega-menu {
        left: auto;
        right: auto;
        width: 100%;
        max-height: none;
        overflow: visible;
        gap: 10px;
        padding: 10px;
        transform: none;
    }

    .nav-dropdown:hover > .nav-mega-menu,
    .nav-dropdown:focus-within > .nav-mega-menu,
    .nav-dropdown.is-menu-open > .nav-mega-menu {
        transform: none;
    }

    .nav-mega-top {
        align-items: stretch;
        flex-direction: column;
    }

    .nav-mega-all {
        width: 100% !important;
        min-height: 44px !important;
    }

    .nav-mega-layout,
    .nav-mega-rail,
    .nav-mega-subgroups {
        grid-template-columns: minmax(0, 1fr);
    }

    .nav-mega-layout {
        min-height: 0;
        border: 0;
        overflow: visible;
    }

    .nav-mega-rail {
        gap: 4px;
        border-right: 0;
        padding: 0;
        background: transparent;
    }

    .nav-mega-root {
        min-height: 44px !important;
    }

    .nav-mega-root::after {
        content: "+";
    }

    .nav-mega-item.is-active > .nav-mega-root::after {
        content: "−";
    }

    .nav-mega-panel,
    .nav-mega-menu.is-js-ready .nav-mega-item > .nav-mega-panel {
        position: static;
        inset: auto;
        display: none;
        gap: 8px;
        max-height: none;
        overflow: visible;
        padding: 6px 0 12px 12px;
        opacity: 1;
        pointer-events: auto;
    }

    .nav-mega-menu.is-js-ready .nav-mega-item.is-active > .nav-mega-panel:not([hidden]) {
        display: grid;
        opacity: 1;
        pointer-events: auto;
    }

    .nav-mega-panel-title {
        display: flex !important;
        min-height: 44px !important;
        font-size: 16px;
    }

    .nav-mega-sub,
    .nav-mega-types a {
        min-height: 44px !important;
        padding-block: 8px !important;
    }

    .cart-popover {
        position: fixed;
        top: calc(var(--site-header-height, 112px) + 8px);
        left: auto;
        right: max(12px, env(safe-area-inset-right));
        z-index: 55;
        width: min(420px, calc(100vw - 24px));
        max-height: calc(100vh - var(--site-header-height, 112px) - 20px);
        max-height: calc(100dvh - var(--site-header-height, 112px) - 20px);
        overflow-y: auto;
        margin: 0;
        padding-bottom: max(14px, env(safe-area-inset-bottom));
        box-shadow: 0 22px 46px rgba(8, 24, 39, 0.2);
        overscroll-behavior: contain;
    }

    .cart-popover-items {
        max-height: min(300px, 45vh);
        max-height: min(300px, 45dvh);
    }

    .cart-popover-remove {
        width: 44px;
        min-height: 44px;
    }

    .cart-checkout-button,
    .cart-popover-header a {
        min-height: 44px;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .utility-inner {
        justify-content: flex-start;
        min-height: 32px;
        overflow-x: auto;
        white-space: nowrap;
    }

    .utility-inner span:first-child {
        margin-right: 0;
    }

    .header-inner {
        flex-wrap: wrap;
        min-height: 64px;
        padding: 10px 0;
        gap: 10px;
    }

    .brand img {
        width: 154px;
    }

    .page-section {
        padding-top: 28px;
    }

    .site-search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
        min-width: 0;
    }

    .site-search input {
        min-width: 0;
    }

    .site-search button {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
        position: relative;
        z-index: 20;
        margin-left: 0;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-bottom: 1px solid var(--color-line);
        background: #fff;
    }

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

    .site-nav a,
    .nav-form button,
    .nav-account-trigger {
        min-height: 44px;
    }

    .nav-dropdown {
        display: block;
        width: 100%;
    }

    .nav-dropdown-trigger,
    .nav-account-trigger {
        justify-content: space-between;
        width: 100%;
    }

    .nav-dropdown-menu,
    .nav-submenu {
        position: static;
        min-width: 0;
        margin: 4px 0 8px;
        border-color: rgba(13, 116, 216, 0.12);
        border-radius: 8px;
        box-shadow: none;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        visibility: visible;
    }

    .nav-submenu {
        margin: 4px 0 6px 12px;
        padding-left: 8px;
        border-width: 0 0 0 2px;
        border-radius: 0;
    }

    .nav-dropdown-menu a,
    .nav-submenu a {
        min-height: 40px;
    }

    .nav-mega-menu {
        width: 100%;
        max-height: none;
        overflow: visible;
        padding: 12px;
    }

    .nav-mega-top {
        align-items: stretch;
        flex-direction: column;
    }

    .nav-mega-all {
        width: 100% !important;
    }

    .nav-mega-layout,
    .nav-mega-rail,
    .nav-mega-subgroups {
        grid-template-columns: 1fr;
    }

    .nav-mega-layout {
        min-height: 0;
        border: 0;
        overflow: visible;
    }

    .nav-mega-rail {
        border-right: 0;
        padding: 0;
        background: transparent;
    }

    .nav-mega-root::after {
        content: "";
    }

    .nav-mega-panel {
        position: static;
        display: grid;
        gap: 10px;
        max-height: none;
        overflow: visible;
        padding: 8px 0 16px 12px;
        opacity: 1;
        pointer-events: auto;
    }

    .nav-mega-panel-title {
        display: none !important;
    }

    .site-nav .cart-menu {
        display: block;
        width: 100%;
    }

    .site-nav .cart-link {
        justify-content: space-between;
        width: 100%;
    }

    .cart-popover {
        position: static;
        width: 100%;
        margin-top: 4px;
        box-shadow: none;
    }

    h1 {
        font-size: 30px;
    }

    .lead {
        font-size: 16px;
    }

    .catalog-shell {
        padding-top: 28px;
    }

    .catalog-header {
        min-height: auto;
        padding: 24px;
        gap: 22px;
    }

    .banner-carousel {
        min-height: 280px;
    }

    .banner-slide-fallback {
        padding: 28px 24px 48px;
        background:
            linear-gradient(90deg, rgba(99, 228, 255, 0.12) 1px, transparent 1px),
            linear-gradient(rgba(99, 228, 255, 0.1) 1px, transparent 1px),
            linear-gradient(180deg, var(--color-deep) 0%, var(--color-navy) 100%);
        background-size: 38px 38px, 38px 38px, auto;
    }

    .banner-slide-fallback strong {
        font-size: 30px;
    }

    .banner-slide-fallback span:last-child {
        font-size: 16px;
    }

    .banner-arrow {
        width: 38px;
        min-height: 38px;
        font-size: 28px;
    }

    .hero-copy h1 {
        font-size: 30px;
    }

    .hero-actions,
    .hero-metrics,
    .system-stack {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        display: grid;
    }

    .hero-metrics {
        display: grid;
    }

    .hero-system-card {
        padding: 18px;
    }

    .coupon-strip,
    .promo-grid {
        grid-template-columns: 1fr;
    }

    .coupon-card {
        grid-template-columns: 1fr;
    }

    .coupon-card button {
        width: 100%;
    }

    .promo-card {
        min-height: auto;
    }

    .toolbar,
    .product-actions,
    .summary-row,
    .detail-actions,
    .detail-purchase-panel,
    .detail-actions form,
    .footer-grid {
        align-items: stretch;
        flex-direction: column;
    }

    .product-share-card {
        grid-template-columns: 1fr;
    }

    .product-share-link-row {
        flex-direction: column;
        gap: 8px;
    }

    .product-share-link-row input {
        border: 1px solid var(--color-line);
        border-radius: 8px;
    }

    .detail-price-line {
        font-size: 22px;
    }

    .detail-quantity-field {
        justify-content: space-between;
    }

    .detail-quantity-field input {
        width: 100%;
    }

    .product-share-copy {
        width: 100%;
        border-radius: 8px;
    }

    .product-image-lightbox,
    .product-video-lightbox {
        padding: 12px;
    }

    .product-image-lightbox-panel,
    .product-video-lightbox-panel {
        width: 100%;
        max-height: calc(100vh - 24px);
    }

    .product-image-lightbox-stage {
        min-height: 300px;
        padding: 18px 48px;
    }

    .product-image-lightbox-stage img {
        max-height: calc(100vh - 138px);
    }

    .product-lightbox-nav {
        width: 38px;
        min-height: 38px;
        font-size: 30px;
    }

    .toolbar-actions,
    .footer-grid,
    .form-grid,
    .spec-grid,
    .account-grid,
    .address-list,
    .contact-grid,
    .contact-card-grid,
    .contact-social-grid {
        grid-template-columns: 1fr;
    }

    .toolbar-actions {
        display: grid;
    }

    .contact-grid {
        gap: 24px;
    }

    .contact-form {
        padding-top: 0;
    }

    .contact-card {
        border-right: 0;
        border-bottom: 1px solid var(--color-line);
    }

    .contact-card:last-child {
        border-bottom: 0;
    }

    .contact-map,
    .contact-map iframe {
        min-height: 360px;
        height: 360px;
    }

    .site-footer__main {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 38px 0 30px;
    }

    .site-footer__brand,
    .site-footer__navigation,
    .site-footer__contact {
        grid-column: auto;
        grid-row: auto;
    }

    .site-footer__navigation {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 30px 18px;
    }

    .site-footer__nav:last-child {
        grid-column: 1 / -1;
    }

    .site-footer__nav:last-child .site-footer__links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 18px;
    }

    .site-footer__links a,
    .site-footer__legal a {
        min-height: 44px;
    }

    .site-footer__contact {
        padding: 20px;
    }

    .site-footer__bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 18px 0 24px;
    }

    .site-footer__legal {
        justify-content: flex-start;
    }

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

    .product-card {
        grid-template-rows: 160px 1fr auto;
    }

    .page-panel,
    .auth-panel,
    .detail-content,
    .checkout-summary {
        padding: 18px;
    }

    .inline-form {
        align-items: stretch;
        flex-direction: column;
    }

    .shipping-option {
        grid-template-columns: 22px minmax(0, 1fr);
    }

    .shipping-option > span:last-child {
        grid-column: 2;
        justify-items: start;
        text-align: left;
    }

    .inline-form input {
        width: 100%;
    }

    .summary-row a,
    .summary-row strong {
        width: 100%;
    }

    th,
    td {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .header-actions {
        gap: 6px;
    }

    .cart-link {
        gap: 5px;
        padding-inline: 8px !important;
    }

    .cart-link-label {
        display: none;
    }

    .site-footer__navigation {
        gap: 28px 16px;
    }

    .site-footer__contact {
        padding: 18px;
    }

    .site-footer__legal {
        gap-inline: 14px;
    }
}

@media (any-pointer: coarse) {
    .site-footer__links a,
    .site-footer__legal a,
    .site-footer__contact-link strong a {
        min-height: 44px;
    }
}

@media (max-height: 520px) {
    .product-image-lightbox,
    .product-video-lightbox {
        padding: 8px;
    }

    .product-image-lightbox-panel,
    .product-video-lightbox-panel {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
    }

    .product-image-lightbox-head,
    .product-video-lightbox-head {
        min-height: 56px;
        padding: 6px 10px;
    }

    .product-image-lightbox-head button,
    .product-video-lightbox-head button {
        width: 44px;
        min-height: 44px;
    }

    .product-image-lightbox-stage,
    .product-video-lightbox-stage {
        min-height: 0;
        height: calc(100vh - 72px);
        height: calc(100dvh - 72px);
    }

    .product-image-lightbox-stage {
        padding: 8px 54px;
    }

    .product-image-lightbox-stage img {
        max-height: calc(100vh - 88px);
        max-height: calc(100dvh - 88px);
    }

    .product-video-lightbox-stage iframe {
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
    }
}

/* Keep compact-navigation behavior authoritative over the phone-only layout above. */
@media (max-width: 760px) {
    .nav-toggle {
        z-index: 51;
        width: 44px;
        min-height: 44px;
    }

    .site-nav {
        position: fixed;
        top: var(--site-header-height, 136px);
        left: 0;
        right: 0;
        width: auto;
        max-height: calc(100vh - var(--site-header-height, 136px));
        max-height: calc(100dvh - var(--site-header-height, 136px));
        overflow-x: hidden;
        overflow-y: auto;
        padding:
            12px
            max(12px, env(safe-area-inset-right))
            max(12px, env(safe-area-inset-bottom))
            max(12px, env(safe-area-inset-left));
        box-shadow: 0 22px 46px rgba(8, 24, 39, 0.18);
        transform: none;
    }

    .nav-dropdown-menu,
    .nav-submenu {
        display: none;
    }

    .nav-dropdown.is-menu-open > .nav-dropdown-menu,
    .nav-dropdown-row.is-menu-open > .nav-submenu {
        display: grid;
    }

    .nav-mega-panel,
    .nav-mega-menu.is-js-ready .nav-mega-item > .nav-mega-panel {
        display: none;
        opacity: 1;
        pointer-events: auto;
    }

    .nav-mega-menu.is-js-ready .nav-mega-item.is-active > .nav-mega-panel:not([hidden]) {
        display: grid;
        opacity: 1;
        pointer-events: auto;
    }

    .nav-mega-panel-title {
        display: flex !important;
        min-height: 44px !important;
    }

    .nav-mega-root::after {
        content: "+";
    }

    .nav-mega-item.is-active > .nav-mega-root::after {
        content: "−";
    }

    .cart-popover {
        position: fixed;
        top: calc(var(--site-header-height, 136px) + 8px);
        left: auto;
        right: max(12px, env(safe-area-inset-right));
        width: min(420px, calc(100vw - 24px));
        max-height: calc(100vh - var(--site-header-height, 136px) - 20px);
        max-height: calc(100dvh - var(--site-header-height, 136px) - 20px);
        overflow-y: auto;
        margin: 0;
        padding-bottom: max(14px, env(safe-area-inset-bottom));
        box-shadow: 0 22px 46px rgba(8, 24, 39, 0.2);
    }

    .banner-carousel {
        min-height: 280px;
        aspect-ratio: 45 / 32;
    }

    .banner-arrow {
        width: 44px;
        min-height: 44px;
    }

    .banner-dots {
        bottom: 2px;
        gap: 0;
    }

    .banner-dots button,
    .banner-dots button.is-active {
        position: relative;
        width: 44px;
        min-height: 44px;
        height: 44px;
        background: transparent;
    }

    .banner-dots button::before {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 10px;
        height: 10px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.62);
        content: "";
        transform: translate(-50%, -50%);
    }

    .banner-dots button.is-active::before {
        width: 28px;
        background: var(--color-cyan);
    }

    .banner-toggle {
        top: 10px;
        right: 10px;
        bottom: auto;
    }

    .banner-caption {
        right: 14px;
        bottom: 52px;
        left: 14px;
        max-width: none;
    }

    .banner-slide.has-desktop-media-only img,
    .banner-slide.has-desktop-media-only video {
        object-fit: contain;
    }

    .coupon-card button {
        min-height: 44px;
    }

    .product-image-lightbox-panel,
    .product-video-lightbox-panel {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }
}
