/* ============================================
   MOBILE MENU (DRAWER) - ROTANO
   ============================================ */

/* ============================================
   DRAWER & BACKDROP
   ============================================ */
.mobile-menu-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    background: #FFFFFF;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

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

.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-backdrop.is-visible {
    opacity: 1;
    pointer-events: all;
}

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ============================================
   DRAWER HEADER
   ============================================ */
.mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #E5DFD7;
    flex-shrink: 0;
}

.mobile-menu__logo {
    font-size: 20px;
    font-weight: 700;
    color: #4A3226;
    letter-spacing: 0.03em;
}

.mobile-menu__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    color: #4A3226;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.mobile-menu__close:hover {
    background: #FAF8F5;
}

.mobile-menu__close:active {
    background: #E5DFD7;
}

/* ============================================
   DRAWER SEARCH
   ============================================ */
.mobile-menu__search {
    padding: 16px 20px;
    border-bottom: 1px solid #E5DFD7;
    flex-shrink: 0;
}

.mobile-menu__search-form {
    position: relative;
}

.mobile-menu__search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8B6F47;
    pointer-events: none;
    width: 18px;
    height: 18px;
}

.mobile-menu__search-input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 40px;
    border: 1px solid #E5DFD7;
    border-radius: 999px;
    font-size: 15px;
    background: #FAF8F5;
    color: #4A3226;
}

.mobile-menu__search-input::placeholder {
    color: #8B6F47;
    opacity: 0.7;
}

.mobile-menu__search-input:focus {
    outline: none;
    border-color: #C89B6A;
    background: #FFFFFF;
}

/* ============================================
   DRAWER BODY
   ============================================ */
.mobile-menu__body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   CATALOG SECTION
   ============================================ */
.mobile-menu__section {
    padding: 8px 0;
    border-bottom: 1px solid #E5DFD7;
}

.mobile-menu__section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8B6F47;
}

.mobile-menu__categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu__category {
    margin: 0;
}

.mobile-menu__category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 12px 32px;
    font-size: 15px;
    font-weight: 500;
    color: #4A3226;
    text-decoration: none;
    transition: background 0.2s;
}

.mobile-menu__category-link:hover,
.mobile-menu__category-link:active {
    background: #FAF8F5;
    text-decoration: none;
}

.mobile-menu__category-count {
    font-size: 13px;
    color: #8B6F47;
    margin-left: 8px;
}

/* ============================================
   NAVIGATION LINKS
   ============================================ */
.mobile-menu__nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu__nav-item {
    margin: 0;
}

.mobile-menu__nav-link {
    display: block;
    padding: 14px 20px;
    font-size: 15px;
    color: #4A3226;
    text-decoration: none;
    transition: background 0.2s;
}

.mobile-menu__nav-link:hover,
.mobile-menu__nav-link:active {
    background: #FAF8F5;
    text-decoration: none;
}

.mobile-menu__nav-link--highlight {
    font-weight: 600;
    color: #C89B6A;
}

/* ============================================
   DRAWER FOOTER
   ============================================ */
.mobile-menu__footer {
    padding: 20px;
    border-top: 1px solid #E5DFD7;
    background: #FAF8F5;
    flex-shrink: 0;
}

.mobile-menu__phone {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #4A3226;
    text-decoration: none;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.mobile-menu__phone:active {
    opacity: 0.7;
}

.mobile-menu__callback-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    padding: 0 20px;
    border: 2px solid #C89B6A;
    border-radius: 999px;
    background: transparent;
    color: #C89B6A;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-bottom: 16px;
}

.mobile-menu__callback-btn:active {
    background: #C89B6A;
    color: #FFFFFF;
}

.mobile-menu__social {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.mobile-menu__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #FFFFFF;
    color: #8B6F47;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    border: 1px solid #E5DFD7;
}

.mobile-menu__social-link:active {
    background: #C89B6A;
    color: #FFFFFF;
    border-color: #C89B6A;
}

/* ============================================
   BOTTOM BAR (THUMB ZONE)
   ============================================ */
.mobile-bottom-bar {
    display: none; /* Show only on mobile */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #FFFFFF;
    border-top: 1px solid #E5DFD7;
    z-index: 99;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.mobile-bottom-bar__inner {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    height: 100%;
}

.mobile-bottom-bar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: none;
    background: transparent;
    color: #4A3226;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s, background 0.2s;
    position: relative;
}

.mobile-bottom-bar__item:active {
    background: #FAF8F5;
}

.mobile-bottom-bar__item svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.mobile-bottom-bar__item--active {
    color: #C89B6A;
}

.mobile-bottom-bar__badge {
    position: absolute;
    top: 6px;
    right: 50%;
    transform: translateX(12px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #C89B6A;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    line-height: 1;
}

.mobile-bottom-bar__badge:empty {
    display: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .mobile-bottom-bar {
        display: block;
    }
    
    /* Add padding to main content to prevent overlap */
    body.has-bottom-bar main {
        padding-bottom: 80px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .mobile-menu-drawer,
    .mobile-menu-backdrop {
        transition: none;
    }
}

/* Focus visible */
.mobile-menu__close:focus-visible,
.mobile-menu__search-input:focus-visible,
.mobile-menu__category-link:focus-visible,
.mobile-menu__nav-link:focus-visible,
.mobile-menu__callback-btn:focus-visible,
.mobile-bottom-bar__item:focus-visible {
    outline: 2px solid #C89B6A;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .mobile-menu-drawer {
        border: 2px solid currentColor;
    }
    
    .mobile-menu__section,
    .mobile-menu__nav-item {
        border-bottom: 1px solid currentColor;
    }
}
