/* Hide on Desktop */
@media (min-width: 769px) {
    .ct-mobilenav-wrapper {
        display: none !important;
    }
}

/* Mobile Nav Wrapper */
.ct-mobilenav-wrapper {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
.ct-mobilenav-wrapper.ct-style-floating {
    bottom: 15px;
    width: 95%;
    max-width: 500px;
}
.ct-mobilenav-wrapper.ct-style-docked {
    bottom: 0;
    width: 100%;
    max-width: 100%;
}
.ct-mobilenav-wrapper.ct-style-docked .ct-mobilenav-bar {
    border-radius: 0;
    padding-bottom: env(safe-area-inset-bottom, 10px); /* iPhone home indicator spacing */
}

/* Hide when off-canvas panels (like side cart or mobile menu) are open in Blocksy */
body.ct-panel-active .ct-mobilenav-wrapper,
body[data-panel] .ct-mobilenav-wrapper {
    display: none !important;
}

/* Main Navigation Bar (Pill Shape) */
.ct-mobilenav-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: rgba(31, 41, 55, 0.95); /* Lighter dark gray to contrast against page background */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25); /* Stronger white border */
    border-radius: 40px;
    padding: 10px 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.9); /* Stronger shadow */
    position: relative;
    z-index: 10;
}

/* Navigation Items */
.ct-mobilenav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none !important;
    background: transparent;
    border: none;
    padding: 5px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    flex: 1;
}

.ct-mobilenav-item:hover,
.ct-mobilenav-item:active {
    color: #fb923c; /* Orange accent */
    transform: scale(1.05);
}

/* Reset button focus outline */
.ct-mobilenav-item:focus {
    outline: none;
}

.ct-mobilenav-icon {
    display: flex;
    margin-bottom: 4px;
}

.ct-mobilenav-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

.ct-mobilenav-label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

/* Popups for More & Profile */
.ct-mobilenav-popup {
    position: absolute;
    bottom: 80px; /* Above the nav bar */
    background-color: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 8px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
}

.ct-mobilenav-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Positioning Popups specifically */
#ct-mobilenav-more-popup {
    right: 10%;
}

#ct-mobilenav-profile-popup {
    right: 2%;
}

.ct-mobilenav-popup-item {
    padding: 12px 20px;
    color: #ffffff;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
    text-align: left;
}

.ct-mobilenav-popup-item:hover,
.ct-mobilenav-popup-item:active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fb923c;
}

/* Floating Social Buttons */
.ct-floating-socials {
    position: absolute;
    bottom: 75px; /* Just above the nav bar */
    left: 15px; /* Match the padding of the nav bar */
    width: calc((100% - 30px) / 6); /* Match the exact width of the Home button (1/6th of inner width) */
    display: flex;
    flex-direction: column;
    align-items: center; /* Horizontally center the buttons over the Home button */
    gap: 15px;
    z-index: 4;
}

.ct-floating-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s;
    text-decoration: none !important;
}

.ct-floating-btn:hover, .ct-floating-btn:active {
    transform: scale(1.1);
}

.ct-floating-wa {
    background-color: #25D366;
}

.ct-floating-tg {
    background-color: #0088cc;
}
