/* ===========================================
   HEADER
=========================================== */

.header{

    position:fixed;

    top:0;

    right:0;

    left:0;

    height:180px;

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:20px 30px;

    background:rgba(255,255,255,.95);

    backdrop-filter:blur(15px);

    border-bottom:1px solid #e5e7eb;

    box-shadow:0 5px 20px rgba(0,0,0,.08);

    z-index:9999;

}

/* ===========================================
   RIGHT
=========================================== */

.right-section{

    display:flex;

    align-items:center;

    gap:25px;

}

.logo{

    height:120px;

    width:auto;

    display:block;

}

.phones{

    display:flex;

    flex-direction:column;

    gap:6px;

}

.phones a{

    text-decoration:none;

    color:#0f172a;

    font-size:15px;

    font-weight:bold;

    transition:.3s;

}

.phones a:hover{

    color:#16a34a;

}

/* ===========================================
   LEFT
=========================================== */

.left-section{

    display:flex;

    align-items:center;

    gap:15px;

}

/* ===========================================
   CART
=========================================== */

.cart-btn{

    position:relative;

    width:55px;

    height:55px;

    border:none;

    border-radius:16px;

    background:#fff;

    font-size:23px;

    cursor:pointer;

    box-shadow:0 10px 25px rgba(0,0,0,.12);

    transition:.3s;

}

.cart-btn:hover{

    background:#2563eb;

    color:#fff;

    transform:translateY(-3px);

}

.cart-count{

    position:absolute;

    top:-6px;

    left:-6px;

    min-width:22px;

    height:22px;

    background:#ef4444;

    color:#fff;

    border-radius:50%;

    display:flex;

    justify-content:center;

    align-items:center;

    font-size:12px;

    font-weight:bold;

}

/* ===========================================
   USER
=========================================== */

.user-btn{

    height:55px;

    display:flex;

    align-items:center;

    gap:10px;

    padding:0 18px;

    border-radius:16px;

    background:#fff;

    text-decoration:none;

    color:#111827;

    font-weight:bold;

    box-shadow:0 10px 25px rgba(0,0,0,.12);

    transition:.3s;

}

.user-btn:hover{

    background:#16a34a;

    color:#fff;

    transform:translateY(-3px);

}

/* ===========================================
   MENU BUTTON
=========================================== */

.menu-toggle{

    width:55px;

    height:55px;

    border:none;

    border-radius:16px;

    background:#fff;

    font-size:24px;

    cursor:pointer;

    box-shadow:0 10px 25px rgba(0,0,0,.12);

    transition:.3s;

}

.menu-toggle:hover{

    background:#16a34a;

    color:#fff;

    transform:rotate(90deg);

}
/* ===========================================
   OVERLAY
=========================================== */

.overlay{

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.45);

    opacity:0;

    visibility:hidden;

    transition:.35s;

    z-index:9998;

}

.overlay.show{

    opacity:1;

    visibility:visible;

}


/* ===========================================
   MENU
=========================================== */

.menu{

    position:fixed;

    top:0;

    right:0;

    width:320px;

    max-width:90%;

    height:100vh;

    background:#fff;

    overflow-y:auto;

    transform:translateX(100%);

    transition:.35s;

    z-index:99999;

    padding:20px 0;

    box-shadow:-15px 0 35px rgba(0,0,0,.15);

}

.menu.open{

    transform:translateX(0);

}


/* ===========================================
   MENU ITEMS
=========================================== */

.menu-item{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin:10px 15px;

    padding:15px 18px;

    border-radius:14px;

    background:#f8fafc;

    border:1px solid #e2e8f0;

    cursor:pointer;

    font-weight:bold;

    transition:.3s;

}

.menu-item:hover{

    background:#ecfdf5;

    border-color:#16a34a;

}


/* ===========================================
   SUB MENU
=========================================== */

.submenu{

    max-height:0;

    overflow:hidden;

    transition:.35s;

    margin:0 20px;

}

.submenu.open{

    max-height:1000px;

}

.submenu a{

    display:block;

    padding:12px 15px;

    margin:8px 0;

    border-radius:10px;

    text-decoration:none;

    background:#f8fafc;

    color:#475569;

    transition:.25s;

}

.submenu a:hover{

    background:#dcfce7;

    color:#111827;

}


/* ===========================================
   SEARCH
=========================================== */

.search-box{

    width:90%;

    max-width:850px;

    margin:220px auto 30px;

    display:flex;

    align-items:center;

    gap:10px;

}

.search-wrapper{

    position:relative;

    flex:1;

}

.search-box input{

    width:100%;

    height:58px;

    padding:0 20px;

    border:1px solid #d1d5db;

    border-radius:18px;

    outline:none;

    font-size:15px;

    transition:.3s;

}

.search-box input:focus{

    border-color:#16a34a;

    box-shadow:0 0 15px rgba(22,163,74,.15);

}

.search-box button{

    width:58px;

    height:58px;

    border:none;

    border-radius:18px;

    background:linear-gradient(135deg,#16a34a,#2563eb);

    color:#fff;

    font-size:22px;

    cursor:pointer;

    transition:.3s;

}

.search-box button:hover{

    transform:scale(1.05);

}


/* ===========================================
   LIVE SEARCH
=========================================== */

#searchResult{

    position:absolute;

    top:65px;

    right:0;

    left:0;

    background:#fff;

    border-radius:18px;

    overflow:hidden;

    display:none;

    z-index:999999;

    border:1px solid #e5e7eb;

    box-shadow:0 20px 45px rgba(0,0,0,.15);

    max-height:420px;

    overflow-y:auto;

}

.search-item{

    display:flex;

    align-items:center;

    gap:15px;

    padding:15px;

    text-decoration:none;

    color:#111827;

    transition:.25s;

}

.search-item:hover{

    background:#f8fafc;

}

.search-item img{

    width:55px;

    height:55px;

    object-fit:contain;

}

.search-title{

    font-size:15px;

    font-weight:bold;

}

.search-price{

    color:#16a34a;

    font-weight:bold;

}
/* ===========================================
   RESPONSIVE
=========================================== */

@media (max-width:992px){

.header{

    height:auto;

    padding:15px;

    flex-wrap:wrap;

    gap:15px;

}

.logo{

    height:75px;

}

.phones{

    display:none;

}

.search-box{

    width:95%;

    margin-top:170px;

}

.user-btn{

    height:48px;

    padding:0 14px;

    font-size:14px;

}

.cart-btn,
.menu-toggle{

    width:48px;

    height:48px;

}

.menu{

    width:300px;

}

}


/* ================= MOBILE ================= */

@media (max-width:768px){

.header{

    display:grid;

    grid-template-columns:1fr auto auto auto;

    align-items:center;

    gap:10px;

    padding:10px;

}

.right-section{

    display:flex;

    align-items:center;

    gap:10px;

}

.logo{

    height:55px;

}

.left-section{

    display:flex;

    align-items:center;

    justify-content:flex-end;

    gap:10px;

}

.user-btn{

    width:45px;

    height:45px;

    padding:0;

    justify-content:center;

    font-size:20px;

}

.user-btn span{

    display:none;

}

.cart-btn{

    width:45px;

    height:45px;

    font-size:20px;

}

.menu-toggle{

    width:45px;

    height:45px;

    font-size:22px;

}

.menu{

    width:280px;

}

.menu-item{

    padding:14px;

    font-size:15px;

}

.submenu a{

    font-size:14px;

}

.search-box{

    width:96%;

    margin-top:120px;

}

.search-box input{

    height:50px;

    font-size:14px;

}

.search-box button{

    width:50px;

    height:50px;

    font-size:20px;

}

#searchResult{

    top:56px;

}

.search-item{

    padding:12px;

}

.search-item img{

    width:48px;

    height:48px;

}

}


/* ================= SMALL MOBILE ================= */

@media (max-width:480px){

.header{
    display:grid;
    grid-template-columns:1fr auto auto auto;
    align-items:center;
    gap:12px;
    padding:15px;
}

.right-section{
    display:flex;
    align-items:center;
    gap:10px;
}

.left-section{
    display:flex;
    align-items:center;
    gap:10px;
}

.logo{
    height:65px;
}

.phones{
    display:none;
}

.cart-btn,
.menu-toggle,
.user-btn{
    width:52px;
    height:52px;
    font-size:22px;
}

.user-btn span{
    display:none;
}

.search-box{
    width:95%;
    margin:130px auto 25px;
    gap:10px;
}

.search-wrapper{
    width:100%;
}

.search-box input{
    height:58px;
    font-size:16px;
    padding:0 18px;
}

.search-box button{
    width:58px;
    height:58px;
    font-size:22px;
}

#searchResult{
    top:64px;
}

.search-item{
    padding:14px;
}

.search-item img{
    width:55px;
    height:55px;
}

.search-title{
    font-size:15px;
}

.search-price{
    font-size:15px;
}

.menu{
    width:290px;
}

.menu-item{
    font-size:15px;
    padding:14px;
}

.submenu a{
    font-size:14px;
}

}


/* جلوگیری از اسکرول افقی */

html,
body{

    overflow-x:hidden;

}

img{

    max-width:100%;

    height:auto;

}