/* =========================================
   Zeas Kitchen – cart styles shared by shop.php (tray) and cart.php (page).
   Cart lines (.zk-ci) are drawn by includes/cart-render.php and kept up to date
   by assets/js/cart.js, so the tray and the page always look and behave the same.
   Tray rules are scoped to #zeasCartDrawer so older styles.css rules can't misalign it.
========================================= */
html.zk-cart-open, html.zk-cart-open body{ overflow:hidden; }
.zeas-cart-overlay{ background:rgba(17,12,30,.5); }
#zeasCartDrawer{
    right:0;
    width:420px;
    max-width:100vw;
    height:100vh;
    height:100dvh;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    background:#fff;
    font-family:"Lato", sans-serif;
    transform:translateX(105%);
    visibility:hidden;
    transition:transform .32s cubic-bezier(.16,1,.3,1), visibility 0s linear .32s;
    box-shadow:-12px 0 40px rgba(17,6,66,.18);
}
#zeasCartDrawer.open{
    transform:none;
    visibility:visible;
    transition:transform .32s cubic-bezier(.16,1,.3,1), visibility 0s;
}
#zeasCartDrawer .zeas-cart-header{
    flex:none;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:18px 20px;
    background:#fff;
    color:#1e1e1e;
    border-bottom:1px solid #efe9dc;
}
#zeasCartDrawer .zk-cart-heading{ display:flex; align-items:center; gap:10px; min-width:0; }
#zeasCartDrawer .zeas-cart-header h4{
    margin:0;
    font-size:20px;
    font-weight:700;
    color:#110642;
    white-space:nowrap;
}
#zeasCartDrawer .zk-cart-count{
    padding:3px 10px;
    border-radius:999px;
    background:#f5efe3;
    color:#8a6a35;
    font-size:13px;
    font-weight:700;
    white-space:nowrap;
}
#zeasCartDrawer .zeas-cart-close{
    width:38px; height:38px;
    margin:0;
    border-radius:50%;
    border:none;
    background:#f5f3ee;
    color:#1e1e1e;
    font-size:24px;
    line-height:1;
    display:flex; align-items:center; justify-content:center;
    transition:background .2s ease, transform .2s ease;
}
#zeasCartDrawer .zeas-cart-close:hover{ background:#ece6d9; transform:rotate(90deg); }

#zeasCartDrawer .zeas-cart-body{
    flex:1;
    min-height:0;
    overflow-y:auto;
    overscroll-behavior:contain;
    padding:4px 20px;
    transition:opacity .15s ease;
}
#zeasCartDrawer.is-busy .zeas-cart-body{ opacity:.55; pointer-events:none; }

/* one line in the cart */
.zk-cart-lines .zk-ci{
    display:grid;
    grid-template-columns:76px minmax(0,1fr);
    gap:14px;
    padding:16px 0;
    border-bottom:1px solid #f0ebe0;
}
.zk-cart-lines .zk-ci:last-child{ border-bottom:none; }
.zk-cart-lines .zk-ci-img{
    width:76px; height:76px;
    border-radius:10px;
    overflow:hidden;
    background:#ece6d9;
}
.zk-cart-lines .zk-ci-img img, .zk-cart-lines .zk-ci-noimg{
    display:block; width:100%; height:100%; object-fit:cover;
}
.zk-cart-lines .zk-ci-main{ display:flex; flex-direction:column; min-width:0; }
.zk-cart-lines .zk-ci-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.zk-cart-lines .zk-ci-name{
    margin:0;
    font-size:15.5px;
    font-weight:700;
    line-height:1.35;
    color:#1e1e1e;
    overflow-wrap:anywhere;
}
.zk-cart-lines .zk-ci-remove{
    flex:none;
    width:28px; height:28px;
    margin:-3px -4px 0 0;
    border:none;
    border-radius:50%;
    background:transparent;
    color:#9a9a9a;
    font-size:15px;
    display:flex; align-items:center; justify-content:center;
}
.zk-cart-lines .zk-ci-remove:hover{ background:#fbeaea; color:#c0392b; }
.zk-cart-lines .zk-ci-meta{
    margin:3px 0 0;
    font-size:13.5px;
    letter-spacing:0;
    color:#777;
}
.zk-cart-lines .zk-ci-note{
    margin:8px 0 0;
    padding:6px 10px;
    border-left:3px solid #c99c59;
    border-radius:0 6px 6px 0;
    background:#fbf6ec;
    font-size:13px;
    letter-spacing:0;
    line-height:1.45;
    color:#5f5f5f;
    overflow-wrap:anywhere;
}
.zk-cart-lines .zk-ci-note span{ font-weight:700; color:#8a6a35; }
.zk-cart-lines .zk-ci-foot{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-top:10px;
}
.zk-cart-lines .zk-ci-qty{
    display:inline-flex;
    align-items:center;
    border:1.5px solid #e6e0d4;
    border-radius:999px;
    overflow:hidden;
    background:#fff;
}
.zk-cart-lines .zk-ci-qty button{
    width:34px; height:32px;
    padding:0;
    border:none;
    background:transparent;
    color:#110642;
    font-size:18px;
    line-height:1;
    display:flex; align-items:center; justify-content:center;
    cursor:pointer;
}
.zk-cart-lines .zk-ci-qty button .fa{ font-size:14px; }
.zk-cart-lines .zk-ci-qty button:hover{ background:#f5efe3; }
.zk-cart-lines .zk-ci-qty button:disabled{ opacity:.35; cursor:not-allowed; background:transparent; }
.zk-cart-lines .zk-ci-qty-val{ min-width:26px; text-align:center; font-weight:700; font-size:14.5px; }
.zk-cart-lines .zk-ci-total{ font-size:15.5px; font-weight:700; color:#110642; white-space:nowrap; }

/* empty */
.zk-cart-lines .zk-cart-empty{ text-align:center; padding:56px 12px; }
.zk-cart-lines .zk-cart-empty-icon{
    width:72px; height:72px;
    margin:0 auto 16px;
    border-radius:50%;
    background:#f5efe3;
    color:#c99c59;
    font-size:30px;
    display:flex; align-items:center; justify-content:center;
}
.zk-cart-lines .zk-cart-empty-title{ margin:0 0 4px; font-size:18px; font-weight:700; color:#1e1e1e; letter-spacing:0; }
.zk-cart-lines .zk-cart-empty-text{ margin:0 0 20px; font-size:14.5px; color:#777; letter-spacing:0; }
.zk-cart-lines .zk-cart-browse{
    display:inline-block;
    text-decoration:none !important;
    width:auto !important;
    border:1.5px solid #c99c59;
    border-radius:999px;
    background:#fff;
    color:#8a6a35 !important;
    font-weight:700;
    padding:10px 22px;
}
.zk-cart-lines .zk-cart-browse:hover{ background:#c99c59; color:#fff !important; }

/* footer */
#zeasCartDrawer .zeas-cart-footer{
    flex:none;
    display:block;
    padding:16px 20px calc(16px + env(safe-area-inset-bottom));
    border-top:1px solid #efe9dc;
    background:#fff;
    box-shadow:0 -6px 18px rgba(0,0,0,.04);
}
#zeasCartDrawer.is-empty .zeas-cart-footer{ display:none; }
#zeasCartDrawer .zk-cart-subtotal{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    font-size:16px;
    color:#1e1e1e;
}
#zeasCartDrawer .zk-cart-subtotal strong{ font-size:18px; color:#110642; }
#zeasCartDrawer .zk-cart-hint{ margin:4px 0 14px; font-size:12.5px; color:#888; letter-spacing:0; }
#zeasCartDrawer .zk-cart-checkout{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    width:100%;
    min-height:52px;
    padding:0 20px;
    border-radius:12px;
    background:#110642;
    color:#fff !important;
    font-size:16px;
    font-weight:700;
    text-decoration:none !important;
    transition:background .2s ease;
}
#zeasCartDrawer .zk-cart-checkout:hover{ background:#c99c59; }
#zeasCartDrawer .zk-cart-view{
    display:block;
    margin-top:10px;
    padding:8px;
    text-align:center;
    color:#8a6a35 !important;
    font-weight:700;
    font-size:14.5px;
    text-decoration:none !important;
}
#zeasCartDrawer .zk-cart-view:hover{ text-decoration:underline !important; }
#zeasCartDrawer a[aria-disabled="true"]{ opacity:.45; pointer-events:none; }

@media (max-width:480px){
    #zeasCartDrawer{ width:100vw; }
    #zeasCartDrawer .zeas-cart-header, #zeasCartDrawer .zeas-cart-footer{ padding-left:16px; padding-right:16px; }
    #zeasCartDrawer .zeas-cart-body{ padding:4px 16px; }
    .zk-cart-lines .zk-ci{ grid-template-columns:64px minmax(0,1fr); gap:12px; }
    .zk-cart-lines .zk-ci-img{ width:64px; height:64px; }
}

/* header hover preview: a bridge over the gap so it doesn't vanish on the way down */
.menu-header-cart-preview{ width:270px; padding:12px 14px; }
.menu-header-cart-preview::before{ content:""; position:absolute; left:0; right:0; top:-16px; height:16px; }
.menu-header-cart-preview .preview-item{
    display:flex; justify-content:space-between; align-items:baseline; gap:10px;
    padding:6px 0; font-size:14px; color:#1e1e1e; border-bottom:1px solid #f0ebe0;
}
.menu-header-cart-preview .preview-name{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.menu-header-cart-preview .preview-name small{ color:#888; }
.menu-header-cart-preview .preview-qty{ flex:none; color:#8a6a35; font-weight:700; }
.menu-header-cart-preview .preview-total{
    display:flex; justify-content:space-between; padding-top:8px; font-size:14px; color:#110642;
}
.menu-header-cart-preview .empty-cart{ margin:4px 0; }

/* small messages ("Added …") */
.zk-toasts{
    position:fixed; left:50%; bottom:24px; transform:translateX(-50%);
    z-index:12000; display:grid; gap:8px; width:min(92vw, 420px); pointer-events:none;
}
.zk-toast{
    pointer-events:auto;
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding:12px 14px 12px 18px;
    border-radius:12px;
    background:#110642; color:#fff;
    font-family:"Lato", sans-serif; font-size:15px;
    box-shadow:0 12px 30px rgba(0,0,0,.25);
    animation:zkToastIn .25s ease;
    transition:opacity .35s ease, transform .35s ease;
}
.zk-toast.is-error{ background:#b42318; }
.zk-toast.is-leaving{ opacity:0; transform:translateY(8px); }
.zk-toast span{ flex:1; min-width:0; }
.zk-toast button{
    flex:none; width:auto !important; white-space:nowrap; margin:0;
    border:none; border-radius:8px; padding:7px 12px;
    background:#c99c59; color:#fff; font-weight:700; font-size:14px;
}
@keyframes zkToastIn{ from{ opacity:0; transform:translateY(10px) } to{ opacity:1; transform:none } }


/* =========================================
   CART PAGE (cart.php)
========================================= */
.zk-cart-page{
    font-family:"Lato", sans-serif;
    background:#faf8f3;
    min-height:60vh;
    padding:120px 0 72px;
}
.zk-cart-page .zk-wrap{ max-width:1120px; margin:0 auto; padding:0 20px; }
.zk-cart-page-head{ display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:22px; padding-right:200px; } /* room for the floating Log in / cart buttons */
@media (max-width:991.98px){ .zk-cart-page-head{ padding-right:0; } }
.zk-cart-page-head h1{
    margin:0;
    font-family:"Lato", sans-serif;
    font-size:32px;
    font-weight:700;
    letter-spacing:0;
    color:#110642;
}
.zk-cart-page-head h1 .zk-cart-count{
    display:inline-block;
    vertical-align:middle;
    margin-left:10px;
    padding:4px 12px;
    border-radius:999px;
    background:#f0e7d6;
    color:#8a6a35;
    font-size:14px;
}
.zk-back-link{ display:inline-block; margin-bottom:10px; color:#8a6a35 !important; font-weight:700; text-decoration:none !important; font-size:15px; }
.zk-back-link:hover{ text-decoration:underline !important; }

.zk-cart-notice{
    margin:0 0 18px;
    padding:12px 16px;
    border-radius:12px;
    background:#fff7e6;
    border:1px solid #f3d9a4;
    color:#7a5a1c;
    font-size:14.5px;
}
.zk-cart-notice ul{ margin:6px 0 0; padding-left:18px; }
.zk-cart-notice-ok{ background:#ecfdf5; border-color:#a7f3d0; color:#065f46; }

.zk-cart-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr) 360px;
    gap:24px;
    align-items:start;
}
.zk-card{
    background:#fff;
    border:1px solid #efe9dc;
    border-radius:16px;
    box-shadow:0 2px 10px rgba(17,6,66,.04);
}
.zk-cart-page .zk-cart-lines{ padding:4px 24px; transition:opacity .15s ease; }
.zk-cart-page.is-busy .zk-cart-lines{ opacity:.55; pointer-events:none; }
.zk-cart-page .zk-cart-lines .zk-ci{ grid-template-columns:96px minmax(0,1fr); gap:18px; padding:20px 0; }
.zk-cart-page .zk-cart-lines .zk-ci-img{ width:96px; height:96px; border-radius:12px; }
.zk-cart-page .zk-cart-lines .zk-ci-name{ font-size:17px; }
.zk-cart-page .zk-cart-lines .zk-ci-total{ font-size:17px; }

.zk-summary{ padding:24px; position:sticky; top:100px; }
.zk-summary h2{ margin:0 0 16px; font-family:"Lato", sans-serif; font-size:20px; font-weight:700; color:#110642; letter-spacing:0; }
.zk-summary-row{ display:flex; justify-content:space-between; gap:12px; padding:8px 0; font-size:15px; color:#444; }
.zk-summary-row span:last-child{ text-align:right; color:#777; }
.zk-summary-row.is-total{ margin-top:8px; padding-top:14px; border-top:1px solid #efe9dc; font-size:18px; font-weight:700; color:#110642; }
.zk-summary-row.is-total span:last-child{ color:#110642; }
.zk-summary .zk-cart-checkout{
    display:flex; align-items:center; justify-content:space-between; gap:10px;
    width:100%; min-height:54px; margin-top:18px; padding:0 20px;
    border-radius:12px; background:#110642; color:#fff !important;
    font-size:16px; font-weight:700; text-decoration:none !important;
    transition:background .2s ease;
}
.zk-summary .zk-cart-checkout:hover{ background:#c99c59; }
.zk-summary .zk-cart-checkout[aria-disabled="true"]{ opacity:.45; pointer-events:none; }
.zk-summary .zk-continue{ display:block; margin-top:12px; text-align:center; color:#8a6a35 !important; font-weight:700; font-size:14.5px; text-decoration:none !important; }
.zk-summary .zk-continue:hover{ text-decoration:underline !important; }
.zk-secure{ display:flex; align-items:center; justify-content:center; gap:8px; margin:16px 0 0; font-size:13px; color:#888; }
.zk-cart-page.is-empty .zk-summary{ display:none; }
.zk-cart-page.is-empty .zk-cart-grid{ grid-template-columns:minmax(0,1fr); }

@media (max-width:991.98px){
    .zk-cart-grid{ grid-template-columns:minmax(0,1fr); }
    .zk-summary{ position:static; }
}
@media (max-width:575.98px){
    .zk-cart-page{ padding:96px 0 48px; }
    .zk-cart-page .zk-wrap{ padding:0 14px; }
    .zk-cart-page-head h1{ font-size:26px; }
    .zk-cart-page .zk-cart-lines{ padding:4px 16px; }
    .zk-cart-page .zk-cart-lines .zk-ci{ grid-template-columns:72px minmax(0,1fr); gap:12px; padding:16px 0; }
    .zk-cart-page .zk-cart-lines .zk-ci-img{ width:72px; height:72px; }
    .zk-cart-page .zk-cart-lines .zk-ci-name{ font-size:15.5px; }
    .zk-summary{ padding:20px 16px; }
}

/* Footer newsletter: the 320px minimum on the email box (styles.css) pushed the
   Subscribe button off phone screens. */
@media (max-width:575.98px){
    .newsletter-input-group{ padding:0 16px; gap:10px; }
    .newsletter-input-group input{ min-width:0; flex:1 1 160px; width:auto; }
    .newsletter-input-group button{ flex:0 0 auto; width:auto !important; }
}
