/*
 * KaamMitra module slider styles (Swiper 3.4.2)
 *
 * Moved out of the module templates so they stay readable:
 *   template/extension/module/banner.twig    -> .km-banner-section
 *   template/extension/module/carousel.twig  -> .km-carousel-section
 *   template/extension/module/featured.twig  -> .km-featured-col / .km-featured-section
 * Linked from common/header.twig. Selector names are unchanged, so each block
 * only styles its own module.
 */
/* ==== banner.twig ==== */

    .km-banner-section {
        margin: 0 0 24px;
        padding: 14px;
        background: rgba(255, 255, 255, .9);
        border: 1px solid #dbeee4;
        border-radius: 14px;
        box-shadow: 0 8px 22px rgba(0, 64, 40, .08)
    }

    .km-banner-section .km-banner-viewport {
        margin: 0;
        border: 0;
        border-radius: 10px;
        box-shadow: none;
        overflow: hidden;
        background: #f4fbf6
    }

    .km-banner-section .km-banner-viewport .swiper-container,
    .km-banner-section .km-banner-viewport .swiper-slide {
        border-radius: 10px;
        overflow: hidden;
        background: #f4fbf6
    }

    .km-banner-section .swiper-slide a {
        display: block;
        line-height: 0
    }

    .km-banner-section .swiper-slide img {
        display: block;
        width: 100%;
        height: auto
    }

    .km-banner-section .km-banner-viewport .swiper-pager {
        line-height: 44px
    }

    .km-banner-section .km-banner-viewport .swiper-button-prev,
    .km-banner-section .km-banner-viewport .swiper-button-next {
        width: 44px;
        height: 44px;
        margin-top: -22px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, .95);
        border: 1px solid #cde6da;
        box-shadow: 0 8px 20px rgba(3, 68, 43, .18);
        text-align: center;
        line-height: 44px;
        color: #006642;
        opacity: 1;
        left: 16px;
        right: auto;
        transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease
    }

    .km-banner-section .km-banner-viewport .swiper-button-next {
        left: auto;
        right: 16px
    }

    .km-banner-section .km-banner-viewport .swiper-button-prev:before,
    .km-banner-section .km-banner-viewport .swiper-button-next:before {
        width: auto;
        height: auto;
        line-height: 44px;
        font-size: 20px;
        color: #006642;
        text-shadow: none
    }

    .km-banner-section .km-banner-viewport .swiper-button-prev:hover,
    .km-banner-section .km-banner-viewport .swiper-button-next:hover {
        transform: scale(1.06);
        box-shadow: 0 10px 24px rgba(3, 68, 43, .28)
    }

    .km-banner-section .km-banner-viewport .swiper-button-disabled {
        opacity: .3;
        pointer-events: none
    }

    .km-banner-section .km-banner-viewport .swiper-pagination {
        left: 0;
        bottom: 14px;
        width: 100%;
        text-align: center
    }

    .km-banner-section .km-banner-viewport .swiper-pagination-bullet {
        width: 9px;
        height: 9px;
        margin: 0 5px;
        border-radius: 6px;
        background: #fff;
        box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
        opacity: .85;
        transition: width .2s ease, background .2s ease
    }

    .km-banner-section .km-banner-viewport .swiper-pagination-bullet:hover {
        background: #fff;
        opacity: 1
    }

    .km-banner-section .km-banner-viewport .swiper-pagination-bullet-active {
        width: 26px;
        background: #ff7714;
        opacity: 1;
        box-shadow: 0 3px 10px rgba(255, 119, 20, .45)
    }

    @media (max-width: 767px) {
        .km-banner-section {
            padding: 8px;
            border-radius: 10px
        }

        .km-banner-section .km-banner-viewport .swiper-button-prev,
        .km-banner-section .km-banner-viewport .swiper-button-next {
            width: 36px;
            height: 36px;
            margin-top: -18px;
            left: 8px;
            line-height: 36px
        }

        .km-banner-section .km-banner-viewport .swiper-button-next {
            left: auto;
            right: 8px
        }

        .km-banner-section .km-banner-viewport .swiper-button-prev:before,
        .km-banner-section .km-banner-viewport .swiper-button-next:before {
            line-height: 36px;
            font-size: 17px
        }

        .km-banner-section .km-banner-viewport .swiper-pagination {
            bottom: 10px
        }

        .km-banner-section .km-banner-viewport .swiper-pagination-bullet {
            width: 7px;
            height: 7px;
            margin: 0 4px
        }

        .km-banner-section .km-banner-viewport .swiper-pagination-bullet-active {
            width: 20px
        }
    }

/* ==== carousel.twig ==== */

    .km-carousel-section {
        margin: 0 0 24px;
        padding: 18px 18px 52px;
        background: rgba(255, 255, 255, .9);
        border: 1px solid #dbeee4;
        border-radius: 14px;
        box-shadow: 0 8px 22px rgba(0, 64, 40, .08)
    }

    .km-carousel-section .km-carousel-viewport {
        margin: 0;
        border: 0;
        border-radius: 10px;
        box-shadow: none;
        background: transparent;
        overflow: visible
    }

    .km-carousel-section .km-carousel-viewport .swiper-container {
        padding: 4px 0
    }

    .km-carousel-section .km-carousel-tile {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
        height: 100%;
        min-height: 152px;
        padding: 16px 12px;
        background: #fff;
        border: 1px solid #e3f0e9;
        border-radius: 12px;
        text-align: center;
        text-decoration: none;
        transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease
    }

    .km-carousel-section .km-carousel-tile:hover {
        transform: translateY(-3px);
        border-color: #b8dccb;
        box-shadow: 0 14px 30px rgba(3, 68, 43, .13)
    }

    .km-carousel-section .km-carousel-tile img {
        display: block;
        width: auto;
        max-width: 100%;
        height: auto;
        margin: 0 auto;
        object-fit: contain
    }

    .km-carousel-section .km-carousel-tile small {
        color: #07583b;
        font-family: 'Nunito Sans', sans-serif;
        font-size: 12px;
        font-weight: 800;
        letter-spacing: .3px;
        line-height: 1.3;
        word-break: break-word
    }

    .km-carousel-section .km-carousel-viewport .swiper-pager {
        line-height: 44px
    }

    .km-carousel-section .km-carousel-viewport .swiper-button-prev,
    .km-carousel-section .km-carousel-viewport .swiper-button-next {
        width: 44px;
        height: 44px;
        margin-top: -22px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, .95);
        border: 1px solid #cde6da;
        box-shadow: 0 8px 20px rgba(3, 68, 43, .18);
        text-align: center;
        line-height: 44px;
        color: #006642;
        opacity: 1;
        left: -6px;
        right: auto;
        z-index: 12;
        transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease
    }

    .km-carousel-section .km-carousel-viewport .swiper-button-next {
        left: auto;
        right: -6px
    }

    .km-carousel-section .km-carousel-viewport .swiper-button-prev:before,
    .km-carousel-section .km-carousel-viewport .swiper-button-next:before {
        width: auto;
        height: auto;
        line-height: 44px;
        font-size: 20px;
        color: #006642;
        text-shadow: none
    }

    .km-carousel-section .km-carousel-viewport .swiper-button-prev:hover,
    .km-carousel-section .km-carousel-viewport .swiper-button-next:hover {
        transform: scale(1.06);
        box-shadow: 0 10px 24px rgba(3, 68, 43, .28)
    }

    .km-carousel-section .km-carousel-viewport .swiper-button-disabled {
        opacity: .3;
        pointer-events: none
    }

    .km-carousel-section .km-carousel-viewport .swiper-pagination {
        left: 0;
        bottom: -36px;
        width: 100%;
        text-align: center
    }

    .km-carousel-section .km-carousel-viewport .swiper-pagination-bullet {
        width: 9px;
        height: 9px;
        margin: 0 5px;
        border-radius: 6px;
        background: #057347;
        box-shadow: 0 2px 6px rgba(3, 68, 43, .25);
        opacity: .35;
        transition: width .2s ease, background .2s ease, opacity .2s ease
    }

    .km-carousel-section .km-carousel-viewport .swiper-pagination-bullet:hover {
        opacity: .7
    }

    .km-carousel-section .km-carousel-viewport .swiper-pagination-bullet-active {
        width: 26px;
        background: #ff7714;
        opacity: 1;
        box-shadow: 0 3px 10px rgba(255, 119, 20, .45)
    }

    @media (max-width: 767px) {
        .km-carousel-section {
            padding: 14px 14px 48px;
            border-radius: 10px
        }

        .km-carousel-section .km-carousel-tile {
            min-height: 132px;
            padding: 12px 10px;
            gap: 8px
        }

        .km-carousel-section .km-carousel-viewport .swiper-button-prev,
        .km-carousel-section .km-carousel-viewport .swiper-button-next {
            width: 36px;
            height: 36px;
            margin-top: -18px;
            left: -4px;
            line-height: 36px
        }

        .km-carousel-section .km-carousel-viewport .swiper-button-next {
            left: auto;
            right: -4px
        }

        .km-carousel-section .km-carousel-viewport .swiper-button-prev:before,
        .km-carousel-section .km-carousel-viewport .swiper-button-next:before {
            line-height: 36px;
            font-size: 17px
        }

        .km-carousel-section .km-carousel-viewport .swiper-pagination {
            bottom: -32px
        }

        .km-carousel-section .km-carousel-viewport .swiper-pagination-bullet {
            width: 7px;
            height: 7px;
            margin: 0 4px
        }

        .km-carousel-section .km-carousel-viewport .swiper-pagination-bullet-active {
            width: 20px
        }
    }

/* ==== featured.twig ==== */

    .km-featured-col {
        min-width: 0
    }

    .km-featured-col>.km-module-section {
        /* .km-module-section is a grid (kaammitar.css) and its auto column track
           would size itself from the swiper slides, blowing the container up to
           tens of thousands of px wide - so lay this section out as a block. */
        display: block;
        margin: 0;
        padding: 18px 18px 54px
    }

    .km-featured-section .km-module-heading {
        margin-bottom: 6px
    }

    .km-featured-section .km-module-heading h2 {
        font-size: 13px
    }

    .km-featured-section .km-featured-viewport {
        margin: 0;
        border: 0;
        border-radius: 10px;
        box-shadow: none;
        background: transparent;
        overflow: visible
    }

    .km-featured-section .km-featured-viewport .swiper-container {
        padding: 4px 0
    }

    .km-featured-section .swiper-slide {
        height: auto
    }

    .km-featured-section .km-product-card {
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 2px;
    }

    .km-featured-section .km-product-image {
         height: 60px;
        width: 60px;
        margin: auto;
        
    }

    .km-featured-section .km-product-body {
        flex: 1;
        padding: 0px 8px 0px
    }

    .km-featured-section .km-product-body h3 {
        min-height: 18px;
        margin: 4px 0 4px;
        font-size: 12px;
        line-height: 1.25;
        display: block
    }

    .km-featured-section .km-product-body h3 a {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        color: #06452e;
        text-decoration: none
    }

    .km-featured-section .km-product-body h3 a:hover {
        color: #057347
    }

    .km-featured-section .km-product-body strong {
        margin-top: 4px;
        font-size: 12px
    }

    .km-featured-section .km-product-body strong span {
        font-size: 11px
    }

    .km-featured-section .km-product-body small {
        margin-top: 4px;
        font-size: 11px
    }

    .km-featured-section .km-product-actions {
        gap: 6px;
        padding: 0 10px 10px
    }

    .km-featured-section .km-product-actions button {
        min-height: 25px;
        padding: 6px 6px;
        font-size: 9px;
        line-height: 1.2
    }

    .km-featured-section .km-product-actions button:first-child {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .km-featured-section .km-product-actions button:not(:first-child) {
        flex: 0 0 32px;
        width: 32px
    }

    .km-featured-section .km-featured-viewport .swiper-pager {
        line-height: 44px
    }

    .km-featured-section .km-featured-viewport .swiper-button-prev,
    .km-featured-section .km-featured-viewport .swiper-button-next {
        width: 44px;
        height: 44px;
        margin-top: -22px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, .95);
        border: 1px solid #cde6da;
        box-shadow: 0 8px 20px rgba(3, 68, 43, .18);
        text-align: center;
        line-height: 44px;
        color: #006642;
        opacity: 1;
        left: -6px;
        right: auto;
        z-index: 12;
        transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease
    }

    .km-featured-section .km-featured-viewport .swiper-button-next {
        left: auto;
        right: -6px
    }

    .km-featured-section .km-featured-viewport .swiper-button-prev:before,
    .km-featured-section .km-featured-viewport .swiper-button-next:before {
        width: auto;
        height: auto;
        line-height: 44px;
        font-size: 20px;
        color: #006642;
        text-shadow: none
    }

    .km-featured-section .km-featured-viewport .swiper-button-prev:hover,
    .km-featured-section .km-featured-viewport .swiper-button-next:hover {
        transform: scale(1.06);
        box-shadow: 0 10px 24px rgba(3, 68, 43, .28)
    }

    .km-featured-section .km-featured-viewport .swiper-button-disabled {
        opacity: .3;
        pointer-events: none
    }

    .km-featured-section .km-featured-viewport .swiper-pagination {
        left: 0;
        bottom: -38px;
        width: 100%;
        text-align: center
    }

    .km-featured-section .km-featured-viewport .swiper-pagination-bullet {
        width: 9px;
        height: 9px;
        margin: 0 5px;
        border-radius: 6px;
        background: #057347;
        box-shadow: 0 2px 6px rgba(3, 68, 43, .25);
        opacity: .35;
        transition: width .2s ease, background .2s ease, opacity .2s ease
    }

    .km-featured-section .km-featured-viewport .swiper-pagination-bullet:hover {
        opacity: .7
    }

    .km-featured-section .km-featured-viewport .swiper-pagination-bullet-active {
        width: 26px;
        background: #ff7714;
        opacity: 1;
        box-shadow: 0 3px 10px rgba(255, 119, 20, .45)
    }

    @media (max-width: 767px) {
        .km-featured-col>.km-module-section {
            padding: 14px 14px 50px
        }

        .km-featured-section .km-module-heading h2 {
            font-size: 19px
        }

        .km-featured-section .km-product-image {
            height: 150px
        }

        .km-featured-section .km-featured-viewport .swiper-button-prev,
        .km-featured-section .km-featured-viewport .swiper-button-next {
            width: 36px;
            height: 36px;
            margin-top: -18px;
            left: -4px;
            line-height: 36px
        }

        .km-featured-section .km-featured-viewport .swiper-button-next {
            left: auto;
            right: -4px
        }

        .km-featured-section .km-featured-viewport .swiper-button-prev:before,
        .km-featured-section .km-featured-viewport .swiper-button-next:before {
            line-height: 36px;
            font-size: 17px
        }

        .km-featured-section .km-featured-viewport .swiper-pagination {
            bottom: -34px
        }

        .km-featured-section .km-featured-viewport .swiper-pagination-bullet {
            width: 7px;
            height: 7px;
            margin: 0 4px;
            font-size: 10px;
        }

        .km-featured-section .km-featured-viewport .swiper-pagination-bullet-active {
            width: 20px
        }
    }
