/* ===================================
   PAGES RESPONSIVE STYLES
   Extracted from custom-fixes.css
   =================================== */

@media (max-width: 991.98px) {
    .topsell__area-1 .product__item:not(.product__item-d) .action-btn {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
    }

    .topsell__area-1 .product__item:not(.product__item-d) .action-btn i {
        font-size: 12px !important;
    }
}

@media (max-width: 575.98px) {
    .topsell__area-1 .product__item:not(.product__item-d) .action-btn {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
    }

    .topsell__area-1 .product__item:not(.product__item-d) .action-btn i {
        font-size: 10px !important;
    }
}

@media (min-width: 1200px) {
    .col-xl-2-5 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

@media (min-width: 576px) {
    .top-deals-section .col-xl-2-5,
    .top-selling-section .col-xl-2-5,
    .recommended-section .col-xl-2-5 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 575px) {
    .section__head {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }
    
    .offer-time {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .countdown-inner ul li {
        font-size: 11px;
    }
    
    .bs-button-prev {
        left: 5px;
    }
    
    .bs-button-next {
        right: 5px;
    }
    
    .product__content h6 {
        font-size: 14px;
        min-height: auto;
    }

    .topsell__area-1 .section__head.mb-30 {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px;
        width: 100%;
    }

    .topsell__area-1 .section__head.mb-30 .section__title {
        min-width: 0;
        flex: 1 1 auto;
    }

    .topsell__area-1 .section__head.mb-30 .button-wrap {
        margin-left: auto;
        flex: 0 0 auto;
        display: flex;
        justify-content: flex-end;
    }

    .topsell__area-1 .section__head.mb-30 .button-wrap a {
        white-space: nowrap;
        font-size: 13px;
        line-height: 1.2;
    }
}

/* Product sections: mobile 2-col, tablet 3-col */
@media (max-width: 575.98px) {
    .top-deals-section .col-xl-3,
    .top-selling-section .col-xl-3,
    .recommended-section .col-xl-3,
    .recommended-for-you-section .col-xl-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .top-deals-section .product__item,
    .top-selling-section .product__item,
    .recommended-section .product__item,
    .recommended-for-you-section .product__item {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .top-deals-section .product__thumb,
    .top-selling-section .product__thumb,
    .recommended-section .product__thumb,
    .recommended-for-you-section .product__thumb {
        aspect-ratio: 3 / 4;
        height: auto !important;
        overflow: hidden !important;
    }

    .top-deals-section .product__thumb img,
    .top-selling-section .product__thumb img,
    .recommended-section .product__thumb img,
    .recommended-for-you-section .product__thumb img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
    }

    .top-deals-section .product__content h6,
    .top-selling-section .product__content h6,
    .recommended-section .product__content h6,
    .recommended-for-you-section .product__content h6 {
        font-size: 13px !important;
        line-height: 1.3 !important;
        min-height: 34px !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .top-deals-section .buy-now-btn-card,
    .top-selling-section .buy-now-btn-card,
    .recommended-section .buy-now-btn-card,
    .recommended-for-you-section .buy-now-btn-card {
        font-size: 12px !important;
        padding: 8px 6px !important;
    }

    /* Top Featured: inner product cards 2 per row on mobile */
    .recommended-section .col-xl-6.col-lg-6.col-md-12 > .row {
        margin-left: -6px;
        margin-right: -6px;
    }

    .recommended-section .col-xl-6.col-lg-6.col-md-12 > .row > .col-xl-6.col-lg-6.col-md-6.col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
        padding-left: 6px;
        padding-right: 6px;
    }
}

@media (min-width: 1200px) {
    .col-xl-2-5 {
        flex: 0 0 20%;
        max-width: 20%;
    }
    
    .col-xl-1-5 {
        flex: 0 0 12.5%;
        max-width: 12.5%;
    }
}

@media (max-width: 767px) {
    .banner__content h6 {
        font-size: 14px;
    }
    
    .product__add-cart .d-flex {
        gap: 5px !important;
    }
    
    .product__add-cart button {
        padding: 8px 6px !important;
        font-size: 12px !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .product__content h6 {
        font-size: 15px;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .top-deals-section .col-xl-3,
    .top-selling-section .col-xl-3,
    .recommended-section .col-xl-3,
    .recommended-for-you-section .col-xl-3 {
        flex: 0 0 33.3333%;
        max-width: 33.3333%;
    }

    .top-deals-section .product__item,
    .top-selling-section .product__item,
    .recommended-section .product__item,
    .recommended-for-you-section .product__item {
        height: 100%;
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 767px) {
    .product__thumb {
        height: 220px;
    }
}

/* Countdown timer: smaller on tablet/mobile */
@media (max-width: 991.98px) {
    .offer-time {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .offer-time .offer-title {
        font-size: 13px;
        line-height: 1.2;
        margin-inline-end: 8px;
    }

    .offer-time .countdown {
        max-width: 100%;
    }

    .offer-time .countdown-inner {
        margin-bottom: 0;
        padding: 6px 4px 4px;
    }

    .offer-time .countdown-inner ul {
        display: flex;
        align-items: flex-start;
        justify-content: center;
    }

    .offer-time .countdown-inner ul li {
        font-size: 10px;
        padding: 0 8px;
        line-height: 1.2;
    }

    .offer-time .countdown-inner ul li span {
        font-size: 13px;
    }
}

@media (max-width: 575.98px) {
    .offer-time {
        width: 100%;
        justify-content: flex-start;
    }

    .offer-time .countdown-inner {
        padding: 5px 2px 3px;
    }

    .offer-time .countdown-inner ul li {
        font-size: 9px;
        padding: 0 6px;
    }

    .offer-time .countdown-inner ul li span {
        font-size: 11px;
    }
}

@media (max-width: 399.98px) {
    .offer-time .countdown-inner ul li {
        font-size: 8px;
        padding: 0 4px;
    }

    .offer-time .countdown-inner ul li span {
        font-size: 10px;
    }
}

@media (max-width: 767px) {
    .table {
        min-width: 600px;
    }

    .btn,
    .btn-sm {
        white-space: normal;
    }

    .d-flex.justify-content-between.align-items-center {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .profile-image,
    .profile-image-placeholder {
        width: 120px !important;
        height: 120px !important;
    }
}

/* Home: All Categories responsive behavior */
@media (max-width: 575.98px) {
    .category__area .row.justify-content-between {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 12px !important;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding: 2px 2px 10px;
        margin-right: -4px;
        margin-left: -4px;
        scrollbar-width: none;
    }

    .category__area .row.justify-content-between::-webkit-scrollbar {
        display: none;
    }

    .category__area .row.justify-content-between > div {
        flex: 0 0 112px !important;
        max-width: 112px !important;
        min-width: 112px;
        scroll-snap-align: start;
    }

    .category__area .category__item {
        margin-bottom: 0 !important;
    }

    .category__area .category__item h6 {
        font-size: 12px !important;
        line-height: 1.3 !important;
        min-height: 31px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .category__area .row.justify-content-between {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 14px !important;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding: 2px 2px 10px;
        margin-right: -4px;
        margin-left: -4px;
        scrollbar-width: none;
    }

    .category__area .row.justify-content-between::-webkit-scrollbar {
        display: none;
    }

    .category__area .row.justify-content-between > div {
        flex: 0 0 132px !important;
        max-width: 132px !important;
        min-width: 132px;
        scroll-snap-align: start;
    }

    .category__area .category__item {
        margin-bottom: 0 !important;
    }

    .category__area .category__item h6 {
        font-size: 12px !important;
        line-height: 1.3 !important;
        min-height: 31px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* Home: Features area 4 cards in a single row on mobile/tablet */
@media (max-width: 991.98px) {
    .features__area .features-row {
        --bs-gutter-x: 0;
        --bs-gutter-y: 0;
        flex-wrap: nowrap !important;
        margin-left: 0;
        margin-right: 0;
    }

    .features__area .features-row > .col {
        flex: 0 0 25% !important;
        max-width: 25% !important;
        min-width: 25% !important;
        padding-left: 0;
        padding-right: 0;
    }

    .features__area .features__item {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        height: 100%;
        min-height: 110px;
        padding: 12px 6px;
        border-right: 0;
    }

    .features__area .features__item::after {
        display: none !important;
    }

    .features__area .features__icon {
        margin-right: 0 !important;
        margin-bottom: 6px;
    }

    .features__area .features__icon i {
        font-size: 24px;
    }

    .features__area .features__content h6 {
        font-size: 11px;
        line-height: 1.25;
        margin-bottom: 0;
    }

    .features__area .features__content p {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .features__area .features__item {
        min-height: 100px;
        padding: 10px 4px;
    }

    .features__area .features__icon i {
        font-size: 20px;
    }

    .features__area .features__content h6 {
        font-size: 10px;
    }
}

/* Home: Banner area responsive behavior */
@media (max-width: 575.98px) {
    .banner__area:not(.banner__area-d) .row {
        --bs-gutter-x: 0;
        --bs-gutter-y: 0;
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 8px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        scrollbar-width: none;
    }

    .banner__area:not(.banner__area-d) .row::-webkit-scrollbar {
        display: none;
    }

    .banner__area:not(.banner__area-d) .row > [class*="col-"] {
        flex: 0 0 calc((100% - 16px) / 3) !important;
        max-width: calc((100% - 16px) / 3) !important;
        width: calc((100% - 16px) / 3) !important;
        padding-right: 0;
        padding-left: 0;
    }

    .banner__area:not(.banner__area-d) .banner__item {
        margin-bottom: 0 !important;
        height: 100%;
    }

    .banner__area:not(.banner__area-d) .banner__img {
        aspect-ratio: 3 / 4;
    }

    .banner__area:not(.banner__area-d) .banner__img img {
        width: 100%;
        height: 100%;
        min-height: 0;
        object-fit: cover;
    }

    .banner__area:not(.banner__area-d) .banner__content {
        width: 92%;
        padding: 10px 8px;
    }

    .banner__area:not(.banner__area-d) .banner__content span {
        font-size: 10px;
        margin-bottom: 4px;
    }

    .banner__area:not(.banner__area-d) .banner__content h6 {
        font-size: 11px;
        line-height: 1.25;
        margin-bottom: 4px;
    }

    .banner__area:not(.banner__area-d) .banner__content p {
        font-size: 10px;
        line-height: 1.2;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .banner__area .row {
        --bs-gutter-x: 14px;
        --bs-gutter-y: 14px;
    }

    .banner__area .col-xl-4,
    .banner__area .col-lg-4,
    .banner__area .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .banner__area .banner__item {
        margin-bottom: 14px !important;
    }

    .banner__area .banner__img {
        aspect-ratio: 16 / 10;
    }

    .banner__area .banner__img img {
        width: 100%;
        height: 100%;
        min-height: 0;
        object-fit: cover;
    }

    .banner__area .banner__content {
        padding: 20px 18px;
    }

    .banner__area .banner__content h6 {
        font-size: 18px;
        line-height: 1.3;
        margin-bottom: 10px;
    }
}

/* Top-selling પછીનું banner__area-d responsive */
@media (max-width: 575.98px) {
    .banner__area.banner__area-d .col-xl-6,
    .banner__area.banner__area-d .col-lg-6,
    .banner__area.banner__area-d .col-md-12 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .banner__area.banner__area-d .banner__item {
        margin-bottom: 12px !important;
        position: relative;
        overflow: hidden;
    }

    .banner__area.banner__area-d .banner__img {
        aspect-ratio: 16 / 9;
        overflow: hidden;
    }

    .banner__area.banner__area-d .banner__img img {
        width: 100%;
        height: 100%;
        min-height: 0;
        object-fit: cover;
    }

    .banner__area.banner__area-d .banner__content {
        position: absolute;
        inset: 0;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
        padding: 6px;
        gap: 3px;
    }

    .banner__area.banner__area-d .banner__content span {
        font-size: 9px;
        line-height: 1.15;
        margin-bottom: 0;
    }

    .banner__area.banner__area-d .banner__content h6 {
        font-size: 11px;
        line-height: 1.2;
        margin-bottom: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .banner__area.banner__area-d .banner__content p {
        display: none;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .banner__area.banner__area-d .col-xl-6,
    .banner__area.banner__area-d .col-lg-6,
    .banner__area.banner__area-d .col-md-12 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .banner__area.banner__area-d .banner__img {
        aspect-ratio: 16 / 10;
        overflow: hidden;
    }

    .banner__area.banner__area-d .banner__img img {
        width: 100%;
        height: 100%;
        min-height: 0;
        object-fit: cover;
    }
}

/* Brand partners responsive */
@media (max-width: 575.98px) {
    .brand-area {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    .brand-area .section__head {
        margin-bottom: 16px !important;
    }

    .brand-area .section__title h5 {
        font-size: 18px;
        line-height: 1.25;
    }

    .brand-area .section__title p {
        font-size: 12px;
        line-height: 1.35;
        margin-bottom: 0;
    }

    .brand-area .brand-item {
        padding: 10px !important;
    }

    .brand-area .brand-item img {
        max-height: 44px !important;
        max-width: 110px !important;
        object-fit: contain;
        opacity: 0.75 !important;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .brand-area .brand-item {
        padding: 14px !important;
    }

    .brand-area .brand-item img {
        max-height: 56px !important;
        max-width: 130px !important;
        object-fit: contain;
    }
}

/* Shop: Quick View modal responsive (mobile + tablet only) */
@media (max-width: 991.98px) {
    #productQuickView .modal-dialog {
        max-width: calc(100% - 28px);
        margin: 14px auto;
    }

    #productQuickView .modal-content {
        border-radius: 12px;
    }

    #productQuickView .modal-header {
        padding: 12px 14px 0;
    }

    #productQuickView .modal-title {
        font-size: 17px;
    }

    #productQuickView .modal-body {
        padding: 10px 14px 14px;
    }

    #productQuickView .modal-body .row {
        --bs-gutter-x: 14px;
        --bs-gutter-y: 12px;
        align-items: flex-start !important;
    }

    #productQuickView #qvImage {
        height: 260px !important;
    }

    #productQuickView #qvProductName {
        font-size: 16px;
        line-height: 1.3;
        margin-bottom: 6px !important;
    }

    #productQuickView .rating-inline i {
        font-size: 12px;
    }

    #productQuickView #qvReviews {
        font-size: 12px !important;
    }

    #productQuickView .price-line {
        margin-bottom: 8px !important;
    }

    #productQuickView #qvPriceCurrent {
        font-size: 20px;
        font-weight: 700;
        line-height: 1.1;
    }

    #productQuickView #qvPriceOld {
        font-size: 14px;
    }

    #productQuickView #qvStock {
        margin-bottom: 10px !important;
    }

    #productQuickView #qvLink {
        min-height: 38px;
        padding: 8px 14px;
    }
}

@media (max-width: 575.98px) {
    #productQuickView .modal-dialog {
        max-width: calc(100% - 16px);
        margin: 8px auto;
    }

    #productQuickView .modal-title {
        font-size: 16px;
    }

    #productQuickView .modal-body {
        padding: 8px 10px 12px;
    }

    #productQuickView #qvImage {
        height: 210px !important;
    }

    #productQuickView #qvProductName {
        font-size: 14px;
    }

    #productQuickView #qvPriceCurrent {
        font-size: 18px;
    }

    #productQuickView #qvLink {
        width: 100%;
        text-align: center;
    }
}


