/* ==========================================================================
   Mobile Menu Sidebar
   Slides in from right, accordion categories, overlay backdrop
   ========================================================================== */

/* Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms ease, visibility 300ms ease;
    z-index: 1001;
}

.mobile-menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Container */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background: #0F1012;
    transform: translateX(100%);
    transition: transform 300ms ease;
    z-index: 1002;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.is-open {
    transform: translateX(0);
}

/* Close button */
.mobile-menu__close {
    position: absolute;
    top: 20px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu__close::before,
.mobile-menu__close::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: #9B9F8E;
    border-radius: 4px;
}

.mobile-menu__close::before {
    transform: rotate(45deg);
}

.mobile-menu__close::after {
    transform: rotate(-45deg);
}

/* Content wrapper with padding */
.mobile-menu__content {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 80px 24px 24px;
}

/* ==========================================================================
   Category Accordion
   ========================================================================== */

.mobile-menu__category {
    border-bottom: 1px solid #161616;
}

.mobile-menu__category:last-child {
    border-bottom: none;
}

/* Category Header Button */
.mobile-menu__category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-align: left;
    padding: 18px 0;
    background: transparent;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Category Label */
.mobile-menu__category-label {
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 400;
    color: #9B9F8E;
    transition: color 150ms ease;
}

.mobile-menu__category-header:active .mobile-menu__category-label,
.mobile-menu__category.is-expanded .mobile-menu__category-label {
    color: #FFFFFF;
}

/* Arrow Icon */
.mobile-menu__category-arrow {
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M4 6L8 10L12 6" stroke="%23777A6C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>') center no-repeat;
    transition: transform 150ms ease, background 150ms ease;
}

.mobile-menu__category.is-expanded .mobile-menu__category-arrow {
    transform: rotate(180deg);
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M4 6L8 10L12 6" stroke="%23FFFFFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>') center no-repeat;
}

/* ==========================================================================
   Category Items (Collapsed by default)
   ========================================================================== */

.mobile-menu__category-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease;
}

.mobile-menu__category.is-expanded .mobile-menu__category-items {
    max-height: 400px;
}

/* Individual Menu Items */
.mobile-menu__item {
    display: block;
    padding: 14px 20px;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 400;
    color: #939886;
    text-decoration: none;
    transition: color 150ms ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu__item:active {
    color: #FBFCF7;
}

/* ==========================================================================
   Mobile Menu Footer Section
   ========================================================================== */

.mobile-menu__footer {
    margin-top: auto;
    padding-top: 32px;
    border-top: 1px solid #161616;
}

/* Social Buttons - centered */
.mobile-menu__social {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

/* Individual Social Button */
.mobile-menu__social-button {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    padding: 12px;
    background: transparent;
    border: 1px solid #1E1E1E;
    border-radius: 8px;
    text-decoration: none;
    transition: background 150ms ease, border-color 150ms ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu__social-button img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.mobile-menu__social-button:active {
    background: rgba(255, 255, 255, 0.02);
    border-color: #2A2A2A;
}

/* Copyright Section */
.mobile-menu__copyright {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
}

.mobile-menu__copyright-text {
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 400;
    color: #777A6C;
    line-height: 1.5;
    margin: 0;
}

.mobile-menu__legal-text {
    font-family: var(--font-primary);
    font-size: 11px;
    font-weight: 400;
    color: #5A5D51;
    line-height: 1.6;
    margin: 0;
}

.mobile-menu__legal-link {
    color: #777A6C;
    text-decoration: underline;
    transition: color 150ms ease;
}

.mobile-menu__legal-link:active {
    color: #9B9F8E;
}

/* ==========================================================================
   Mobile Breakpoint - Show only on mobile
   ========================================================================== */

@media (max-width: 640px) {
    .mobile-menu-overlay {
        display: block;
    }

    .mobile-menu {
        display: block;
    }
}
