*{box-sizing:border-box}
:root{
    --header-height:76px;
    --footer-height:56px;
    --bg:#f5f7f6;
    --surface:#ffffff;
    --surface-soft:#fbfcfc;
    --ink:#13251d;
    --muted:#5d6b65;
    --accent:#176f3f;
    --accent-strong:#0f5a32;
    --line:#e5ece8;
}
html,body{height:100%}
body{
    margin:0;
    color:var(--ink);
    font-family:"Segoe UI",Arial,Helvetica,sans-serif;
    background:radial-gradient(circle at top right,#eef6f1 0,#f7f9f8 38%,#f5f7f6 100%);
}

.order-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:14px 26px;
    border-bottom:1px solid var(--line);
    background:rgba(255,255,255,0.92);
    backdrop-filter:blur(4px);
    position:fixed;
    left:0;
    right:0;
    top:0;
    height:var(--header-height);
    z-index:100;
}
.brand{display:flex;align-items:center;gap:12px}
.brand-logo{height:46px;width:auto}
.brand h1{margin:0;font-size:24px;letter-spacing:.2px;font-weight:700;color:#103525}
.order-nav{font-weight:600;color:var(--muted)}
.order-nav a{color:var(--accent-strong);text-decoration:none}
.order-nav a:hover{text-decoration:underline}
.order-nav .fs-btn{
    background:var(--accent);
    color:#fff;
    border:0;
    border-radius:7px;
    padding:6px 10px;
    margin-left:6px;
    cursor:pointer;
    font-weight:700;
    font-size:12px;
    line-height:1;
}
.order-nav .fs-btn:hover{background:var(--accent-strong)}

.order-main{
    display:flex;
    gap:22px;
    padding:22px;
    padding-top:calc(var(--header-height) + 14px);
    height:calc(100vh - var(--header-height) - var(--footer-height));
    overflow:hidden;
}

.items-grid{
    flex:1;
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(230px,1fr));
    gap:18px;
    overflow:auto;
    padding:2px 2px calc(var(--footer-height) + 18px) 2px;
}

.card{
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:14px;
    padding:12px;
    display:flex;
    flex-direction:column;
    gap:8px;
    box-shadow:0 8px 24px rgba(17,48,34,.06);
    transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease;
}
.card:hover{
    transform:translateY(-2px);
    border-color:#d5e4dc;
    box-shadow:0 14px 26px rgba(17,48,34,.10);
}
.card .thumb{
    height:170px;
    width:100%;
    border-radius:10px;
    background:#edf2ef;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
}
.card img{width:100%;height:100%;display:block;object-fit:cover}
.card h3{margin:2px 0 0 0;font-size:17px;line-height:1.25;color:#153a2a}
.card p{margin:0;color:var(--muted);font-size:13px;line-height:1.4;min-height:36px}
.card .meta{display:flex;justify-content:space-between;align-items:center;margin-top:6px}

.price{font-weight:800;color:#144d32;font-size:15px}
.controls{display:flex;gap:8px;align-items:center}
.btn{
    background:var(--accent);
    color:#fff;
    padding:9px 14px;
    border-radius:8px;
    border:0;
    cursor:pointer;
    font-weight:700;
    letter-spacing:.2px;
    transition:background .15s ease,transform .12s ease,opacity .12s ease;
}
.btn:hover{background:var(--accent-strong)}
.btn:active{transform:translateY(1px)}
.btn:disabled{opacity:.55;cursor:not-allowed}
.btn.secondary{background:#edf2ef;color:#183728}
.btn.secondary:hover{background:#dde8e1}

.qty{display:inline-flex;align-items:center;gap:7px}
.qty button{
    background:#edf2ef;
    border:1px solid #dae5df;
    padding:3px 9px;
    border-radius:7px;
    cursor:pointer;
    color:#244838;
    font-weight:700;
}

.cart{
    width:340px;
    border:1px solid var(--line);
    padding:16px;
    background:linear-gradient(180deg,var(--surface),var(--surface-soft));
    border-radius:14px;
    overflow:auto;
    padding-bottom:calc(var(--footer-height) + 16px);
    box-shadow:0 12px 28px rgba(17,48,34,.06);
}
.cart h2{margin:0 0 10px 0;color:#15392a;font-size:22px}
.cart-item{display:flex;justify-content:space-between;gap:8px;padding:10px 0;border-bottom:1px dashed #d9e5df}
.cart-footer{margin-top:12px;display:flex;flex-direction:column;gap:10px}
.total{font-weight:800;font-size:18px;color:#144d32}

.order-footer{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    height:var(--footer-height);
    display:flex;
    align-items:center;
    justify-content:center;
    background:#0d6d40;
    color:#f5fff8;
    border-top:1px solid rgba(0,0,0,.06);
    z-index:100;
    font-size:14px;
    letter-spacing:.2px;
}

@media(max-width:1000px){
    .order-main{flex-direction:column;gap:14px;padding:14px;padding-top:calc(var(--header-height) + 10px)}
    .cart{width:100%}
    .brand h1{font-size:20px}
}
@media(max-width:640px){
    .order-header{padding:10px 12px}
    .brand-logo{height:38px}
    .brand h1{font-size:17px}
    .order-nav{font-size:13px}
    .items-grid{grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px}
    .card .thumb{height:140px}
    .cart h2{font-size:20px}
}

.modal-overlay{position:fixed;inset:0;background:rgba(13,20,16,.52);display:flex;align-items:center;justify-content:center;z-index:1000;padding:18px}
.modal{
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:14px;
    max-width:560px;
    width:100%;
    padding:20px;
    box-shadow:0 24px 58px rgba(8,24,17,.28);
}
.modal h3{margin:0 0 10px 0;color:#163b2b}
.modal .items-list{max-height:250px;overflow:auto;margin:10px 0;padding:0}
.modal .items-list li{list-style:none;padding:8px 0;border-bottom:1px solid #edf3f0;color:#30443b}
.modal .actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.modal .btn.secondary{background:#edf2ef;color:#183728}
