/**
 * E-commerce mobile & tablet responsive overrides.
 * Loaded after style.min.css — do not rebuild min bundle for layout fixes.
 */

html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

.withFilters .filters .firstPart {
    position: relative;
}

body.ecom-filter-open {
    overflow: hidden;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

.container-fluid {
    padding-left: 16px;
    padding-right: 16px;
}

/* ── Header ── */
@media (max-width: 991.98px) {
    header .navbar-brand img {
        max-height: 42px;
        width: auto;
    }

    header .navbar-nav {
        padding-top: 12px;
        gap: 4px;
    }

    header .userBox .info {
        display: none;
    }

    header .userBox {
        min-width: auto;
    }

    header .badge-number {
        font-size: 10px;
        min-width: 18px;
        height: 18px;
        line-height: 18px;
        padding: 0 4px;
    }
}

@media (max-width: 575.98px) {
    header .col-md-10 {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* ── Home / banners ── */
@media (max-width: 767.98px) {
    .discount .blueBack h4 {
        font-size: 18px;
        line-height: 1.4;
    }

    .discount .blueBack span {
        font-size: 13px;
    }

    .newArrival .col-md-6 .box,
    .newArrival .promo-card {
        min-height: 220px !important;
    }

    .categories .swiper-slide,
    .brand .swiper-slide {
        width: auto !important;
    }
}

/* ── Product filters (mobile drawer) ── */
.ecom-filter-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 0 0 16px;
    padding: 12px 16px;
    border: 1px solid #0072ff;
    border-radius: 8px;
    background: #fff;
    color: #0072ff;
    font-weight: 600;
    font-size: 15px;
}

.ecom-filter-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(3, 8, 53, 0.45);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ecom-filter-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

.ecom-filter-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f1f4ff;
    color: #030835;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (max-width: 991.98px) {
    .ecom-filter-toggle {
        display: flex;
    }

    .withFilters {
        position: relative;
    }

    .withFilters .ecom-filter-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(92vw, 360px);
        height: 100vh;
        max-height: 100dvh;
        margin: 0;
        padding: 0;
        z-index: 1050;
        transform: translateX(-110%);
        transition: transform 0.28s ease;
        background: #fff;
        box-shadow: 8px 0 24px rgba(0, 0, 0, 0.12);
        overflow: hidden;
    }

    .withFilters .ecom-filter-sidebar.is-open {
        transform: translateX(0);
    }

    .withFilters .ecom-filter-sidebar .filters {
        height: 100%;
        overflow-y: auto;
        padding: 52px 16px 24px;
        margin: 0;
        border-radius: 0;
    }

    .withFilters .successFilter {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .withFilters .listing .topPart h3 {
        font-size: 18px;
        line-height: 1.35;
    }

    .withFilters .listing .topPart h3 span {
        display: block;
        font-size: 13px;
        font-weight: 500;
        margin-top: 4px;
    }

    .withFilters .listing .topPart .sorting {
        flex-wrap: wrap;
        gap: 8px 12px;
        margin-top: 12px;
    }

    .withFilters .listing .topPart .sorting h3 {
        width: 100%;
        margin-bottom: 0;
        font-size: 14px;
    }

    .withFilters .listing .topPart .sorting a {
        font-size: 13px;
        white-space: nowrap;
    }

    .withFilters .filters .secPart .inputs {
        flex-direction: column;
        gap: 10px;
    }

    .withFilters .filters .secPart .inputs select {
        width: 100% !important;
        margin: 0 !important;
    }
}

/* ── Product cards ── */
@media (max-width: 575.98px) {
    .blueBox .pro-thumb,
    .blueBox .upper img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }

    .blueBox .lower h3 {
        font-size: 15px;
        line-height: 1.35;
    }

    .blueBox .lower .price {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 4px;
    }

    .blueBox .lower .price h5 {
        font-size: 13px;
    }
}

/* ── Product detail ── */
@media (max-width: 991.98px) {
    .productDetail .left .picBox {
        flex-direction: column;
    }

    .productDetail .left .picBox .allPics {
        flex-direction: row !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        width: 100%;
        gap: 8px;
        padding-bottom: 8px;
    }

    .productDetail .left .picBox .allPics .imgBox {
        flex: 0 0 72px;
    }

    .productDetail .singlePic,
    .productDetail .left .picBox .singlePic {
        width: 100% !important;
        max-width: 100% !important;
    }

    .productDetail .left .btns {
        flex-direction: column;
        gap: 10px;
    }

    .productDetail .left .btns .common {
        width: 100%;
    }

    .productDetail .right .upperInfo .headName {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }

    .productDetail .right .upperInfo .chooseColors {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (max-width: 575.98px) {
    .productDetail .right .upperInfo .samgalaxy {
        font-size: 20px;
    }

    .productDetail .right .upperInfo .priceofItem {
        font-size: 22px;
    }

    .productDetail .singlePic.zoomable:hover img {
        transform: none !important;
    }
}

/* ── Cart & checkout ── */
@media (max-width: 991.98px) {
    .yourCart {
        padding: 24px 0 40px !important;
    }

    .yourCart .rightCol {
        margin-top: 24px;
        position: sticky;
        bottom: 0;
        z-index: 5;
        background: #fff;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
        border-radius: 12px 12px 0 0;
        padding-bottom: 12px;
    }

    .yourCart .headingofcart h3 {
        font-size: 22px;
    }
}

@media (max-width: 767.98px) {
    .yourCart .leftCol .productInfo > a {
        display: block;
        width: 88px;
        margin-bottom: 8px;
    }

    .yourCart .leftCol .productInfo > a img {
        width: 88px !important;
        height: 88px !important;
        object-fit: cover;
        border-radius: 8px;
    }

    .yourCart .leftCol .productInfo .name,
    .yourCart .leftCol .productInfo .standard,
    .yourCart .leftCol .productInfo .removeandprice {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px;
        width: 100%;
    }

    .yourCart .leftCol .productInfo .name h3:first-child {
        font-size: 16px;
        line-height: 1.35;
    }

    .yourCart .leftCol .productInfo .standard .cart-qty-control {
        flex-wrap: wrap !important;
        width: 100%;
    }

    .yourCart .leftCol .productInfo .standard > div:last-child {
        width: 100%;
    }

    .yourCart .leftCol .productInfo hr {
        margin: 16px 0;
    }

    .yourCart .rightCol .btnsOnBill .checkOut,
    .yourCart .rightCol .btnsOnBill .payPoints {
        width: 100%;
    }

    .yourCart .productInfo .form-check-label .box {
        width: 100%;
    }

    .yourCart .productInfo .form-check {
        margin-bottom: 12px;
    }
}

/* ── Wishlist ── */
@media (max-width: 991.98px) {
    .myFavourites {
        padding: 24px 16px !important;
    }

    .myFavourites .head {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }

    .myFavourites .itemBoxes {
        flex-wrap: wrap !important;
        gap: 16px;
        justify-content: space-between;
    }

    .myFavourites .itemBoxes .blueBox {
        width: calc(50% - 8px) !important;
        max-width: none;
        margin: 0 !important;
    }
}

@media (max-width: 575.98px) {
    .myFavourites .itemBoxes .blueBox {
        width: 100% !important;
    }
}

/* ── Orders ── */
@media (max-width: 991.98px) {
    .myOrderSection .tabs_section .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: 1px solid #dee2e6;
        gap: 0;
    }

    .myOrderSection .tabs_section .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .myOrderSection .tabs_section .nav-link {
        white-space: nowrap;
        font-size: 13px;
        padding: 10px 14px;
    }
}

@media (max-width: 767.98px) {
    .myOrderSection .tab-content .tab-pane .processingBox .one,
    .myOrderSection .tab-content .tab-pane .deliveredBox .one,
    .myOrderSection .tab-content .tab-pane .cancelledBox .one {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px;
    }

    .myOrderSection .tab-content .tab-pane .processingBox .two,
    .myOrderSection .tab-content .tab-pane .deliveredBox .two,
    .myOrderSection .tab-content .tab-pane .cancelledBox .two {
        flex-wrap: wrap !important;
        gap: 12px;
    }

    .myOrderSection .tab-content .tab-pane .processingBox .two .data,
    .myOrderSection .tab-content .tab-pane .deliveredBox .two .data,
    .myOrderSection .tab-content .tab-pane .cancelledBox .two .data {
        flex: 1 1 calc(50% - 8px);
        min-width: 130px;
    }

    .myOrderSection .tab-content .tab-pane .bothParts {
        flex-direction: column !important;
    }

    .myOrderSection .tab-content .tab-pane .bothParts .line,
    .myOrderSection .tab-content .tab-pane .bothParts .orderInfo {
        width: 100% !important;
        max-width: 100% !important;
    }

    .myOrderSection .tab-content .tab-pane .bothParts .line ul,
    .myOrderSection .tab-content .tab-pane .bothParts .orderInfo ul {
        flex-direction: column !important;
        gap: 12px;
    }

    .myOrderSection .tab-content .tab-pane .bothParts .line ul li::after {
        display: none !important;
    }
}

/* ── Order detail ── */
@media (max-width: 767.98px) {
    .orderInfoHead .leftSide h3 {
        font-size: 20px;
    }

    .orderInfoHead .rightSide {
        display: flex;
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
        margin-top: 12px;
    }

    .orderInfoHead .rightSide .duobtn,
    .orderInfoHead .rightSide .orderbtn {
        width: 100%;
        text-align: center;
    }

    .aboutOrder .fullLine,
    .trackingOrder .fullLine {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px;
    }

    .trackingOrderSecond .bothParts {
        flex-direction: column !important;
    }
}

/* ── Hero banner ── */
@media (max-width: 767.98px) {
    .bannerSec .logoBanner {
        max-width: 80px !important;
    }

    .bannerSec .imgBox img:first-child {
        min-height: 180px;
        object-fit: cover;
    }
}

/* ── Rewards ── */
@media (max-width: 767.98px) {
    .bannerRewards {
        padding: 48px 0 !important;
    }

    .bannerRewards .text h2 {
        font-size: 26px !important;
        line-height: 1.25;
    }

    .rewardsBox {
        padding: 24px 0 40px !important;
    }

    .rewardsBox .mainBox {
        padding: 16px 12px !important;
    }

    .rewardsBox .rewards-balance-info h3 {
        font-size: 24px !important;
    }

    .rewardsBox .rewards-filter-btns {
        width: 100%;
    }

    .rewardsBox .rewards-filter-btns .btn {
        flex: 1 1 auto;
    }

    .rewardsBox .rewards-history-item {
        align-items: flex-start;
    }

    .rewardsBox .rewards-history-item .item-points {
        font-size: 14px;
    }
}

/* ── Footer features strip ── */
@media (max-width: 767.98px) {
    .conditions {
        padding: 24px 0 !important;
    }

    .conditions .first {
        margin-bottom: 16px;
        align-items: flex-start !important;
    }

    .conditions .texts h3 {
        font-size: 16px;
    }

    .conditions .texts h6 {
        font-size: 13px;
    }
}

/* ── Pagination ── */
@media (max-width: 575.98px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    .pagination .page-link {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* ── Modals (login etc.) ── */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 12px;
        max-width: calc(100% - 24px);
    }
}
