/* ============================================
   BQ NAV ICON — Frontend Mobile Nav
   ============================================ */

/* Body padding so content isn't hidden behind nav */
@media only screen and (max-width: 767px) {
    body.bq-nav-active {
        padding-bottom: calc(var(--bq-height, 62px) + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* ── BOTTOM NAV BAR ───────────────────────── */
#bq-bottom-nav {
    display: none !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    height: var(--bq-height, 62px);
    background: var(--bq-bg, #ffffff);
    box-shadow: var(--bq-shadow, 0 -2px 16px rgba(0,0,0,0.10));
    font-family: var(--bq-font, inherit);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    align-items: stretch;
    justify-content: space-around;
}

@media only screen and (max-width: 767px) {
    #bq-bottom-nav {
        display: flex !important;
    }
}

/* ── NAV ITEMS ────────────────────────────── */
.bq-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    text-decoration: none;
    color: var(--bq-text, #555555);
    font-size: var(--bq-label-size, 10px);
    font-weight: 500;
    transition: color 0.2s, transform 0.15s;
    position: relative;
    padding: 6px 4px 2px;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.bq-nav-item:hover,
.bq-nav-item.bq-active {
    color: var(--bq-active, #000000);
}

.bq-nav-item:active {
    transform: scale(0.92);
}

/* Active indicator dot */
.bq-nav-item.bq-active::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--bq-active, #000000);
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
}

/* ── ICON WRAP ────────────────────────────── */
.bq-nav-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--bq-icon-size, 26px);
    height: var(--bq-icon-size, 26px);
}

.bq-nav-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.bq-nav-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.bq-nav-svg svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

/* ── LABEL ────────────────────────────────── */
.bq-nav-label {
    font-family: var(--bq-font, inherit);
    font-size: var(--bq-label-size, 10px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60px;
}

/* ── CART BADGE ───────────────────────────── */
.bq-cart-badge {
    position: absolute;
    top: -5px;
    right: -7px;
    background: var(--bq-badge, #e44c4c);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
    border: 2px solid var(--bq-bg, #ffffff);
    font-family: var(--bq-font, inherit);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bq-cart-badge.bq-hidden {
    display: none;
}

.bq-cart-badge.bq-bounce {
    animation: bq-badge-bounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bq-badge-bounce {
    0%   { transform: scale(0.5); }
    60%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ── MINI CART OVERLAY ────────────────────── */
#bq-mini-cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99980;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

#bq-mini-cart-overlay.bq-open {
    display: flex;
    align-items: stretch;
}

/* PANEL */
#bq-mini-cart-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    width: min(380px, 92vw);
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0,0,0,0.2);
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--bq-font, inherit);
}

/* LEFT DIRECTION: panel on left side */
#bq-mini-cart-overlay.bq-cart-slide-right #bq-mini-cart-panel {
    left: 0;
    transform: translateX(-100%);
}

/* RIGHT DIRECTION: panel on right side */
#bq-mini-cart-overlay.bq-cart-slide-left #bq-mini-cart-panel {
    right: 0;
    left: auto;
    transform: translateX(100%);
}

/* Open state */
#bq-mini-cart-overlay.bq-open #bq-mini-cart-panel {
    transform: translateX(0);
}

/* HEADER */
.bq-mini-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #e4e4e7;
    flex-shrink: 0;
}

.bq-mini-cart-title {
    font-size: 17px;
    font-weight: 700;
    color: #0a0a0a;
    font-family: var(--bq-font, inherit);
}

#bq-mini-cart-close {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #71717a;
    line-height: 1;
    padding: 0;
    transition: color 0.15s;
}

#bq-mini-cart-close:hover { color: #0a0a0a; }

/* BODY */
.bq-mini-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    -webkit-overflow-scrolling: touch;
}

/* WooCommerce mini cart resets */
.bq-mini-cart-body .widget_shopping_cart_content ul.woocommerce-mini-cart {
    padding: 0;
    margin: 0;
    list-style: none;
}

.bq-mini-cart-body .widget_shopping_cart_content .woocommerce-mini-cart__total {
    font-weight: 700;
    font-size: 15px;
    margin: 12px 0;
    display: flex;
    justify-content: space-between;
    font-family: var(--bq-font, inherit);
}

.bq-mini-cart-body .widget_shopping_cart_content .woocommerce-mini-cart__buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bq-mini-cart-body .widget_shopping_cart_content .woocommerce-mini-cart__buttons a {
    display: block;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    font-family: var(--bq-font, inherit);
}

.bq-mini-cart-body .widget_shopping_cart_content .woocommerce-mini-cart__buttons .button.checkout {
    background: #0a0a0a;
    color: #fff;
}

.bq-mini-cart-body .widget_shopping_cart_content .woocommerce-mini-cart__buttons .button:not(.checkout) {
    background: #f5f5f7;
    color: #0a0a0a;
    border: 1px solid #e4e4e7;
}
