/* ===========================
   Mobile Side Navigation
   =========================== */

.sidenav {
    top: 0;
    left: 0;
    width: 0;
    padding: 0;
    position: fixed;
    z-index: 1040;
}

/* Dark overlay behind the drawer */
.sidenav-bg {
    display: none;
    width: 100vw;
    height: 100vh;
    left: 0;
    top: 0;
    position: fixed;
    background-color: rgba(0, 0, 0, 0.45);
    z-index: -1;
    backdrop-filter: blur(2px);
}

/* Drawer panel */
.sidenav-content {
    padding: 0;
    height: 100vh;
    width: 270px;
    margin-left: -270px;
    background-color: #ffffff;
    overflow-y: auto;
    transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
}

.slide-in {
    margin-left: 0;
}

/* ===========================
   Header: Logo + Sign In
   =========================== */
.sidenav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    flex-shrink: 0;
}

.sidenav-signin-btn {
    background-color: #dc3545;
    color: #fff !important;
    font-weight: 600;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.2s;
}

.sidenav-signin-btn:hover {
    background-color: #b02a37;
    color: #fff !important;
}

/* ===========================
   Navigation Container
   =========================== */
.sidenav-nav {
    display: flex;
    flex-direction: column;
    padding: 8px 0 20px;
    flex: 1;
}

/* ===========================
   Base Nav Item
   =========================== */
.sidenav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #2c2c2c !important;
    text-decoration: none !important;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
    border: none;
    background: none;
}

.sidenav-item i {
    width: 18px;
    text-align: center;
    color: #555;
    font-size: 15px;
    flex-shrink: 0;
}

.sidenav-item:hover,
.sidenav-item:focus {
    background-color: #f5f7fa;
    color: #cc0000 !important;
    text-decoration: none !important;
}

.sidenav-item:hover i,
.sidenav-item:focus i {
    color: #cc0000;
}

/* ===========================
   Accordion Toggle Arrow
   =========================== */
.sidenav-toggle .sidenav-chevron {
    font-size: 11px;
    margin-left: auto;
    color: #999;
    transition: transform 0.25s ease;
}

.sidenav-toggle[aria-expanded="true"] .sidenav-chevron {
    transform: rotate(90deg);
    color: #cc0000;
}

/* ===========================
   Submenu (Accordion body)
   Uses max-height transition – no Bootstrap JS needed.
   =========================== */
.sidenav-submenu {
    background: #f8f9fb;
    border-left: 3px solid #cc0000;
    margin-left: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidenav-submenu[data-open="true"] {
    max-height: 600px; /* large enough for any submenu content */
}

.sidenav-subitem {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    font-size: 13px;
    color: #444 !important;
    text-decoration: none !important;
    transition: background 0.15s, color 0.15s;
    gap: 8px;
}

.sidenav-subitem:hover {
    background-color: #f0f0f0;
    color: #cc0000 !important;
    text-decoration: none !important;
}

.sidenav-subitem i {
    width: 16px;
    text-align: center;
    font-size: 13px;
    color: #888;
}

.sidenav-subitem:hover i {
    color: #cc0000;
}

/* ===========================
   Divider
   =========================== */
.sidenav-divider {
    height: 1px;
    background: #ebebeb;
    margin: 8px 0;
}

/* ===========================
   BUY Button
   =========================== */
.sidenav-item.sidenav-buy {
    color: #cc0000 !important;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidenav-item.sidenav-buy i {
    color: #cc0000;
}

/* ===========================
   Mobile Bottom Navigation Bar
   Only shown on mobile/tablet (< 1200px)
   =========================== */

/* Push page content up so it doesn't hide behind bar */
@media (max-width: 1199.98px) {
    body {
        padding-bottom: 70px;
    }
}

.msp-bottom-nav {
    display: none; /* hidden by default, shown on mobile */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.10);
    padding-bottom: env(safe-area-inset-bottom, 0px); /* iOS home bar */
}

@media (max-width: 1199.98px) {
    .msp-bottom-nav {
        display: flex;
        align-items: stretch;
    }
}

/* Tab item */
.msp-bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 4px 4px;
    text-decoration: none !important;
    color: #888 !important;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
    position: relative;
    cursor: pointer;
    border: none;
    background: none;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    overflow: hidden;
}

.msp-bn-item i {
    font-size: 19px;
    line-height: 1;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s;
}

.msp-bn-item span {
    line-height: 1;
    transition: color 0.2s;
    white-space: nowrap;
}

/* Active state */
.msp-bn-item.msp-bn-active {
    color: #cc0000 !important;
}

.msp-bn-item.msp-bn-active i {
    transform: translateY(-3px) scale(1.15);
    color: #cc0000;
}

/* Active dot indicator */
.msp-bn-item.msp-bn-active::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #cc0000;
    animation: bnDotPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes bnDotPop {
    from { transform: translateX(-50%) scale(0); }
    to   { transform: translateX(-50%) scale(1); }
}

/* Ripple on tap */
.msp-bn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(204, 0, 0, 0.15);
    transform: scale(0);
    animation: mspBnRipple 0.5s ease-out;
    pointer-events: none;
}

@keyframes mspBnRipple {
    to { transform: scale(4); opacity: 0; }
}

/* Sign In CTA tab — special styling */
.msp-bn-item.msp-bn-cta {
    color: #fff !important;
    background: linear-gradient(135deg, #d31d24 0%, #a61217 100%);
    border-radius: 22px !important; /* Modern fully-rounded pill shape */
    margin: 0 4px !important;
    height: 44px !important; /* Fixed height to match vertical centering */
    align-self: center !important; /* Prevent vertical stretching/overflow */
    box-shadow: 0 4px 12px rgba(211, 29, 36, 0.25);
    flex: 1.25;
    padding: 4px 2px !important;
    gap: 1px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.msp-bn-item.msp-bn-cta i {
    color: #fff;
    font-size: 16px !important; /* Slightly more compact icon */
}

.msp-bn-item.msp-bn-cta span {
    font-size: 9px !important; /* Keep it on a single line */
}

.msp-bn-item.msp-bn-cta:hover,
.msp-bn-item.msp-bn-cta:active {
    color: #fff !important;
    background: linear-gradient(135deg, #a61217 0%, #7d0a0e 100%);
    box-shadow: 0 4px 14px rgba(211, 29, 36, 0.35);
}

.msp-bn-item.msp-bn-cta::after {
    display: none; /* no dot on CTA */
}