/**
 * ============================================================================
 * Kasi Mattress
 * ----------------------------------------------------------------------------
 * File: assets/css/shop.css
 * Module: Shop
 * Version: 4.1.0
 * ============================================================================
 */


/* ============================================================================
   SHOP HERO
   ========================================================================== */

.km-shop-hero {
    width: 100%;
}

.km-shop-hero .km-container {
    width: 100%;
}


/* ============================================================================
   BREADCRUMB
   ========================================================================== */

.km-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;

    margin-bottom: 24px;
}

.km-breadcrumb a {
    text-decoration: none;
}

.km-breadcrumb span {
    opacity: 0.7;
}


/* ============================================================================
   SHOP HEADING ROW
   ========================================================================== */

.km-shop-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 40px;

    width: 100%;
}


/* ============================================================================
   SHOP HEADING
   ========================================================================== */

.km-shop-heading {
    flex: 1 1 auto;

    min-width: 0;
}

.km-shop-heading h1 {
    margin-top: 0;
    margin-bottom: 10px;
}

.km-shop-heading p {
    margin: 0;

    max-width: 720px;

    line-height: 1.7;
}


/* ============================================================================
   CATEGORY BOX
   ========================================================================== */

.km-shop-category-box {
    position: relative;

    width: 270px;

    flex: 0 0 270px;

    z-index: 20;
}


/* ============================================================================
   CATEGORY TOGGLE
   ========================================================================== */

.km-shop-category-toggle {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 14px 18px;

    border: 1px solid #ddd;

    background: #fff;

    color: inherit;

    cursor: pointer;

    font: inherit;

    font-weight: 600;

    text-align: left;

    border-radius: 6px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.km-shop-category-toggle:hover,
.km-shop-category-box.is-open .km-shop-category-toggle {
    border-color: #bbb;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.08);
}


/* ============================================================================
   CATEGORY LABEL
   ========================================================================== */

.km-shop-category-label {
    min-width: 0;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* ============================================================================
   CATEGORY ARROW
   ========================================================================== */

.km-shop-category-arrow {
    flex: 0 0 auto;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 22px;
    height: 22px;

    font-size: 18px;

    line-height: 1;

    transition:
        transform 0.2s ease;
}


.km-shop-category-arrow.is-open {
    transform: rotate(180deg);
}


/* ============================================================================
   CATEGORY MENU
   ========================================================================== */

.km-shop-category-menu {
    position: absolute;

    top: calc(100% + 6px);

    left: 0;

    width: 100%;

    max-height: 360px;

    overflow-y: auto;

    border: 1px solid #ddd;

    border-radius: 6px;

    background: #fff;

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.12);

    z-index: 100;

    padding: 5px 0;
}


/* ============================================================================
   CATEGORY LINKS
   ========================================================================== */

.km-shop-category-menu a {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    padding: 11px 17px;

    color: inherit;

    text-decoration: none;

    line-height: 1.4;

    transition:
        background 0.2s ease,
        padding-left 0.2s ease;
}


.km-shop-category-menu a:hover {
    background: #f7f7f7;

    padding-left: 21px;
}


/* ============================================================================
   ACTIVE CATEGORY
   ========================================================================== */

.km-shop-category-menu a.is-active {
    background: #f2f2f2;

    font-weight: 600;
}


.km-category-check {
    flex: 0 0 auto;

    font-weight: 700;
}


/* ============================================================================
   SHOP SECTION
   ========================================================================== */

.km-shop {
    width: 100%;
}


/* ============================================================================
   FULL WIDTH SHOP CONTENT
   ========================================================================== */

.km-shop-content-full {
    width: 100%;
}


/* ============================================================================
   SHOP TOOLBAR
   ========================================================================== */

.km-shop-toolbar {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 28px;

    padding-bottom: 16px;

    border-bottom: 1px solid #eee;
}


.km-shop-results-count {
    display: flex;

    align-items: center;

    gap: 5px;
}


.km-shop-results-count strong {
    font-weight: 700;
}


/* ============================================================================
   CLEAR CATEGORY FILTER
   ========================================================================== */

.km-shop-clear-filter {
    display: inline-flex;

    align-items: center;

    padding: 8px 14px;

    border: 1px solid #ddd;

    border-radius: 5px;

    text-decoration: none;

    font-size: 14px;

    font-weight: 600;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}


.km-shop-clear-filter:hover {
    background: #f7f7f7;

    border-color: #bbb;
}


/* ============================================================================
   PRODUCT GRID
   ========================================================================== */

.km-product-grid {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 24px;
}


/* ============================================================================
   EMPTY / ERROR MESSAGE
   ========================================================================== */

.km-shop-message {
    width: 100%;

    padding: 60px 24px;

    text-align: center;

    border: 1px solid #eee;

    border-radius: 8px;
}


.km-shop-message h2 {
    margin-top: 0;

    margin-bottom: 10px;
}


.km-shop-message p {
    margin: 0;

    line-height: 1.7;
}


/* ============================================================================
   EMPTY SHOP BUTTON
   ========================================================================== */

.km-shop-empty-button {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    margin-top: 20px;

    padding: 11px 18px;

    border-radius: 5px;

    text-decoration: none;

    font-weight: 600;
}


/* ============================================================================
   TABLET
   ========================================================================== */

@media (max-width: 1100px) {

    .km-product-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


/* ============================================================================
   SMALL TABLET
   ========================================================================== */

@media (max-width: 850px) {

    .km-shop-heading-row {
        gap: 25px;
    }

    .km-shop-category-box {
        width: 240px;

        flex-basis: 240px;
    }

    .km-product-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* ============================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 680px) {

    .km-shop-heading-row {
        flex-direction: column;

        gap: 22px;
    }


    .km-shop-heading {
        width: 100%;
    }


    .km-shop-category-box {
        width: 100%;

        flex: 0 0 auto;
    }


    .km-shop-category-menu {
        position: absolute;
    }


    .km-shop-toolbar {
        align-items: flex-start;

        flex-direction: column;

        gap: 12px;
    }


    .km-product-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 15px;
    }

}


/* ============================================================================
   SMALL MOBILE
   ========================================================================== */

@media (max-width: 480px) {

    .km-product-grid {
        grid-template-columns: 1fr;
    }

}