﻿/*
=========================================
HAPPY MISTHAN
HEADER
=========================================
*/

.header{

    position:sticky;

    top:0;

    left:0;

    width:100%;

    background:#ffffff;

    z-index:999;

    padding:14px 0 18px;

    padding-top:calc(14px + env(safe-area-inset-top));

    border-bottom:1px solid #efefef;

}

/* ==============================
HEADER TOP
============================== */

.header-top{

    display:flex;

    align-items:center;

    justify-content:space-between;

    gap:15px;

    margin-bottom:18px;

}

/* ==============================
MENU BUTTON
============================== */

.menu-btn{

    width:46px;

    height:46px;

    border-radius:14px;

    background:#f6f6f6;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:22px;

    color:#222;

    flex-shrink:0;

}

.menu-btn:hover{

    background:#ededed;

}

/* ==============================
LOGO AREA
============================== */

.logo-area{

    display:flex;

    align-items:center;

    gap:10px;

    flex:1;

}

.logo-area img{

    width:42px;

    height:42px;

    object-fit:contain;

    flex-shrink:0;

}

.logo-text{

    display:flex;

    flex-direction:column;

}

.logo-area h1{

    font-size:20px;
    font-weight:800;
    line-height:1.1;

    color:#222;

}

.logo-underline{

    width:64px;

    height:8px;

    margin-top:2px;

}
@media (max-width:768px){

    .logo-area{

        gap:8px;

    }

    .logo-area img{

         width:36px;
    height:36px;
    }

    .logo-area h1{

         font-size:18px;

        line-height:1.1;

    }

    .logo-underline{

        width:52px;

        height:7px;

    }

}
/* ==============================
USER BUTTON
============================== */

.user-area{
    display:flex;
    align-items:center;
    gap:12px;
}

.user-btn{

    width:44px;
    height:44px;

    border:none;
    border-radius:50%;

    background:#fff1e6;

    display:flex;
    align-items:center;
    justify-content:center;

    cursor:pointer;

    box-shadow:none;

    transition:.25s ease;

}

.user-btn svg{

    width:20px;
    height:20px;

    stroke:var(--primary);
    stroke-width:2.2;

}

.user-btn:hover{

    background:#ffe4cc;

    box-shadow:none;

}

/* ==============================
NOTIFICATIONS
============================== */

.notif-wrap{
    position:relative;
}

.notif-bell{
    width:44px;
    height:44px;
    border:none;
    border-radius:50%;
    background:#fff1e6;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    position:relative;
    transition:.25s ease;
}

.notif-bell:hover{
    background:#ffe4cc;
}

.notif-bell svg{
    width:20px;
    height:20px;
    stroke:var(--primary);
    stroke-width:2.2;
}

.notif-count-badge{
    position:absolute;
    top:-2px;
    right:-2px;
    min-width:19px;
    height:19px;
    padding:0 5px;
    border-radius:10px;
    background:#e74c3c;
    color:#fff;
    font-size:11px;
    font-weight:700;
    display:flex;
    align-items:center;
    justify-content:center;
}

.notif-panel{
    position:absolute;
    top:54px;
    right:0;
    width:320px;
    max-width:88vw;
    max-height:420px;
    overflow-y:auto;
    background:#fff;
    border-radius:18px;
    box-shadow:0 15px 40px rgba(0,0,0,.15);
    display:none;
    z-index:400;
}

.notif-panel.show{
    display:block;
}

.notif-panel-header{
    padding:16px 18px;
    border-bottom:1px solid #f1f1f1;
}

.notif-list{
    max-height:360px;
    overflow-y:auto;
}

.notif-item{
    display:block;
    padding:14px 18px;
    border-bottom:1px solid #f6f6f6;
    text-decoration:none;
    color:inherit;
    cursor:pointer;
}

.notif-item:hover{
    background:#fafafa;
}

.notif-item.unread{
    background:#fff7f0;
}

.notif-item p{
    margin:0 0 4px;
    font-size:14px;
    color:#333;
}

.notif-item small{
    color:#999;
    font-size:12px;
}

.notif-empty{
    padding:30px 18px;
    text-align:center;
    color:#999;
    font-size:14px;
}

@media(max-width:480px){
    .notif-panel{
        position:fixed;
        top:auto;
        left:12px;
        right:12px;
        bottom:12px;
        width:auto;
        max-width:none;
        max-height:70vh;
    }
}

/* ==============================
CART
============================== */

.cart-btn{

    width:44px;

    height:44px;

    border-radius:14px;

    background:var(--primary);

    color:#fff;

    display:flex;

    align-items:center;

    justify-content:center;

    position:relative;

    font-size:20px;

    box-shadow:0 8px 20px rgba(255,122,0,.28);

}

.cart-btn span{

    position:absolute;

    top:-6px;

    right:-6px;

    width:20px;

    height:20px;

    border-radius:50%;

    background:var(--primary);

    color:#fff;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:11px;

    font-weight:700;

    border:2px solid #fff;

}

/* ==============================
SEARCH
============================== */

.search-bar{
    width:100%;
    margin-bottom:18px;
    transition:margin-bottom .25s ease;
}

.search-bar input{
    width:100%;
    height:50px;
    background:#fff;                 /* White background */
    border:2px solid var(--primary);        /* Permanent orange border */
    border-radius:16px;
    padding:0 20px;
    font-size:14px;
    color:#222;
    outline:none;
    transition:all .25s ease;
}

/* Starts compact on page load to leave more room for the menu below;
   expands to full size once the customer taps in to type (see app.js). */
.search-bar input.search-collapsed{
    height:34px;
    border-radius:12px;
    padding:0 16px;
    font-size:13px;
}

.search-bar input:focus{
    border-color:var(--primary);
    background:#fff;
    box-shadow:none;
}

.search-bar input::placeholder{
    color:#9c9c9c;
}
/* ==============================
CATEGORIES SECTION
============================== */

.categories-section{

    margin-top:16px;

    transition:margin-top .25s ease;

}

/* Shrinks the search bar + categories row while the page is scrolled
   away from the top, to leave more room for browsing the menu — both
   return to full size once scrolled back up (see app.js). */

.header.header-compact .search-bar{
    margin-bottom:8px;
}

.header.header-compact .categories-section{
    margin-top:6px;
}

.header.header-compact .categories-heading{
    max-height:0;
    margin-bottom:0;
    opacity:0;
    pointer-events:none;
}

.header.header-compact .categories{
    gap:10px;
}

.header.header-compact .category{
    width:44px;
}

.header.header-compact .category-avatar{
    width:36px;
    height:36px;
}

.header.header-compact .category-label{
    font-size:9px;
}

.categories-heading{

    display:flex;

    align-items:center;

    justify-content:space-between;

    margin-bottom:12px;

    max-height:40px;

    opacity:1;

    overflow:hidden;

    transition:max-height .25s ease, margin-bottom .25s ease, opacity .2s ease;

}

.categories-heading h3{

    font-size:16px;

    font-weight:700;

    color:var(--black,#1c1c1c);

}

.view-all-categories{

    display:flex;

    align-items:center;

    gap:2px;

    background:none;

    border:none;

    color:var(--primary);

    font-size:13px;

    font-weight:600;

    cursor:pointer;

    padding:4px 0;

}

.view-all-categories i{

    width:15px;

    height:15px;

}

.categories{

    display:flex;

    gap:16px;

    overflow-x:auto;

    scrollbar-width:none;

    padding-bottom:4px;

    transition:gap .25s ease;

}

.categories::-webkit-scrollbar{

    display:none;

}

/* ==============================
CATEGORY CHIP
============================== */

.category{

    flex-shrink:0;

    display:flex;

    flex-direction:column;

    align-items:center;

    gap:6px;

    width:66px;

    background:none;

    border:none;

    padding:0;

    transition:width .25s ease;

}

.category-avatar{

    width:56px;

    height:56px;

    border-radius:50%;

    overflow:hidden;

    background:#f4f4f4;

    display:flex;

    align-items:center;

    justify-content:center;

    transition:width .25s ease, height .25s ease;

    border:2px solid transparent;

}

.category-avatar img{

    width:100%;

    height:100%;

    object-fit:cover;

}

.category-avatar-all{

    background:var(--primary);

    color:#fff;

}

.category-avatar-all i{

    width:24px;

    height:24px;

}

.category-label{

    font-size:12px;

    font-weight:600;

    color:#555;

    white-space:nowrap;

    transition:font-size .25s ease;

}

.category.active .category-avatar{

    border-color:var(--primary);

}

.category.active .category-label{

    color:var(--primary);

}


/* ==============================
TABLET
============================== */

@media(min-width:768px){

    .header{

        padding:20px 0;

    }

    .container{

        max-width:720px;

    }

    .logo-area h1{

        font-size:22px;

    }

}

/* ==============================
DESKTOP
============================== */

@media(min-width:1024px){

    .container{

        max-width:1180px;

    }

    .header-top{

        gap:25px;

    }

    .logo-area h1{

        font-size:24px;

    }

}

/* ==============================
ALL CATEGORIES PAGE
============================== */

.all-categories-page{

    position:fixed;

    inset:0;

    background:#fff;

    z-index:3200;

    display:flex;

    flex-direction:column;

    transform:translateX(100%);

    transition:.3s ease;

    overflow-x:hidden;

}

.all-categories-page.active{

    transform:translateX(0);

}

.all-categories-header{

    flex-shrink:0;

    padding:18px 20px 14px;

    padding-top:calc(18px + env(safe-area-inset-top));

    border-bottom:1px solid #f2f2f2;

}

.all-categories-back{

    width:36px;

    height:36px;

    border-radius:50%;

    background:#f4f4f4;

    border:none;

    display:flex;

    align-items:center;

    justify-content:center;

    color:#1c1c1c;

    cursor:pointer;

}

.all-categories-back i{

    width:18px;

    height:18px;

}

.all-categories-heading-text{

    margin-top:14px;

}

.all-categories-heading-text h2{

    font-size:20px;

    font-weight:800;

    color:#1c1c1c;

}

.all-categories-heading-text p{

    margin-top:4px;

    font-size:13px;

    color:#8a8a8a;

}

.all-categories-body{

    flex:1;

    overflow-y:auto;

    overflow-x:hidden;

    padding:16px 20px 40px;

}

.all-categories-grid{

    display:grid;

    grid-template-columns:repeat(2, minmax(0, 1fr));

    gap:14px 12px;

}

.all-category-card{

    position:relative;

    display:flex;

    align-items:flex-start;

    gap:10px;

    min-width:0;

    background:#fff;

    border:1px solid #f0f0f0;

    border-radius:18px;

    padding:14px 14px 32px 14px;

    box-shadow:0 6px 18px rgba(0,0,0,.05);

    text-align:left;

    cursor:pointer;

    min-height:96px;

}

.all-category-image{

    width:46px;

    height:46px;

    border-radius:13px;

    overflow:hidden;

    background:#f4f4f4;

    flex-shrink:0;

}

.all-category-image img{

    width:100%;

    height:100%;

    object-fit:cover;

}

.all-category-info{

    flex:1;

    min-width:0;

}

.all-category-info strong{

    display:block;

    font-size:14px;

    font-weight:700;

    color:#1c1c1c;

    margin-bottom:4px;

    overflow-wrap:break-word;

}

.all-category-info small{

    display:block;

    font-size:11px;

    line-height:1.4;

    color:#8f8f8f;

    overflow-wrap:break-word;

}

.all-category-arrow{

    position:absolute;

    right:12px;

    bottom:12px;

    width:24px;

    height:24px;

    border-radius:50%;

    background:#fff3e8;

    color:var(--primary);

    display:flex;

    align-items:center;

    justify-content:center;

}

.all-category-arrow i{

    width:13px;

    height:13px;

}