:root {
    --wmbm-height: 74px;
    --wmbm-overlay-z: 99999;
    --wmbm-bar-bg: #ffffff;
    --wmbm-btn-bg: #f6f6f6;
    --wmbm-btn-active-bg: #edc5ce;
    --wmbm-icon: #222222;
    --wmbm-active: #222222;
    --wmbm-bubble-bg: #edc5ce;
    --wmbm-bubble-text: #222222;
    --wmbm-radius: 18px;
    --wmbm-breakpoint: 768px;
}

/* Container */
.wmbm-container {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    height: var(--wmbm-height);
    background: var(--wmbm-bar-bg);
    border-radius: var(--wmbm-radius);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    z-index: var(--wmbm-overlay-z);
    transition: transform 0.28s ease, opacity 0.28s ease;
    opacity: 1;
}

/* First paint: hide until load */
.wmbm-preload {
    opacity: 0;
    transform: translateY(12px);
}

.wmbm-ready {
    opacity: 1;
    transform: translateY(0);
}

/* Hide on desktop is injected dynamically from PHP based on the Customizer breakpoint */
@media (min-width: 999999px) {
    .wmbm-container { display: none !important; }
}

/* Nav */
.wmbm-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    padding: 10px 10px;
    margin: 0;
    height: 100%;
    gap: 8px;
}

.wmbm-item {
    flex: 1;
    text-align: center;
}

.wmbm-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    border-radius: 14px;
    padding: 8px 6px;
    color: var(--wmbm-icon);
    -webkit-tap-highlight-color: transparent;
}

.wmbm-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--wmbm-btn-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform .18s ease, background .18s ease;
}

.wmbm-label {
    font-size: 11px;
    line-height: 1;
    letter-spacing: .2px;
    opacity: .86;
}

.wmbm-btn:active .wmbm-icon-wrap {
    transform: scale(0.96);
}

.wmbm-item.active .wmbm-icon-wrap,
.wmbm-btn:hover .wmbm-icon-wrap {
    background: var(--wmbm-btn-active-bg);
}

.wmbm-item.active .wmbm-btn,
.wmbm-btn:hover {
    color: var(--wmbm-active);
}

.wmbm-item i {
    font-family: "dashicons" !important;
    font-size: 22px;
    width: 22px;
    height: 22px;
    line-height: 22px;
    display: inline-block;
    vertical-align: middle;
}


/* Custom SVG / Image icons */
.wmbm-icon-img{
    width:22px;
    height:22px;
    display:block;
    object-fit:contain;
}

.wmbm-icon-svg svg{
    width:22px;
    height:22px;
    display:block;
}

.wmbm-icon-svg svg *{
    fill: currentColor;
    stroke: currentColor;
}

/* Cart */
.wmbm-cart-item {
    position: relative;
    top: -14px;
}

.wmbm-cart-encircle {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: var(--wmbm-bar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.wmbm-btn-cart {
    padding: 0;
    border-radius: 18px;
}

.wmbm-btn-cart .wmbm-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: var(--wmbm-btn-active-bg);
}

.wmbm-cart-item .wmbm-label {
    display: none;
}

.wmbm-cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--wmbm-bubble-bg);
    color: var(--wmbm-bubble-text);
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--wmbm-bar-bg);
}

.wmbm-cart-count.wmbm-zero {
    display: none;
}

/* Hide/Show on scroll */
.wmbm-hidden {
    transform: translateY(calc(110% + env(safe-area-inset-bottom)));
}

/* Lock body when drawer open */
body.wmbm-lock {
    overflow: hidden;
    touch-action: none;
}

/* Drawer */
.wmbm-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: calc(var(--wmbm-overlay-z) + 10);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
}

.wmbm-drawer-overlay.wmbm-open {
    opacity: 1;
    pointer-events: auto;
}

.wmbm-drawer {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: min(88vw, 360px);
    background: #ffffff;
    transform: translateX(-102%);
    transition: transform .25s ease;
    box-shadow: 16px 0 40px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
}

.wmbm-drawer-overlay.wmbm-open .wmbm-drawer {
    transform: translateX(0);
}

.wmbm-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.wmbm-drawer-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.wmbm-drawer-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: var(--wmbm-btn-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.wmbm-drawer-close .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    line-height: 22px;
}

.wmbm-drawer-body {
    padding: 14px;
    overflow: auto;
}

.wmbm-drawer-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wmbm-drawer-menu-list li {
    margin: 0;
}

.wmbm-drawer-menu-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px;
    border-radius: 14px;
    text-decoration: none;
    color: #111;
}

.wmbm-drawer-menu-list a:hover,
.wmbm-drawer-menu-list a:active {
    background: rgba(0, 0, 0, 0.04);
}

.wmbm-drawer-custom {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Search modal */
#wmbm-search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

#wmbm-search-overlay.wmbm-open {
    display: flex !important;
    opacity: 1;
}

.wmbm-search-box {
    background: #fff;
    padding: 22px;
    border-radius: 18px;
    width: 86%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.30);
}

.wmbm-search-box form {
    display: flex;
    position: relative;
    align-items: center;
}

.wmbm-search-box input[type="search"],
.wmbm-search-box input.search-field {
    width: 100%;
    border: none;
    border-bottom: 2px solid #eee;
    padding: 14px 54px 14px 10px;
    font-size: 18px;
    outline: none;
    background: transparent;
    border-radius: 0;
    color: #333;
    font-family: inherit;
}

.wmbm-search-box input[type="search"]:focus {
    border-bottom-color: var(--wmbm-btn-active-bg);
}

.wmbm-search-box button[type="submit"] {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
}

.wmbm-close-search {
    position: absolute;
    top: -48px;
    right: 0;
    background: #fff;
    border: none;
    color: #333;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.20);
}
