body{
    margin:0;
    background:#f3f4f6;
    font-family:sans-serif;
}

*{
    box-sizing:border-box;
}

.hidden{
    display:none;
}

.app-container{
    width:100%;
    max-width:430px;
    margin:auto;
    background:white;
    min-height:100vh;
    position:relative;
    overflow:hidden;
}



/* HEADER */

.header{
    padding:20px;
    background:linear-gradient(
        to bottom,
        #f7a94a,
        #f7d7b0
    );
}

.header-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.store-name{
    font-size:32px;
    color:white;
    font-weight:bold;
    margin:0;
}

.welcome-text{
    margin:0;
    color:#7c2d12;
}

.profile-btn{
    width:45px;
    height:45px;
    border:none;
    border-radius:50%;
    overflow:hidden;
    cursor:pointer;
}

.profile-img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.search-box{
    margin-top:20px;
}

.search-box input{
    width:100%;
    border:none;
    outline:none;
    padding:14px;
    border-radius:50px;
    background:white;
}



/* ADS */

.advertisement-section{
    padding:15px;
}

.ad-card{
    border-radius:30px;
    padding:20px;
    color:white;
    min-height:180px;
}



/* CATEGORY */

.category-section{
    padding:0 15px;
}

.section-title{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.category-container{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:12px;
    margin-top:15px;
}

.category-card{
    text-align:center;
    cursor:pointer;
}

.category-card img{
    width:100%;
    height:75px;
    object-fit:cover;
    border-radius:18px;
    border:3px solid transparent;
}

.category-card p{
    margin-top:5px;
    font-size:12px;
}

.active-category img{
    border-color:#8b5cf6;
}



/* ITEMS */

.item-container{
    padding:15px;
    padding-bottom:120px;
}

.food-card{
    display:flex;
    gap:12px;
    padding:10px;
    border-radius:20px;
    background:white;
    box-shadow:0 2px 10px rgba(0,0,0,.08);
    margin-bottom:15px;
}

.food-image{
    width:90px;
    height:90px;
    border-radius:15px;
    object-fit:cover;
}

.food-content{
    flex:1;
}

.food-title{
    font-size:14px;
    font-weight:bold;
    margin:0;
}

.food-desc{
    font-size:12px;
    color:gray;
    margin-top:5px;
}

.food-bottom{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:10px;
}

.food-price{
    color:#16a34a;
    font-weight:bold;
}

.add-btn{
    background:#16a34a;
    color:white;
    border:none;
    padding:8px 14px;
    border-radius:10px;
    cursor:pointer;
}



/* CART */

.cart-bar{
    position:fixed;
    bottom:15px;
    left:50%;
    transform:translateX(-50%);
    width:90%;
    max-width:400px;
    background:#16a34a;
    color:white;
    padding:15px;
    border-radius:18px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    z-index:999;
}

.cart-btn{
    background:white;
    color:#16a34a;
    border:none;
    padding:10px 18px;
    border-radius:12px;
    font-weight:bold;
    cursor:pointer;
}



/* SEARCH PAGE */

.search-page{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:white;
    z-index:9999;
    overflow-y:auto;
}

.search-header{
    display:flex;
    gap:10px;
    padding:15px;
}

.search-header input{
    flex:1;
    border:none;
    background:#f3f4f6;
    border-radius:40px;
    padding:12px;
}



/* POPUP */

.popup{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.5);
    z-index:99999;
    display:flex;
    justify-content:center;
    align-items:center;
}

.popup-content{
    width:90%;
    max-width:350px;
    background:white;
    border-radius:20px;
    padding:20px;
}

.popup-content input{
    width:100%;
    padding:14px;
    margin-top:15px;
    border-radius:12px;
    border:1px solid #ddd;
}

.popup-content button{
    width:100%;
    margin-top:15px;
    background:#16a34a;
    color:white;
    border:none;
    padding:14px;
    border-radius:12px;
}

.qty-box{
    display:flex;
    align-items:center;
    gap:10px;
    border:1px solid #16a34a;
    border-radius:12px;
    padding:5px 10px;
}

.qty-box button{
    background:none;
    border:none;
    font-size:20px;
    cursor:pointer;
    color:#16a34a;
}

.search-card{
    display:flex;
    align-items:center;
    gap:15px;
    background:#fff;
    border-radius:18px;
    padding:10px;
    margin-bottom:15px;
}

.search-image{
    width:70px;
    height:70px;
    object-fit:cover;
    border-radius:14px;
}

.popup{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.4);
    z-index:999;
}

.popup-content{
    position:absolute;
    bottom:0;
    width:100%;
    background:#fff;
    border-radius:30px 30px 0 0;
    padding:20px;
}

.profile-image{
    width:90px;
    height:90px;
    border-radius:50%;
    object-fit:cover;
}

.profile-item{
    padding:18px 0;
    border-bottom:1px solid #eee;
    cursor:pointer;
}

/* =========================
ORDER HISTORY
========================= */

.search-title{
    font-size:20px;
    font-weight:700;
}

.history-card{
    background:white;
    border-radius:24px;
    padding:18px;
    margin-bottom:18px;
    box-shadow:0 4px 15px rgba(0,0,0,0.08);
}

.history-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.history-order-id{
    font-size:18px;
    font-weight:700;
}

.history-date{
    color:#777;
    margin-top:5px;
    font-size:13px;
}

.history-status{
    background:#dcfce7;
    color:#15803d;
    padding:8px 14px;
    border-radius:30px;
    font-size:13px;
    font-weight:600;
}

.history-items{
    margin-top:18px;
}

.history-food{
    background:#f8fafc;
    padding:12px;
    border-radius:14px;
    margin-bottom:10px;
    font-size:15px;
}

.history-bottom{
    margin-top:18px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.history-total{
    font-size:24px;
    font-weight:700;
    color:#16a34a;
}

.history-btn{
    background:#111827;
    color:white;
    border:none;
    padding:12px 18px;
    border-radius:14px;
    cursor:pointer;
}

/* =========================
SUCCESS POPUP
========================= */

.success-popup{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.5);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:9999;
}

.success-box{
    width:85%;
    max-width:320px;
    background:white;
    border-radius:30px;
    padding:35px 25px;
    text-align:center;
    animation:popupShow 0.3s ease;
}

.success-icon{
    width:90px;
    height:90px;
    background:#22c55e;
    color:white;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:45px;
    margin:auto;
    margin-bottom:20px;
}

.success-box h2{
    font-size:24px;
    font-weight:700;
    margin-bottom:10px;
}

.success-box p{
    color:#666;
    font-size:15px;
}

@keyframes popupShow{

    from{
        transform:scale(0.7);
        opacity:0;
    }

    to{
        transform:scale(1);
        opacity:1;
    }

}

.history-progress {
    margin: 12px 0;
}

.progress-line {
    width: 100%;
    height: 6px;
    background: #ececec;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #22c55e;
    transition: .3s;
}

.status-request {
    color: #f59e0b;
}

.status-running {
    color: #3b82f6;
}

.status-delivered {
    color: #10b981;
}

.status-completed {
    color: #16a34a;
}

.status-cancelled {
    color: #ef4444;
}

.history-food {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.history-store {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

.history-card {
    background: #fff;
    border-radius: 14px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.history-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.history-order-id {
    font-size: 16px;
    margin: 0;
}

.history-date {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

.history-store {
    font-size: 13px;
    color: #444;
    margin-top: 5px;
    font-weight: 600;
}

.history-status {
    background: #f3f4f6;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.order-tracker {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin: 20px 0;
}

.tracker-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 70px;
}

.tracker-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #d1d5db;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.tracker-step span {
    margin-top: 6px;
    font-size: 11px;
    text-align: center;
    color: #888;
}

.tracker-step.active .tracker-circle {
    background: #22c55e;
}

.tracker-step.active span {
    color: #111;
    font-weight: 600;
}

.tracker-line {
    flex: 1;
    height: 4px;
    margin-top: 15px;
    background: #d1d5db;
}

.tracker-line.active {
    background: #22c55e;
}

.history-items {
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.history-food {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.history-bottom {
    margin-top: 12px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.history-total {
    color: #16a34a;
    margin-top: 5px;
}

.order-cancelled {
    margin: 18px 0;
    padding: 15px;
    border-radius: 12px;
    background: #fee2e2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #dc2626;
    font-weight: 700;
}

.cancel-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #dc2626;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coupon-card {
    background: #fff;
    border-radius: 14px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    border-left: 5px solid #22c55e;
}

.coupon-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.coupon-title {
    font-size: 18px;
    font-weight: 700;
}

.coupon-store {
    margin-top: 5px;
    font-size: 13px;
    color: #666;
}

.coupon-discount {
    font-size: 20px;
    font-weight: bold;
    color: #22c55e;
}

.coupon-code-box {
    margin-top: 15px;
    background: #f5f5f5;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
}

.coupon-code-box span {
    display: block;
    font-size: 12px;
    color: #777;
}

.coupon-code-box h3 {
    margin-top: 5px;
    letter-spacing: 2px;
}

.coupon-details {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.coupon-details span {
    display: block;
    font-size: 12px;
    color: #777;
}

.coupon-details strong {
    display: block;
    margin-top: 4px;
    font-size: 14px;
}

.cart-item-card{
    display:flex;
    align-items:center;
    gap:12px;
    background:#fff;
    padding:12px;
    border-radius:14px;
    margin-bottom:12px;
    box-shadow:0 2px 10px rgba(0,0,0,.06);
}

.cart-item-image{
    width:70px;
    height:70px;
    border-radius:12px;
    object-fit:cover;
}

.cart-item-info{
    flex:1;
}

.cart-item-info h3{
    margin:0;
    font-size:15px;
    font-weight:600;
}

.cart-item-info p{
    margin-top:6px;
    color:#16a34a;
    font-weight:600;
}

.cart-item-qty{
    display:flex;
    align-items:center;
    gap:10px;
}

.cart-item-qty button{
    width:32px;
    height:32px;
    border:none;
    border-radius:50%;
    background:#16a34a;
    color:white;
    font-size:18px;
    font-weight:bold;
}

.cart-item-qty span{
    min-width:20px;
    text-align:center;
    font-weight:600;
}

.cart-summary{
    margin-top:20px;
    background:#fff;
    border-radius:14px;
    padding:15px;
    box-shadow:0 2px 10px rgba(0,0,0,.06);
}

.cart-summary-row{
    display:flex;
    justify-content:space-between;
    margin-bottom:12px;
}

.cart-summary-row:last-child{
    margin-bottom:0;
}

.cart-place-order{
    margin-top:20px;
}

.place-order-btn{
    width:100%;
    border:none;
    background:#16a34a;
    color:white;
    padding:15px;
    border-radius:16px;
    font-size:18px;
    font-weight:700;
}

.empty-cart{
    text-align:center;
    padding:50px 20px;
}

.empty-cart h2{
    margin-bottom:10px;
}

.empty-cart p{
    color:#777;
}