/* Kalpamart storefront responsive overlay. Loaded last. Does not change JS/business logic. */

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

.body-wrap {
    min-height: 100%;
}

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

img {
    height: auto;
}

.container {
    width: 100% !important;
    max-width: 1400px;
    padding-left: clamp(12px, 3vw, 24px);
    padding-right: clamp(12px, 3vw, 24px);
}

.logo-bar-area .navbar-brand img {
    max-height: 52px;
    width: auto !important;
    max-width: 100%;
}

.logo-bar-area .search-box.px-4 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

.nav-box-link,
.hamburger-icon,
.nav-search-box a,
.nav-cart-box .nav-box-link {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dropdown-cart,
.dropdown-menu.dropdown-menu-right {
    max-width: min(360px, calc(100vw - 24px));
}

.product-title,
.fit-title1,
.dc-product-name {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.product-box-1 .card-image a,
.product-box-2 .product-image,
.product-box-2.alt-box .product-image {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.product-box-1 .card-image a {
    aspect-ratio: 1 / 1;
    height: auto;
}

.footer-top .heading.heading-xs a,
.footer-top p.heading a {
    display: inline;
    white-space: normal;
}

.footer-top p.heading {
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.modal-content,
.modal-dialog {
    max-width: calc(100vw - 16px);
}

.modal-body {
    max-height: min(80vh, 720px);
    overflow-y: auto;
}

.closebutton {
    right: 8px !important;
    top: 8px !important;
    z-index: 2;
}

.moreproductbtn {
    width: auto !important;
    max-width: 280px;
    margin: 16px auto !important;
    text-align: center;
}

.moreproductbtn .nav,
.moreproductbtn .d-none.d-lg-inline-block {
    display: inline-block !important;
    float: none !important;
    width: 100%;
}

.moreproductbtn a {
    display: block !important;
    padding: 12px 16px;
    min-height: 44px;
}

.form-inline.pull-right {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.coupon_section .form-inline {
    width: 100%;
    justify-content: stretch;
}

.coupon_section .form-group,
.coupon_section .form-control {
    flex: 1 1 160px;
    max-width: 100%;
}

.table-responsive,
.cart-tab-content,
.product-desc-tab,
.tab-content {
    max-width: 100%;
}

.product-desc-tab img,
.product-desc-tab table,
.product-desc-tab iframe {
    max-width: 100% !important;
    height: auto;
}

.home-slide .slick-carousel > div,
.home-slide [style*="height:300px"] {
    height: auto !important;
    min-height: 140px;
}

.home-slide img {
    width: 100%;
    height: auto !important;
    max-height: 420px;
    object-fit: contain;
}

#flash-deal-mobile,
#hotsale-mobile {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    white-space: normal !important;
    padding-bottom: 8px;
}

#flash-deal-mobile > div,
#hotsale-mobile > div,
#flash-deal-mobile .col-6 {
    flex: 0 0 min(170px, 70vw);
    width: min(170px, 70vw) !important;
    max-width: 200px;
    display: block !important;
    scroll-snap-align: start;
    white-space: normal;
}

.km-shorts-section,
.km-shorts-track {
    overflow: visible;
}

.storefront-filter-toggle {
    display: none;
}

@media (max-width: 1199.98px) {
    .storefront-filter-toggle {
        display: block;
        width: 100%;
        margin-bottom: 12px;
        min-height: 44px;
    }

    .storefront-filters.collapse:not(.show) {
        display: none;
    }

    .storefront-filters.collapse.show,
    .storefront-filters.collapsing {
        display: block;
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
}

@media (min-width: 1200px) {
    .storefront-filters {
        display: block !important;
        height: auto !important;
    }
}

@media (max-width: 991.98px) {
    .logo-bar-area .search-box.show button[type="submit"] {
        display: block !important;
        min-width: 44px;
        min-height: 44px;
    }

    .logo-bar-area .col-8 {
        flex: 0 0 62%;
        max-width: 62%;
    }

    .logo-bar-area .col-4 {
        flex: 0 0 38%;
        max-width: 38%;
    }

    .main-nav-area + div,
    .logo-bar-area ~ div[style*="margin-top"] {
        margin-top: 12px !important;
    }

    .dropdown-menu.dropdown-menu-right {
        right: 0;
        left: auto;
    }

    .footer-top-bar .col-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .footer-top-box h4 {
        font-size: clamp(12px, 3.2vw, 15px);
        margin-bottom: 0;
    }

    .footer-top-box i {
        font-size: 22px;
    }

    .section-title-1 .heading-5,
    .section-title-1 h3 {
        font-size: clamp(1rem, 3.6vw, 1.35rem);
        float: none !important;
        display: block;
        margin-bottom: 8px;
    }

    .section-title-1 .pull-right,
    .section-title-1 .badge {
        float: none !important;
        display: inline-block;
        margin-top: 4px;
    }

    .product-box-1,
    .product-box-2,
    .product-card-2 {
        height: 100%;
    }

    .product-box-1 .card-body,
    .product-box-2.alt-box {
        padding-bottom: 8px;
    }

    .price-bar,
    .product-price,
    .product-box-1 .price {
        font-size: clamp(13px, 3.4vw, 16px);
    }

    .slick-prev,
    .slick-next,
    .km-shorts-arrow {
        min-width: 36px;
        min-height: 36px;
    }

    .table-cart thead {
        display: none;
    }

    .table-cart,
    .table-cart tbody,
    .table-cart tr,
    .table-cart td {
        display: block;
        width: 100% !important;
        max-width: 100%;
    }

    .table-cart tr.cart-item {
        border: 1px solid #eee;
        border-radius: 10px;
        margin-bottom: 12px;
        padding: 10px;
        background: #fff;
    }

    .table-cart td {
        text-align: left !important;
        padding: 6px 0 !important;
        border: 0 !important;
    }

    .table-cart .d-none.d-md-table-cell,
    .table-cart .d-none.d-lg-table-cell {
        display: block !important;
    }

    .table-cart .product-image img {
        max-width: 88px;
    }

    .table-cart .input-group {
        width: 140px !important;
        max-width: 100%;
    }

    .table-cart .product-remove {
        display: flex !important;
        gap: 16px;
        align-items: center;
    }

    .form-default.p-4 {
        padding: 16px !important;
    }

    #delivery-mobile {
        display: block !important;
        position: static !important;
        margin-top: 16px;
    }

    .inline-button1,
    .inline-button2 {
        min-height: 48px;
        font-size: 14px;
    }

    section:has(.inline-button1),
    section:has(.inline-button2) {
        padding-bottom: 56px;
    }

    .quantity,
    input.quantity,
    .input-group--style-2 {
        max-width: 100%;
    }

    .col-2 + .col-10,
    .product-description .col-2 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .breadcrumb {
        flex-wrap: wrap;
        font-size: 13px;
    }

    .brands-collapse-box {
        height: auto !important;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
    }

    .fluid-paragraph {
        width: 100% !important;
    }
}

@media (max-width: 767.98px) {
    .home-slide img {
        max-height: 220px;
    }

    .flash-content.c-scrollbar,
    .flash-content.c-scrollbar.c-height {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    .footer-top-bar .sct-inner {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .footer-top .col-6 {
        margin-bottom: 16px;
    }

    h1, .heading-1 { font-size: clamp(1.25rem, 5vw, 1.75rem); }
    h2, .heading-2 { font-size: clamp(1.1rem, 4.4vw, 1.5rem); }
    h3, .heading-3, .heading-5 { font-size: clamp(1rem, 3.8vw, 1.25rem); }

    .btn {
        white-space: normal;
    }

    .absolute-close-btn {
        right: 8px;
        top: 8px;
    }

    .container-fluid[style*="90%"] {
        width: 100% !important;
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (max-width: 575.98px) {
    .logo-bar-area .navbar-brand img {
        max-height: 40px;
    }

    .footer-top-box {
        padding: 10px 6px;
    }

    .product-box-2.alt-box .product-image {
        min-height: 140px;
    }

    .nav-box-text {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
    .product-list .col-md-4 {
        margin-bottom: 16px;
    }
}

@media (min-width: 1366px) {
    .container {
        max-width: 1320px;
    }
}

@media (min-width: 1920px) {
    .container {
        max-width: 1400px;
    }
}

.products-pagination .page-item {
    display: none !important;
}

.products-pagination .page-item:first-child,
.products-pagination .page-item:last-child {
    display: inline-flex !important;
}

.products-pagination .pagination {
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
}

.products-pagination .page-link {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@page {
    size: auto;
    margin: 0;
}

@media print {
    html,
    body,
    .body-wrap {
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        background: #fff !important;
    }

    .products-pagination,
    .pagination {
        display: none !important;
    }
}

@media (hover: none) {
    .product-box-1:hover,
    .product-box-2:hover,
    .product-card-2:hover {
        transform: none;
    }
}
