/* ===== MOBILE MENU DRAWER ===== */

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none !important;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #2ca9a1 0%, #239890 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    z-index: 10001;
    position: relative;
    transition: all 0.3s ease;
    color: white;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(44, 169, 161, 0.3);
}

.mobile-menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 169, 161, 0.4);
}

.mobile-menu-btn:active {
    transform: translateY(0);
}

.mobile-menu-btn svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.mobile-menu-btn .menu-text {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Mobile Drawer Overlay */
.mobile-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-drawer-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Navigation Drawer */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex !important;
    }

    .mobile-nav-drawer,
    .nav-menu {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 320px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        background: #ffffff !important;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1) !important;
        z-index: 9999 !important;
        overflow-y: auto !important;
        transition: right 0.3s ease !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .mobile-nav-drawer.active,
    .nav-menu.active {
        right: 0 !important;
    }

    /* Mobile Drawer Header */
    .mobile-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1.25rem 1.5rem;
        background: linear-gradient(135deg, #2ca9a1 0%, #239890 100%);
        color: white;
        border: none;
        box-shadow: 0 2px 10px rgba(44, 169, 161, 0.2);
        order: -2; /* Show at very top */
    }

    .mobile-drawer-brand {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .mobile-drawer-brand svg {
        width: 32px;
        height: 32px;
        color: white;
    }

    .mobile-drawer-brand span {
        font-size: 1.25rem;
        font-weight: 700;
        color: white;
    }

    .mobile-drawer-close-btn {
        background: rgba(255, 255, 255, 0.2);
        border: none;
        border-radius: 8px;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .mobile-drawer-close-btn:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: rotate(90deg);
    }

    .mobile-drawer-close-btn svg {
        color: white;
    }

    /* Quick Links Section */
    .mobile-drawer-quick-links {
        display: block !important;
        width: 100%;
        padding: 1.5rem 1.25rem;
        background: #f8fafc;
        border-bottom: 1px solid #e2e8f0;
        order: -1; /* Show at top, after header */
    }

    .mobile-drawer-section-title {
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        color: #64748b;
        margin: 0 0 1.25rem 0;
        padding-left: 0.25rem;
    }

    .mobile-quick-links-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .mobile-quick-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.625rem;
        padding: 1rem 0.5rem;
        background: #ffffff;
        border: 1.5px solid #e2e8f0;
        border-radius: 12px;
        text-decoration: none;
        color: #1e293b;
        font-size: 0.8125rem;
        font-weight: 600;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }

    .mobile-quick-link::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #2ca9a1 0%, #239890 100%);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .mobile-quick-link:hover::before,
    .mobile-quick-link:active::before {
        transform: translateX(0);
    }

    .mobile-quick-link:hover,
    .mobile-quick-link:active {
        background: #f0fdfa;
        border-color: #2ca9a1;
        color: #2ca9a1;
        transform: translateY(-3px);
        box-shadow: 0 4px 12px rgba(44, 169, 161, 0.15);
    }

    .quick-link-icon {
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #f0fdfa 0%, #e0f2f1 100%);
        border-radius: 12px;
        transition: all 0.25s ease;
    }

    .mobile-quick-link:hover .quick-link-icon,
    .mobile-quick-link:active .quick-link-icon {
        background: linear-gradient(135deg, #2ca9a1 0%, #239890 100%);
        transform: scale(1.1);
    }

    .quick-link-icon svg {
        color: #2ca9a1;
        width: 24px;
        height: 24px;
        transition: color 0.25s ease;
    }

    .mobile-quick-link:hover .quick-link-icon svg,
    .mobile-quick-link:active .quick-link-icon svg {
        color: white;
    }

    .mobile-quick-link span {
        font-size: 0.8125rem;
        font-weight: 600;
    }

    /* Navigation Section */
    .mobile-drawer-nav-section {
        padding: 1.25rem 1.5rem 0.75rem;
        background: white;
    }

    /* Regular Navigation Items */
    .mobile-nav-drawer > li,
    .nav-menu > li {
        display: block !important;
        width: 100%;
        border-bottom: 1px solid #f1f5f9;
    }

    .mobile-nav-drawer > li:last-child,
    .nav-menu > li:last-child {
        border-bottom: none;
    }

    .mobile-nav-drawer .nav-link,
    .mobile-nav-drawer .mobile-nav-link,
    .nav-menu .nav-link {
        display: block;
        padding: 1rem 1.5rem;
        color: #1e293b;
        text-decoration: none;
        font-weight: 500;
        font-size: 1rem;
        transition: all 0.2s ease;
        position: relative;
    }

    .mobile-nav-drawer .nav-link:hover,
    .mobile-nav-drawer .mobile-nav-link:hover,
    .nav-menu .nav-link:hover {
        background: #f8fafc;
        color: #2ca9a1;
        padding-left: 2rem;
    }

    .mobile-nav-drawer .nav-link.active,
    .mobile-nav-drawer .mobile-nav-link.active,
    .nav-menu .nav-link.active {
        background: #f0fdfa;
        color: #2ca9a1;
        font-weight: 600;
        border-left: 4px solid #2ca9a1;
    }

    .mobile-nav-drawer .nav-link.active::before,
    .mobile-nav-drawer .mobile-nav-link.active::before,
    .nav-menu .nav-link.active::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 100%;
        background: #2ca9a1;
    }

    /* Cart and Favorites Buttons in Drawer */
    .mobile-nav-drawer .cart-button,
    .mobile-nav-drawer .favorites-button,
    .nav-menu .cart-button,
    .nav-menu .favorites-button {
        width: calc(100% - 3rem);
        margin: 0.5rem 1.5rem;
        padding: 0.875rem 1.25rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        background: linear-gradient(135deg, #2ca9a1 0%, #239890 100%);
        color: white;
        border: none;
        border-radius: 10px;
        font-weight: 600;
        font-size: 1rem;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(44, 169, 161, 0.3);
    }

    .mobile-nav-drawer .cart-button:hover,
    .mobile-nav-drawer .favorites-button:hover,
    .nav-menu .cart-button:hover,
    .nav-menu .favorites-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(44, 169, 161, 0.4);
    }

    .mobile-nav-drawer .cart-count,
    .mobile-nav-drawer .favorites-count,
    .nav-menu .cart-count,
    .nav-menu .favorites-count {
        position: relative;
        top: auto;
        right: auto;
        background: rgba(255, 255, 255, 0.3);
        color: white;
        padding: 0.25rem 0.5rem;
        border-radius: 12px;
        font-size: 0.875rem;
        font-weight: 700;
    }

    /* Additional drawer styling */
    .mobile-nav-drawer > li:first-of-type,
    .nav-menu > li:first-of-type {
        margin-top: 0.5rem;
    }

    /* Mobile Nav List */
    .mobile-nav-list {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobile-nav-list li {
        border-bottom: 1px solid #f1f5f9;
    }

    .mobile-nav-list li:last-child {
        border-bottom: none;
    }

/* Desktop - Hide Mobile Elements */
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
    }

    .mobile-drawer-overlay {
        display: none !important;
    }

    .mobile-drawer-quick-links {
        display: none !important;
    }

    .mobile-drawer-header {
        display: none !important;
    }

    .mobile-drawer-nav-section {
        display: none !important;
    }

    .mobile-nav-drawer,
    .nav-menu {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
    }

    .mobile-nav-drawer > li,
    .nav-menu > li {
        display: inline-block !important;
        width: auto !important;
        border: none !important;
    }

    .mobile-nav-drawer .nav-link,
    .nav-menu .nav-link {
        padding: 0.5rem 1rem !important;
    }
}
