/* Frontend responsive refinements. Loaded after the legacy theme styles. */
:root {
    --alpha-mobile-bar-height: 70px;
    --alpha-header-desktop-height: 210px;
    --alpha-navy: #163a5f;
    --alpha-teal: #0c7772;
    --alpha-blue: #167cbe;
}

/* Keep the slider stable while the first banner image is loading. */
.home-slider,
.home-slider .owl-stage-outer,
.home-slider .owl-item,
.home-slider .item,
.home-slider .item > a,
.home-slider .item picture {
    overflow: hidden;
}

@media (min-width: 992px) {
    .home-slider .item,
    .home-slider .item > a,
    .home-slider .item picture {
        display: block;
        height: calc(100vh - var(--alpha-header-desktop-height));
        max-height: 720px;
    }

    .home-slider .item img {
        display: block;
        width: 100%;
        height: 100%;
        max-height: 720px;
        object-fit: cover;
        object-position: center;
    }
}

.mobile-contact-bar {
    display: none;
}

@media (max-width: 991px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        padding-bottom: calc(var(--alpha-mobile-bar-height) + env(safe-area-inset-bottom, 0px));
        font-size: 16px;
        line-height: 1.6;
    }

    img,
    iframe,
    video,
    embed,
    object {
        max-width: 100%;
    }

    .container {
        padding-right: 15px;
        padding-left: 15px;
    }

    .home-slider .item,
    .home-slider .item > a,
    .home-slider .item picture {
        display: block;
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .home-slider .item img {
        display: block;
        width: 100%;
        height: 100%;
        max-height: calc(100vh - 84px);
        object-fit: cover;
        object-position: center;
    }

    .home-slider .owl-nav button,
    .home-slider .owl-nav .owl-prev,
    .home-slider .owl-nav .owl-next {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
    }

    .home-slider .owl-dots {
        bottom: 8px;
    }

    .header-main {
        min-height: 72px;
    }

    .header-main .col-100-h {
        display: flex;
        align-items: center;
        min-height: 72px;
    }

    .header-main .logo {
        display: flex;
        flex: 1;
        align-items: center;
        min-width: 0;
    }

    .header-main .logo img {
        width: auto;
        max-width: min(230px, calc(100vw - 90px));
        max-height: 54px;
        object-fit: contain;
    }

    .col-100-h #trigger-mobile.navbar-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin: 0 12px 0 0;
        padding: 10px;
        border: 1px solid #d7e7e9;
        border-radius: 8px;
        background: #fff;
    }

    .col-100-h #trigger-mobile .icon-bar {
        width: 20px;
        height: 2px;
        background-color: var(--alpha-teal);
    }

    .header-bottom {
        border-top: 1px solid #edf1f3;
    }

    .header-bottom .block-search,
    .header-bottom .search-bar {
        width: 100%;
    }

    .header-bottom .search-bar input {
        height: 52px;
        font-size: 16px;
    }

    .header-bottom .search-bar .btn {
        width: 52px;
        min-height: 52px;
    }

    .mobile-main-menu {
        width: min(86vw, 360px);
        max-width: 360px;
    }

    .mobile-main-menu a,
    .mobile-main-menu .drawer-header--auth {
        display: flex;
        align-items: center;
        min-height: 44px;
    }

    .mobile-main-menu .la-nav-list-items a {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    h1,
    .title-head {
        font-size: clamp(25px, 7vw, 32px);
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    h2 {
        font-size: clamp(21px, 5.8vw, 27px);
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    h3 {
        font-size: 18px;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    .bread-crumb .breadcrumb {
        display: flex;
        align-items: center;
        min-height: 42px;
        margin-bottom: 0;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .bread-crumb .breadcrumb li:last-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    input,
    select,
    textarea,
    button {
        font-size: 16px;
    }

    input:not([type='checkbox']):not([type='radio']),
    select,
    textarea {
        min-height: 46px;
    }

    .btn,
    .home-product-action,
    .blog-read-more,
    .pagination > li > a,
    .pagination > li > span {
        min-height: 44px;
    }

    .products-view-grid .row,
    .product-detail__section .row {
        margin-right: -6px;
        margin-left: -6px;
    }

    .products-view-grid .col-xs-6,
    .product-detail__section .col-xs-6 {
        padding-right: 6px;
        padding-left: 6px;
        margin-bottom: 12px;
    }

    .home-product-card,
    .product-detail__card {
        height: 100%;
    }

    .home-product-card .image-container,
    .product-detail__card > a:first-child {
        display: flex;
        align-items: center;
        justify-content: center;
        aspect-ratio: 1 / 1;
        overflow: hidden;
        background: #fff;
    }

    .home-product-card .product-item-photo {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
    }

    .home-product-card .product-image-photo,
    .product-detail__card > a:first-child img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }

    .home-product-card .box-info {
        display: flex;
        flex: 1;
        flex-direction: column;
        padding: 10px 8px 12px;
    }

    .home-product-card .product-item-name,
    .product-detail__card h3 {
        display: -webkit-box;
        min-height: 42px;
        margin: 0 0 7px;
        overflow: hidden;
        font-size: 14px;
        line-height: 1.45;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .home-product-card .item-price,
    .product-detail__card-price {
        min-height: 26px;
        margin-top: auto;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.45;
    }

    .home-product-card .price-contact,
    .product-detail__card-price--contact {
        color: var(--alpha-teal);
        font-weight: 700;
    }

    .home-product-card .home-product-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-top: 8px;
        padding: 7px 5px;
        border-top: 1px solid #edf1f3;
        color: var(--alpha-teal);
        font-size: 13px;
        font-weight: 700;
        text-align: center;
    }

    .category-gallery .image,
    .category-gallery img {
        width: 100%;
        aspect-ratio: 16 / 7;
        object-fit: cover;
    }

    .sort-cate-right-mobile,
    #sort-by,
    #sort-by > ul,
    #sort-by > ul > li {
        max-width: 100%;
    }

    .kitchen-hood-guide {
        margin-top: 24px !important;
        padding: 20px !important;
    }

    .product-detail {
        padding-top: 16px;
        padding-bottom: 25px;
    }

    .product-detail__title {
        margin-top: 0;
        font-size: 26px;
    }

    .product-detail__thumbs {
        padding-bottom: 3px;
        scroll-snap-type: x mandatory;
    }

    .product-detail__thumb {
        min-width: 72px;
        min-height: 72px;
        scroll-snap-align: start;
    }

    .product-detail__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 20px;
    }

    .product-detail__actions .btn,
    .product-detail__call {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 48px;
        padding: 10px;
        text-align: center;
    }

    .product-detail__content {
        padding: 20px;
        overflow: hidden;
    }

    .product-detail__content table,
    .article-content table,
    .rte table {
        display: block;
        width: max-content;
        min-width: 100%;
        max-width: none;
        overflow-x: auto;
    }

    .product-detail__content,
    .article-content,
    .rte {
        overflow-wrap: anywhere;
    }

    .article-content iframe,
    .article-content embed,
    .article-content video {
        width: 100% !important;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .blog-page-header,
    .contact-page-header {
        margin-top: 20px;
    }

    .blog-card .blog-item-name {
        font-size: 18px;
    }

    .article-featured-image {
        margin: 16px 0 22px;
    }

    .contact-panel,
    .contact-map,
    .warranty-lookup__hero,
    .warranty-lookup__result {
        border-radius: 10px;
    }

    .contact-map iframe {
        height: min(72vw, 300px);
    }

    .contact-form-fields .form-control,
    .warranty-lookup__form input,
    .warranty-lookup__form button,
    .contact-submit {
        min-height: 48px;
        font-size: 16px;
    }

    .warranty-lookup__table {
        -webkit-overflow-scrolling: touch;
    }

    .footer-container .f-col {
        margin-bottom: 22px;
    }

    .footer-container .footer-title h3 {
        margin-bottom: 9px;
    }

    .footer-container .footer-content .menu a,
    .footer-container .info a {
        display: inline-flex;
        align-items: center;
        min-height: 38px;
    }

    .footer-container .payment {
        text-align: left;
    }

    .mobile-contact-bar {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1100;
        display: flex;
        min-height: var(--alpha-mobile-bar-height);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        border-top: 1px solid #dcebed;
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 -4px 18px rgba(22, 58, 95, .12);
    }

    .mobile-contact-bar__link {
        display: flex;
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 64px;
        padding: 7px 5px;
        color: var(--alpha-navy);
        font-size: 12px;
        font-weight: 700;
        line-height: 1.25;
        text-align: center;
    }

    .mobile-contact-bar__link + .mobile-contact-bar__link {
        border-left: 1px solid #e7eff2;
    }

    .mobile-contact-bar__link i {
        margin-bottom: 3px;
        color: var(--alpha-teal);
        font-size: 19px;
    }

    .mobile-contact-bar__link:first-child {
        background: var(--alpha-teal);
        color: #fff;
    }

    .mobile-contact-bar__link:first-child i {
        color: #fff;
    }

    .back-to-top {
        right: 14px;
        bottom: calc(var(--alpha-mobile-bar-height) + 14px);
    }
}

@media (max-width: 480px) {
    .home-slider .owl-nav .owl-prev { left: 6px; }
    .home-slider .owl-nav .owl-next { right: 6px; }

    .home-product-card .product-item-name,
    .product-detail__card h3 {
        font-size: 13px;
    }

    .home-product-card .home-product-action {
        font-size: 12px;
    }

    .product-detail__meta {
        gap: 6px 12px;
        font-size: 14px;
    }

    .product-detail__section h2 {
        font-size: 21px;
    }
}
