/* ==========================================
   OPTIC ONE MOBILE NAVIGATION v2.6.1
   ========================================== */
:root {
    --omn-h: 60px;
    --omn-safe: env(safe-area-inset-bottom, 0px);
    --omn-bg: #ffffff;
    --omn-text: #333333;
    --omn-active: #0066cc;
    --omn-btn: #0095eb;
}

/* ==========================================
   REGULAR NAV
   ========================================== */
.omn-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--omn-h);
    padding-bottom: var(--omn-safe);
    background: var(--omn-bg);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 99990;
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .omn-nav { display: block; }
}

.omn-nav.is-hidden {
    transform: translateY(100%);
}

.omn-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
}

.omn-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    padding: 8px 4px;
    color: var(--omn-text);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    gap: 4px;
    -webkit-tap-highlight-color: transparent;
}

.omn-nav-item:hover,
.omn-nav-item:active {
    color: var(--omn-active);
    text-decoration: none;
}

.omn-nav-item svg {
    width: 22px;
    height: 22px;
    pointer-events: none;
}

.omn-nav-item span {
    pointer-events: none;
}

/* ==========================================
   PRODUCT BAR
   ========================================== */
.omn-product-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--omn-bg);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 99991;
    padding-bottom: var(--omn-safe);
    transform: translateY(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s ease;
}

@media (max-width: 768px) {
    .omn-product-bar { display: block; }
}

.omn-product-bar.is-visible {
    transform: translateY(0);
    visibility: visible;
}

.omn-pb-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    gap: 12px;
    min-height: 56px;
}

/* Size Guide Button */
.omn-pb-size-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 50px;
    padding: 6px 8px;
    background: #f0f7ff;
    border: 2px solid var(--omn-active);
    border-radius: 10px;
    cursor: pointer;
    color: var(--omn-active);
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s ease;
}

.omn-pb-size-btn span {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
}

.omn-pb-size-btn:hover {
    background: var(--omn-active);
    color: #fff;
}

/* Quantity */
.omn-pb-qty {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 6px 8px;
    flex-shrink: 0;
}

.omn-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 500;
    color: var(--omn-text);
    -webkit-tap-highlight-color: transparent;
}

.omn-qty-btn:hover:not(:disabled) {
    border-color: var(--omn-active);
    color: var(--omn-active);
}

.omn-qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#omn-qty {
    min-width: 28px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
}

/* Add to Cart Button */
.omn-pb-atc {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    padding: 14px 20px;
    background: var(--omn-btn);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    cursor: pointer;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s ease;
}

.omn-pb-atc:hover:not(:disabled) {
    filter: brightness(1.1);
}

.omn-pb-atc:disabled,
.omn-pb-atc.is-disabled {
    background: #aaa !important;
    cursor: not-allowed;
}

.omn-pb-atc.is-added {
    background: #22c55e !important;
}

/* Spinner */
.omn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: #fff;
    border-radius: 50%;
    animation: omn-spin 0.7s linear infinite;
}

.omn-pb-atc.is-adding .omn-spinner {
    display: block;
}

@keyframes omn-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   SHOP OVERLAY
   ========================================== */
.omn-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 999999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.omn-overlay.is-open {
    transform: translateX(0);
}

.omn-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.omn-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

.omn-overlay-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-top: env(safe-area-inset-top, 0px);
}

.omn-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.omn-overlay-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

#omn-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
}

#omn-close:hover {
    background: #e0e0e0;
}

.omn-overlay-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0 calc(20px + var(--omn-safe));
}

.omn-section {
    padding: 15px 20px;
}

.omn-section h3 {
    margin: 0 0 12px 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
}

.omn-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.omn-section li {
    margin: 0;
    padding: 0;
}

.omn-section a {
    display: block;
    padding: 12px 0;
    color: var(--omn-text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    transition: color 0.2s ease;
}

.omn-section a:hover {
    color: var(--omn-active);
}

.omn-promo {
    display: block;
    margin: 15px 20px;
    padding: 15px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    color: #856404;
    text-decoration: none;
}

/* ==========================================
   BODY LOCK
   ========================================== */
.omn-no-scroll {
    position: fixed;
    width: 100%;
    overflow: hidden;
}

/* ==========================================
   FILTER HIGHLIGHT
   ========================================== */
.omn-highlight {
    box-shadow: 0 0 0 3px var(--omn-active) !important;
    transition: box-shadow 0.3s ease !important;
}

/* ==========================================
   FUNNELKIT & BETHEME FIXES
   ========================================== */
@media (max-width: 768px) {
    /* Push FunnelKit Bubble UP above nav bar */
    #fkcart-mini-toggler,
    .fkcart-launcher,
    .xf-cart-floating-icon,
    #fkit-floating-count,
    .wfc-launcher,
    .fk-cart-launcher {
        bottom: 90px !important;
        transition: bottom 0.3s ease;
    }

    /* When nav hides, move bubble down */
    .omn-nav.is-hidden ~ #fkcart-mini-toggler,
    .omn-nav.is-hidden ~ .fkcart-launcher,
    .omn-nav.is-hidden ~ .xf-cart-floating-icon {
        bottom: 20px !important;
    }

    /* BeTheme Back to Top Button */
    #back_to_top {
        bottom: 150px !important;
    }

    .omn-nav.is-hidden ~ #back_to_top {
        bottom: 70px !important;
    }

    /* FunnelKit Side Cart always on top */
    .fkcart-overlay,
    .fkcart-slide,
    .fk-cart-sidebar {
        z-index: 9999999 !important;
    }

    /* WhatsApp widget */
    .wa__btn_popup,
    [class*="whatsapp"],
    .joinchat,
    .wa-chat-box {
        bottom: 150px !important;
    }
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 374px) {
    .omn-pb-inner {
        padding: 10px 12px;
        gap: 8px;
    }
    .omn-pb-size-btn {
        min-width: 44px;
        padding: 5px 6px;
    }
    .omn-qty-btn {
        width: 32px;
        height: 32px;
    }
    .omn-pb-atc {
        padding: 12px 14px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}
