/* Published CMS page/block HTML on the Woo storefront */

body.kehkashan-hide-page-title .entry-header,
body.kehkashan-hide-page-title .entry-header .entry-title,
body.kehkashan-hide-page-title .ast-single-entry-banner {
    display: none !important;
}

.cms-page-body,
.kehkashan-cms-block,
.kehkashan-cms-widget {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

.kc-footer .cms-html,
.kc-footer .cms-page-body,
.kc-info-content .cms-html,
.kc-info-content .cms-page-body {
    display: contents;
}

.cms-page-body *,
.kehkashan-cms-block *,
.kehkashan-cms-widget * {
    box-sizing: border-box;
}

.cms-page-body img,
.cms-page-body video,
.cms-page-body iframe,
.cms-page-body table,
.cms-page-body .cms-banner,
.cms-page-body .cms-slider,
.cms-page-body .cms-top-main-banner,
.kehkashan-cms-block img,
.kehkashan-cms-widget img {
    max-width: 100%;
}

.cms-page-body img,
.cms-page-body video,
.cms-page-body .cms-top-main-banner img,
.cms-page-body .cms-image img,
.cms-page-body .cms-banner img,
.cms-page-body .cms-slide img {
    height: auto;
    display: block;
}

.cms-page-body iframe {
    width: 100%;
    border: 0;
}

.cms-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    min-width: 0;
}

.cms-columns.cols-1 { grid-template-columns: minmax(0, 1fr); }
.cms-columns.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cms-columns.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cms-columns.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cms-columns.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.cms-col,
.cms-row,
.cms-builder-element {
    min-width: 0;
    max-width: 100%;
}

/* Products carousels must not be clipped by the builder wrapper. */
.cms-builder-element:has(.cms-products) {
    overflow: visible;
    max-width: 100%;
}

.cms-tab-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.cms-tab-panel { display: none; }
.cms-tab-panel.is-active { display: block; }

.cms-products {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 8px 0 16px;
}

.cms-products-title {
    margin: 0 0 12px;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.cms-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
    gap: 16px;
}

/* Carousel (Trending Now style) — works before/without JS */
.cms-products--carousel,
.cms-products.kc-home-product-carousel {
    overflow: visible;
}

.cms-products--carousel .kc-home-carousel-viewport,
.cms-products--carousel .kc-product-carousel-viewport,
.cms-products.kc-home-product-carousel .kc-home-carousel-viewport {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    padding: 2px 2px 10px;
}

.cms-products--carousel .cms-products-grid.kc-product-grid,
.cms-products--carousel.kc-home-product-carousel .kc-product-grid,
.cms-products.kc-home-product-carousel .kc-product-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 14px;
    grid-template-columns: none !important;
    width: max-content !important;
    min-width: 100%;
    max-width: none !important;
    padding-bottom: 4px;
}

.cms-products--carousel .kc-pcard,
.cms-products.kc-home-product-carousel .kc-pcard {
    flex: 0 0 clamp(160px, 18vw, 220px) !important;
    width: clamp(160px, 18vw, 220px) !important;
    max-width: 220px !important;
    min-width: clamp(160px, 18vw, 220px) !important;
    scroll-snap-align: start;
    background: #fff;
}

.cms-products--carousel .kc-pcard-img-wrap,
.cms-products.kc-home-product-carousel .kc-pcard-img-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f3f3f3;
}

.cms-products--carousel .kc-pcard-img,
.cms-products.kc-home-product-carousel .kc-pcard-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cms-products--carousel .kc-pcard-info {
    padding: 8px 4px 10px;
}

.cms-products--carousel .kc-pcard-title {
    margin: 0 0 4px;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 600;
}

.cms-products--carousel .kc-pcard-price {
    font-size: 13px;
}

.cms-products--carousel .kc-product-carousel-nav {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.cms-products--carousel .kc-carousel-arrow {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid #d5d5d5;
    background: #fff;
    cursor: pointer;
    line-height: 1;
    font-size: 18px;
}

/* Animations must never leave products invisible if JS never runs. */
[data-cms-animation] {
    opacity: 1;
    transform: none;
}

.cms-slider {
    display: grid;
    gap: 0;
    overflow: hidden;
    min-width: 0;
}

.cms-video,
.cms-map {
    width: 100%;
    min-height: 220px;
}

.cms-divider {
    border: 0;
    border-top-style: solid;
    margin: 16px 0;
}

.cms-divider.cms-divider--none {
    border: 0;
    background: transparent;
    height: 0;
}

.cms-button-wrap {
    margin: 0;
}

.cms-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    max-width: 100%;
    text-decoration: none;
}

body.kehkashan-layout-2columns-left .cms-page-body,
body.kehkashan-layout-2columns-right .cms-page-body {
    max-width: 72rem;
}
body.kehkashan-layout-2columns-left .cms-page-body {
    margin-right: auto;
    padding-right: 2rem;
}
body.kehkashan-layout-2columns-right .cms-page-body {
    margin-left: auto;
    padding-left: 2rem;
}
body.kehkashan-layout-3columns .cms-page-body {
    max-width: 58rem;
    margin-left: auto;
    margin-right: auto;
}

/* Separate mobile design (when the CMS saved a mobile tree) */
.cms-page-body--split .cms-vp-mobile { display: none; }
.cms-page-body--split .cms-vp-desktop { display: block; }

.cms-vp-mobile .cms-columns,
.cms-vp-mobile .cms-columns.cols-1,
.cms-vp-mobile .cms-columns.cols-2,
.cms-vp-mobile .cms-columns.cols-3,
.cms-vp-mobile .cms-columns.cols-4,
.cms-vp-mobile .cms-columns.cols-5,
.cms-vp-mobile .cms-columns.cols-6 {
    grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 1023px) {
    .cms-page-body--responsive .cms-columns.cols-4,
    .cms-page-body--responsive .cms-columns.cols-5,
    .cms-page-body--responsive .cms-columns.cols-6 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .cms-page-body--split .cms-vp-desktop { display: none; }
    .cms-page-body--split .cms-vp-mobile { display: block; }

    .cms-page-body--responsive .cms-columns,
    .cms-page-body--responsive .cms-columns.cols-1,
    .cms-page-body--responsive .cms-columns.cols-2,
    .cms-page-body--responsive .cms-columns.cols-3,
    .cms-page-body--responsive .cms-columns.cols-4,
    .cms-page-body--responsive .cms-columns.cols-5,
    .cms-page-body--responsive .cms-columns.cols-6 {
        grid-template-columns: minmax(0, 1fr);
    }

    .cms-products-grid:not(.kc-product-grid) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cms-products--carousel .cms-products-grid.kc-product-grid,
    .cms-products--carousel.kc-home-product-carousel .kc-product-grid,
    .cms-products.kc-home-product-carousel .kc-product-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        grid-template-columns: none !important;
    }

    .cms-products--carousel .kc-pcard,
    .cms-products.kc-home-product-carousel .kc-pcard {
        flex: 0 0 min(46vw, 200px) !important;
        width: min(46vw, 200px) !important;
        max-width: 200px !important;
        min-width: min(46vw, 200px) !important;
    }

    .cms-products--carousel .kc-product-carousel-nav {
        display: none !important;
    }
}
