/* ============================================
   JOKER BURGER - SHARED CART STYLES (all pages)
   ============================================ */

/* ---- CART OVERLAY ---- */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.cart-overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* ---- CART PANEL ---- */
.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 430px;
    max-width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 1300;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: -8px 0 40px rgba(0,0,0,0.18);
}
.cart-panel.open {
    transform: translateX(0);
}

/* ---- CART HEADER ---- */
.cart-header {
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: #fff;
}
.cart-back-btn, .cart-clear-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #333;
    transition: background 0.2s;
    flex-shrink: 0;
}
.cart-back-btn:hover, .cart-clear-btn:hover {
    background: #f5f5f5;
}
.cart-clear-btn svg { stroke: #888; }
.cart-clear-btn:hover svg { stroke: #EB4800; }

.cart-title {
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1;
    text-align: center;
}

/* ---- CART ITEMS LIST ---- */
.cart-items-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* ---- CART EMPTY ---- */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 60px 24px;
    text-align: center;
}
.cart-empty-icon {
    font-size: 48px;
    margin-bottom: 8px;
}
.cart-empty-title {
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #222;
}
.cart-empty-sub {
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    color: #888;
}

/* ---- CART ITEM ROW ---- */
.cart-item-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
}
.cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cart-item-info {
    flex: 1;
    min-width: 0;
}
.cart-item-name {
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    margin-bottom: 2px;
    line-height: 1.3;
}
.cart-item-price-line {
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    color: #EB4800;
    font-weight: 600;
    margin-bottom: 4px;
}
.cart-item-extras {
    font-family: 'Open Sans', sans-serif;
    font-size: 11px;
    color: #888;
    line-height: 1.5;
    margin-bottom: 8px;
}
.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}
.cart-qty-btn {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: #333;
    transition: background 0.15s;
}
.cart-qty-btn:hover {
    background: #f5f5f5;
}
.cart-qty-num {
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    min-width: 24px;
    text-align: center;
    padding: 0 2px;
}
.cart-item-total {
    font-family: 'Oswald', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    align-self: center;
}
.cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
    height: 100%;
}
.cart-item-remove-btn {
    background: none;
    border: none;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.cart-item-remove-btn svg { width: 15px; height: 15px; }
.cart-item-remove-btn:hover {
    background: #fdeaea;
    color: #e23434;
}

/* ---- CART FOOTER ---- */
.cart-footer {
    border-top: 2px solid #f0f0f0;
    padding: 20px;
    flex-shrink: 0;
    background: #fff;
}
.cart-subtotals {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.cart-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    color: #666;
}
.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #111;
    padding: 12px 0;
    border-top: 1px solid #e8e8e8;
    margin-bottom: 16px;
}
.btn-checkout {
    width: 100%;
    background: #EB4800;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 16px 24px;
    font-family: 'Oswald', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
}
.btn-checkout:hover {
    background: #d43f00;
}

/* ---- FLOATING CART BUTTON ---- */
.floating-cart-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #EB4800;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 14px 20px;
    display: none;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    z-index: 900;
    box-shadow: 0 4px 20px rgba(235,72,0,0.4);
    font-family: 'Oswald', sans-serif;
    font-size: 15px;
    font-weight: 700;
    transition: transform 0.2s, box-shadow 0.2s;
}
.floating-cart-btn.visible {
    display: flex;
}
.floating-cart-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 28px rgba(235,72,0,0.5);
}
.floating-cart-count {
    background: #fff;
    color: #EB4800;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}
.floating-cart-total {
    font-size: 15px;
}

/* ---- BOTTOM NAV (mobile) ---- */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e8e8e8;
    z-index: 800;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    height: 60px;
    box-sizing: content-box;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.07);
}
.bottom-nav-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    height: 100%;
    width: 100%;
}
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    color: #aaa;
    transition: color 0.2s;
    flex: 1;
    position: relative;
}
.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: #EB4800;
}
.bottom-nav-item svg {
    stroke: currentColor;
    transition: stroke 0.2s;
    width: 22px;
    height: 22px;
}
.bottom-nav-label {
    font-family: 'Oswald', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    line-height: 1;
}
.bottom-nav-badge {
    position: absolute;
    top: 6px;
    right: calc(50% - 22px);
    background: #EB4800;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    padding: 0 3px;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: 'Oswald', sans-serif;
    box-sizing: border-box;
}
.bottom-nav-badge.has-items {
    display: flex;
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
    }
    /* Push page content above bottom nav */
    body:not(.page-menu) {
        padding-bottom: 72px;
    }
    /* On menu page the main scroll area gets padding instead */
    .page-menu .menu-main {
        padding-bottom: 80px;
    }
    /* Hide floating cart on mobile (bottom nav handles it) */
    .floating-cart-btn {
        display: none !important;
    }
}

/* ================================================
   AFHALEN / BEZORGEN MODALS
   ================================================ */
.jb-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.72);
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.jb-modal-overlay.open {
    display: flex;
}

.jb-modal {
    background: #1a1a1a;
    border-radius: 14px;
    width: 100%;
    max-width: 360px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.7);
    animation: modalSlideUp 0.28s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.jb-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    position: relative;
}

.jb-modal-title {
    font-family: 'Oswald', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #EB4800;
    text-transform: uppercase;
}

.jb-modal-close {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.18s, background 0.18s;
}
.jb-modal-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.jb-modal-body {
    padding: 18px 22px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Afhalen rows */
.jb-modal-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.jb-modal-icon {
    flex-shrink: 0;
    margin-top: 2px;
}
.jb-modal-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.jb-modal-info-main {
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}
.jb-modal-info-sub {
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    color: #aaa;
    line-height: 1.5;
}
.jb-modal-info-label {
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.jb-modal-info-highlight {
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #EB4800;
    letter-spacing: 1px;
}

/* Bezorgen input fields */
.jb-modal-field {
    position: relative;
    display: flex;
    align-items: center;
    background: #2a2a2a;
    border-radius: 9px;
    border: 1px solid rgba(255,255,255,0.08);
    transition: border-color 0.18s;
    overflow: hidden;
}
.jb-modal-field:focus-within {
    border-color: rgba(235,72,0,0.5);
}
.jb-modal-field.field-error {
    border-color: #e03030;
}
.jb-modal-field-icon {
    padding: 0 10px 0 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.jb-modal-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    padding: 13px 14px 13px 0;
    width: 100%;
}
.jb-modal-input::placeholder {
    color: #666;
}
.jb-field-error {
    display: none;
    position: absolute;
    bottom: -18px;
    left: 14px;
    font-size: 11px;
    color: #e03030;
    font-family: 'Open Sans', sans-serif;
}
.jb-field-error.visible {
    display: block;
}

.jb-zone-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(224, 48, 48, 0.12);
    border: 1px solid rgba(224, 48, 48, 0.35);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.jb-zone-alert-icon {
    flex-shrink: 0;
    color: #e03030;
    display: flex;
    align-items: center;
    margin-top: 1px;
}
.jb-zone-alert-text {
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    line-height: 1.45;
    color: #ffb3b3;
}

.jb-modal-footer {
    padding: 0 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.jb-modal-btn {
    display: block;
    width: 100%;
    text-align: center;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: #EB4800;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 15px 20px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.18s, transform 0.15s;
}
.jb-modal-btn:hover {
    background: #cf4000;
    transform: translateY(-1px);
}
.jb-modal-btn:active {
    transform: translateY(0);
}

/* Meta row (bezorgtijd + kosten) */
.jb-modal-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-top: 4px;
}
.jb-modal-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
}
.jb-modal-meta-item svg {
    flex-shrink: 0;
    margin-top: 3px;
}
.jb-modal-meta-item span {
    font-family: 'Open Sans', sans-serif;
    font-size: 11px;
    color: #888;
    line-height: 1.5;
}
.jb-modal-meta-item strong {
    color: #ccc;
    font-weight: 600;
}
