/* Homepage alignment only; retain the existing desktop layout and styling. */
@media (max-width: 767px) {
    .pb-home-layout,
    .pb-home-layout > .pb-home-banner-row {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .pb-home-layout > section,
    .pb-home-layout > .pb-home-banner-row {
        padding-left: 0;
        padding-right: 0;
        min-width: 0;
    }

    .pb-home-layout > section > .container {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }

    .pb-home-layout .ec-main-slider.section {
        width: 100%;
        min-width: 0;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .pb-home-layout .ec-product-tab .tab-pane > .row {
        margin-left: 0;
        margin-right: 0;
    }

    .pb-home-layout .ec-pro-tab-slider {
        width: 100%;
        min-width: 0;
        /* Keep the carousel controls below the card, clear of the next section. */
        padding: 0 0 56px;
        margin-bottom: 20px;
    }

    .pb-home-layout .ec-pro-tab-slider .slick-list {
        width: 100%;
        margin: 0;
        padding: 0 !important;
        overflow: hidden;
    }

    /* The shared carousel margin leaves a strip of the next card visible. */
    .pb-home-layout .ec-pro-tab-slider .slick-slide {
        margin-left: 0;
        margin-right: 0;
    }

    .pb-home-layout .ec-product-tab .ec-pro-tab {
        margin-top: 0;
        margin-bottom: 16px;
    }

    .pb-home-layout .ec-pro-tab-nav {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
        width: 100%;
    }

    .pb-home-layout .ec-pro-tab-nav .nav-item,
    .pb-home-layout .ec-pro-tab-nav .nav-item:not(:last-child) {
        margin: 0;
    }

    .pb-home-layout .ec-pro-tab-nav .nav-link {
        margin: 0;
        padding: 8px 0;
        font-size: clamp(9px, 2.6vw, 12px);
        line-height: 20px;
        letter-spacing: 0;
        white-space: nowrap;
        text-align: center;
    }

    .pb-home-layout .ec-pro-tab-slider .slick-arrow {
        top: auto;
        bottom: 8px;
        width: 32px;
        height: 32px;
        margin: 0;
        transform: none;
    }

    .pb-home-layout .ec-pro-tab-slider .slick-arrow.slick-prev {
        left: calc(50% - 38px);
        right: auto;
    }

    .pb-home-layout .ec-pro-tab-slider .slick-arrow.slick-next {
        left: calc(50% + 6px);
        right: auto;
    }

    .pb-home-layout .ec-pro-tab-slider .slick-arrow::before {
        line-height: 32px;
    }

    /* Slick owns slide widths; let each card fill its assigned slide. */
    .pb-home-layout .ec-pro-tab-slider .ec-product-content {
        width: 100% !important;
        padding-left: 0;
        padding-right: 0;
        max-width: 100%;
    }

    .pb-home-layout .ec-pro-tab-slider .ec-product-inner {
        display: flex;
        flex-direction: column;
        height: auto !important;
        min-width: 0;
    }

    .pb-home-layout .ec-pro-tab-slider .ec-pro-image .image img {
        max-width: 100%;
        object-fit: contain;
    }

    .pb-home-layout .ec-pro-tab-slider .ec-pro-content {
        padding-left: 15px;
        padding-right: 15px;
    }

    .pb-home-layout .ec-pro-tab-slider .ec-pro-content > p,
    .pb-home-layout .ec-pro-tab-slider .ec-pro-stitle,
    .pb-home-layout .ec-pro-tab-slider .ec-pro-rat-price {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .pb-home-layout .ec-pro-tab-slider .single-pro-content {
        margin-top: auto;
        padding: 15px;
    }

    .pb-home-layout .ec-pro-tab-slider .ec-single-qty {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin: 0;
        padding-bottom: 0;
    }

    .pb-home-layout .ec-pro-tab-slider .ec-single-cart {
        flex: 1 1 120px;
        margin: 0;
        padding: 0;
    }

    .pb-home-layout .ec-pro-tab-slider .ec-single-cart .btn {
        width: 100%;
        margin: 0;
    }

    /* Bootstrap's small-screen columns otherwise squeeze these sections. */
    .pb-home-layout .ec-fre-spe-section .ec-spe-section,
    .pb-home-layout .ec-fre-spe-section .ec-test-section,
    .pb-home-layout .ec-fre-spe-section .ec-services-section {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .pb-home-layout .ec-test-section {
        height: auto !important;
    }

    .pb-home-layout .ec-spe-pro-inner {
        flex-direction: column;
    }

    .pb-home-layout .ec-spe-pro-image-outer,
    .pb-home-layout .ec-spe-pro-inner .ec-spe-pro-content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .pb-home-layout .ec-spe-pro-inner .ec-spe-pro-content {
        padding: 15px 0 0;
    }

    .pb-home-layout .ec-spe-pro-inner .ec-spe-pro-image {
        min-width: 0;
        align-items: center;
    }

    .pb-home-layout .ec_ser_scroll_item {
        width: 80%;
        min-width: 0;
    }

    .pb-home-layout .ec_ser_mobile_scroll {
        padding-left: 0;
        padding-right: 0;
    }

    .pb-home-layout .ec-banner-block-bottom-banner {
        padding-left: 0;
        padding-right: 0;
    }
}
