/* ============================================================
   ALAIA CLINIC — MOBILE NAVIGATION CSS (PREMIUM LIGHT EDITION)
   ============================================================ */

/* ---- Hide old mobile elements ---- */
.mobile-sub-nav,
#mobile-service-drawer,
.mobile-menu-btn,
.mobile-tab-bar,
.menu-backdrop {
    display: none !important;
}

.ala-hamburger {
    display: none !important;
}

/* ============================================================
   FULL-SCREEN MOBILE PANEL
   ============================================================ */
.ala-mobile-panel {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    pointer-events: none;
}

.ala-mobile-panel.is-open {
    display: block;
    pointer-events: all;
}

/* Backdrop - ปรับให้นุ่มนวลขึ้น */
.ala-panel-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(253, 250, 246, 0.85);
    /* สีครีมอ่อน */
    opacity: 0;
    transition: opacity 0.4s ease;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.ala-mobile-panel.is-open .ala-panel-backdrop {
    opacity: 1;
}

/* Slide-in panel from right — เต็มความสูงเพื่อความ Consistency */
.ala-panel-content {
    position: absolute;
    top: 0;
    right: 0;
    width: min(85vw, 360px);
    height: 100%;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.08);
    border-top-left-radius: 24px;
}

.ala-mobile-panel.is-open .ala-panel-content {
    transform: translateX(0);
}

/* Enable panel header เพื่อความสวยงามเมื่อเต็มจอ */
.ala-panel-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(166, 139, 106, 0.08);
    flex-shrink: 0;
}

.ala-panel-brand {
    font-family: 'Mitr', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: #A68B6A;
    text-transform: uppercase;
}

.ala-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #FDF7F0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #A68B6A;
    transition: all 0.2s;
}

.ala-panel-close:active {
    transform: scale(0.9);
    background: #F5EDE2;
}

/* ---- Panel scrollable body ---- */
.ala-panel-nav {
    padding: 24px 12px 0;
    flex-shrink: 0;
}

.ala-panel-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    font-family: 'Mitr', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: #4A3728;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.ala-panel-link::after {
    content: '›';
    font-size: 1.2rem;
    color: #A68B6A;
    opacity: 0.6;
}

.ala-panel-link:active {
    background: #FDF7F0;
    color: #A68B6A;
}

/* ---- Services section ---- */
.ala-panel-services {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-top: 1px solid rgba(166, 139, 106, 0.08);
    margin-top: 12px;
}

.ala-services-label {
    padding: 20px 24px 12px;
    font-family: 'Mitr', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    color: #A68B6A;
    text-transform: uppercase;
}

/* Category tab strip - ปรับเป็นโทนสว่าง */
.ala-cat-tabs {
    display: flex;
    gap: 8px;
    padding: 0 18px 16px;
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
}

.ala-cat-tabs::-webkit-scrollbar {
    display: none;
}

.ala-cat-tab {
    flex-shrink: 0;
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid rgba(166, 139, 106, 0.2);
    background: #fff;
    font-family: 'Mitr', sans-serif;
    font-size: 0.8rem;
    color: #8B7355;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ala-cat-tab.active {
    background: #A68B6A;
    /* ทอง ALAIA */
    border-color: #A68B6A;
    color: #FFF;
    box-shadow: 0 4px 12px rgba(166, 139, 106, 0.25);
}

/* Service grid */
.ala-service-panels {
    flex: 1;
    overflow-y: auto;
    padding: 4px 18px 24px;
}

.ala-service-panels::-webkit-scrollbar {
    display: none;
}

.ala-service-grid {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ala-service-grid.active {
    display: grid;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ala-service-card {
    display: flex;
    flex-direction: column;
    padding: 16px 14px;
    background: #fff;
    border: 1px solid rgba(166, 139, 106, 0.1);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.2s;
}

.ala-service-card:active {
    background: #FDF7F0;
    border-color: #A68B6A;
    transform: scale(0.96);
}

.ala-svc-icon {
    font-size: 14px;
    color: #A68B6A;
    margin-bottom: 4px;
}

.ala-svc-name {
    font-family: 'Mitr', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4A3728;
}

/* ---- Panel footer CTA - ปรับเป็นโทนสว่าง ---- */
.ala-panel-footer {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid rgba(166, 139, 106, 0.08);
    background: #fff;
}

.ala-panel-cta {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 10px;
    border-radius: 14px;
    background: #A68B6A;
    /* ทอง ALAIA */
    color: #FFF;
    text-decoration: none;
    font-family: 'Mitr', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
}

.ala-panel-cta--outline {
    background: transparent;
    border: 1.5px solid #A68B6A;
    color: #A68B6A;
}

/* ============================================================
   BOTTOM TAB BAR - ปรับให้คลีนและสว่าง
   ============================================================ */
.ala-tab-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px !important;
    min-height: 65px !important;
    /* ล็อกขั้นต่ำ */
    max-height: 65px !important;
    /* ล็อกขั้นสูงสุด */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(166, 139, 106, 0.1);
    z-index: 99990;
    align-items: stretch;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
    transition: none !important;
}

.ala-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: #BDB7AD;
    font-family: 'Mitr', sans-serif;
    font-size: 0.65rem;
    background: none;
    border: none;
}

.ala-tab.active {
    color: #A68B6A;
}

.ala-tab svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 1024px) {
    .ala-mobile-panel {
        display: block;
    }

    .ala-tab-bar {
        display: flex;
    }

    body {
        padding-bottom: calc(65px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .nav-links,
    .mega-menu {
        display: none !important;
    }

    /* Logo กึ่งกลาง */
    .nav-container {
        justify-content: center !important;
    }

    .logo {
        position: static !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        margin: 0 auto !important;
    }
}

@media (min-width: 1025px) {

    .ala-mobile-panel,
    .ala-tab-bar {
        display: none !important;
    }
}