﻿
/* Public Mobile Categories - V3 */

.public-mobile-categories[hidden],
.public-mobile-category__children[hidden] {
    display: none !important;
}

.public-mobile-categories {
    position: fixed;
    inset: 0;
    z-index: 9999;
    direction: rtl;
}

.public-mobile-categories__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 20, .55);
}

.public-mobile-categories__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(88vw, 390px);
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 35px rgba(0, 0, 0, .12);
    animation: mobileCategoriesSlide .22s ease-out;
}

@keyframes mobileCategoriesSlide {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.public-mobile-categories__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #E9E1D6;
}

    .public-mobile-categories__header h2 {
        font-size: 17px;
        font-weight: 700;
        color: #292724;
    }

.public-mobile-categories__close {
    font-size: 30px;
    line-height: 1;
    color: #8A6B46;
    cursor: pointer;
}

.public-mobile-categories__body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px;
}

.public-mobile-categories__all {
    display: block;
    padding: 14px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: #FAF8F4;
    color: #8A6B46;
    font-weight: 700;
}

.public-mobile-category {
    border-bottom: 1px solid #E9E1D6;
}

.public-mobile-category__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.public-mobile-category__title {
    flex: 1;
    padding: 16px 4px;
    font-size: 15px;
    font-weight: 700;
    color: #292724;
}

.public-mobile-category__toggle {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #FAF8F4;
    color: #8A6B46;
    cursor: pointer;
    transition: background .2s ease;
}

    .public-mobile-category__toggle[aria-expanded="true"] {
        background: #F0E7DA;
    }

    .public-mobile-category__toggle span {
        display: inline-block;
        transition: transform .2s ease;
    }

    .public-mobile-category__toggle[aria-expanded="true"] span {
        transform: rotate(180deg);
    }

.public-mobile-category__children {
    padding: 0 12px 12px 0;
    border-right: 2px solid #B79B78;
    margin-right: 8px;
}

.public-mobile-subcategory__title {
    flex: 1;
    padding: 13px 4px;
    font-size: 14px;
    font-weight: 600;
    color: #51483E;
}

.public-mobile-grandchild {
    display: block;
    padding: 10px 12px;
    font-size: 13px;
    color: #766A5C;
}

.public-mobile-categories__all:hover,
.public-mobile-category a:hover {
    color: #8A6B46;
}

.public-mobile-categories__empty {
    padding: 20px 0;
    text-align: center;
    color: #766A5C;
}

/* Dark Mode */

.dark .public-mobile-categories__panel {
    background: #211F1D;
}

.dark .public-mobile-categories__header,
.dark .public-mobile-category {
    border-color: #423B33;
}

    .dark .public-mobile-categories__header h2,
    .dark .public-mobile-category__title {
        color: #F5EFE7;
    }

.dark .public-mobile-subcategory__title,
.dark .public-mobile-grandchild {
    color: #D9C3A5;
}

.dark .public-mobile-categories__all,
.dark .public-mobile-category__toggle {
    background: #292724;
    color: #D9C3A5;
}

@media (min-width: 1024px) {
    .public-mobile-categories {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .public-mobile-categories__panel {
        animation: none;
    }
}






/* ===================================================
   WEBSAN MOBILE BOTTOM NAV - FINAL V3
   Premium floating navigation
   Light / Dark / RTL
   =================================================== */

.ws-mobile-nav {
    display: none;
}

@media (max-width: 767px) {

    .ws-mobile-nav {
        position: fixed;
        z-index: 1000;
        bottom: max(14px, env(safe-area-inset-bottom));
        left: 50%;
        transform: translateX(-50%);
        display: block;
        width: calc(100% - 28px);
        max-width: 490px;
        direction: rtl;
        overflow: visible;
    }

        .ws-mobile-nav,
        .ws-mobile-nav * {
            box-sizing: border-box;
        }

    .ws-mobile-nav__inner {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-items: center;
        min-height: 84px;
        padding: 8px 10px;
        border: 1px solid rgba(255,255,255,.08);
        border-radius: 29px;
        background: #050d20;
        box-shadow: 0 14px 38px rgba(0,0,0,.19), 0 3px 9px rgba(0,0,0,.07);
        overflow: visible;
    }

    .ws-mobile-nav__item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 7px;
        width: 100%;
        min-width: 0;
        min-height: 62px;
        padding: 5px 2px;
        border: 0;
        border-radius: 15px;
        background: transparent;
        color: #9ca9be;
        font: inherit;
        text-align: center;
        text-decoration: none;
        cursor: pointer;
        transition: color .2s ease, background .2s ease;
    }

        .ws-mobile-nav__item svg {
            display: block;
            width: 25px;
            height: 25px;
            flex-shrink: 0;
            stroke: currentColor;
        }

        .ws-mobile-nav__item span {
            font-size: 11px;
            font-weight: 750;
            line-height: 1.3;
            white-space: nowrap;
        }

        .ws-mobile-nav__item:hover,
        .ws-mobile-nav__item:focus-visible {
            color: #ffffff;
            background: rgba(255,255,255,.07);
        }

    .ws-mobile-nav__item--home {
        color: #5b9dff;
    }

    /* CENTER FLOATING CART */

    .ws-mobile-nav__cart-slot {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        height: 62px;
        overflow: visible;
    }

    .ws-mobile-nav__cart {
        position: relative;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 70px;
        height: 70px;
        min-width: 70px;
        padding: 0;
        border: 0;
        border-radius: 23px;
        background: #155dfc;
        color: #fff;
        box-shadow: 0 10px 24px rgba(21,93,252,.32), inset 0 1px 0 rgba(255,255,255,.14);
        cursor: pointer;
        transform: translateY(-15px);
        transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
    }

        .ws-mobile-nav__cart:hover {
            background: #0f4edb;
            transform: translateY(-18px);
        }

        .ws-mobile-nav__cart:active {
            transform: translateY(-15px) scale(.96);
        }

        .ws-mobile-nav__cart svg {
            display: block;
            width: 29px;
            height: 29px;
            stroke: #fff;
            flex-shrink: 0;
        }

    /* REAL CART COUNT */

    .ws-mobile-nav__count {
        position: absolute;
        z-index: 4;
        top: -8px;
        right: -7px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 24px;
        height: 24px;
        padding: 0 5px;
        border: 2px solid #050d20;
        border-radius: 999px;
        background: #ff3154;
        color: #fff;
        font-size: 11px;
        font-weight: 800;
        line-height: 1;
        font-variant-numeric: tabular-nums;
        box-shadow: 0 3px 8px rgba(0,0,0,.2);
    }

    /* BOTH LIGHT AND DARK USE THE SAME NAV DESIGN */

    .dark .ws-mobile-nav__inner {
        background: #050d20;
        border-color: rgba(255,255,255,.08);
    }

    .dark .ws-mobile-nav__item {
        color: #9ca9be;
    }

    .dark .ws-mobile-nav__item--home {
        color: #5b9dff;
    }

    .dark .ws-mobile-nav__cart {
        background: #155dfc;
        color: #fff;
    }

    .dark .ws-mobile-nav__count {
        background: #ff3154;
        color: #fff;
    }

    /* PREVENT FOOTER CONTENT FROM BEING HIDDEN */

    body {
        padding-bottom: calc(115px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 360px) {

    .ws-mobile-nav {
        width: calc(100% - 16px);
    }

    .ws-mobile-nav__inner {
        padding-inline: 5px;
        border-radius: 24px;
    }

    .ws-mobile-nav__cart {
        width: 62px;
        height: 62px;
        min-width: 62px;
        border-radius: 20px;
    }

    .ws-mobile-nav__item span {
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .ws-mobile-nav__item,
    .ws-mobile-nav__cart {
        transition: none;
    }
}
