/* ===== NAVBAR CART BUTTON ===== */
.cart-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    color: #c8a96e;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-bottom-color 0.3s;
    white-space: nowrap;
}
.cart-nav-btn:hover {
    color: #b8945a;
    border-bottom-color: #c8a96e;
}
.cart-nav-badge {
    background: #e74c3c;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 50px;
    vertical-align: middle;
    line-height: 1;
}

/* ===== FLOATING CART BUTTON (mobile fallback) ===== */
.cart-float-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 998;
    background: linear-gradient(135deg, #c8a96e, #b8945a);
    color: #1a1a1a;
    border: none;
    border-radius: 50px;
    padding: 13px 22px;
    font-size: 1.1rem;
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(200,169,110,0.45);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}
.cart-float-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(200,169,110,0.6);
}
.cart-float-badge {
    background: #e74c3c;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 50px;
    vertical-align: middle;
}

/* ===== CART DRAWER ===== */
.cart-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    backdrop-filter: blur(3px);
}
.cart-drawer-overlay.active { display: block; }

.cart-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 360px;
    max-width: 100vw;
    height: 100%;
    background: #222;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    border-left: 2px solid #c8a96e;
    box-shadow: 4px 0 40px rgba(0,0,0,0.6);
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 15px;
    border-bottom: 2px solid #c8a96e;
    flex-shrink: 0;
}
.cart-drawer-header h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #c8a96e;
    margin: 0;
}
.cart-drawer-close {
    background: #3a3a3a;
    color: #fff;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-drawer-close:hover { background: #e74c3c; }

.cart-drawer .cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
}
.cart-drawer .cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px 4px;
    font-size: 0.9rem;
    color: #aaa;
    flex-shrink: 0;
}
.cart-drawer .cart-discount-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 20px 4px;
    font-size: 0.9rem;
    color: #27ae60;
    font-weight: 700;
    flex-shrink: 0;
}
.cart-drawer .cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    border-top: 2px solid #c8a96e;
    flex-shrink: 0;
}
.cart-drawer #totalAmount { color: #c8a96e; }
.cart-drawer #cartActions {
    padding: 10px 20px 20px;
    flex-shrink: 0;
}

/* ===== PROMO CODE ===== */
.promo-section {
    padding: 10px 20px 6px;
    flex-shrink: 0;
    border-top: 1px dashed #3a3a3a;
}
.promo-input-row {
    display: flex;
    gap: 8px;
}
.promo-input-row input {
    flex: 1;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #1a1a1a;
    color: #f0e6d3;
    font-size: 0.9rem;
    font-family: 'Cairo', sans-serif;
    text-transform: uppercase;
}
.promo-input-row input::placeholder { color: #666; text-transform: none; }
.promo-input-row input:focus { outline: none; border-color: #c8a96e; }
.promo-apply-btn {
    padding: 9px 16px;
    background: #c8a96e;
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: background 0.2s;
    white-space: nowrap;
}
.promo-apply-btn:hover { background: #d4b97e; }
.promo-result { min-height: 22px; padding: 5px 0 2px; font-size: 0.83rem; }
.promo-success { color: #27ae60; font-weight: 700; }
.promo-error { color: #e74c3c; font-weight: 600; }
.promo-checking { color: #aaa; }

/* ===== CART ITEMS ===== */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #3a3a3a;
    gap: 10px;
}
.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}
.cart-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}
.cart-item-sub {
    font-size: 0.85rem;
    color: #c8a96e;
    font-weight: 700;
}
.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-item-qty button {
    background: #3a3a3a;
    color: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Cairo', sans-serif;
}
.cart-item-qty button:hover { background: #c8a96e; color: #1a1a1a; }
.cart-item-qty span {
    font-weight: 700;
    color: #fff;
    min-width: 20px;
    text-align: center;
}

/* ===== CART EMPTY STATE ===== */
.cart-empty-state {
    text-align: center;
    padding: 40px 10px;
    color: #555;
}
.cart-empty-icon { font-size: 3.5rem; margin-bottom: 10px; }
.cart-empty-state p { color: #666; font-size: 0.95rem; }
.cart-empty-sub { font-size: 0.82rem !important; color: #444 !important; margin-top: 5px; }

/* ===== CHECKOUT / CLEAR BUTTONS ===== */
.btn-checkout {
    width: 100%;
    background: linear-gradient(135deg, #c8a96e, #b8945a);
    color: #1a1a1a;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(200,169,110,0.3);
}
.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(200,169,110,0.5);
}
.btn-clear {
    width: 100%;
    background: transparent;
    color: #888;
    border: 1px solid #3a3a3a;
    padding: 10px;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-clear:hover { border-color: #e74c3c; color: #e74c3c; }

/* ===== MENU ADD BUTTON ===== */
.menu-add-btn {
    background: #c8a96e;
    color: #1a1a1a;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    font-family: 'Cairo', sans-serif;
    line-height: 1;
}
.menu-add-btn:hover { background: #b8945a; transform: scale(1.12); }

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 50%;
    transform: translateX(50%) translateY(80px);
    background: #2d2d2d;
    border: 1px solid #c8a96e;
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
    opacity: 0;
    pointer-events: none;
}
.toast.show {
    transform: translateX(50%) translateY(0);
    opacity: 1;
}
.toast-icon { font-size: 1.2rem; }

/* ===== MODAL OVERLAY ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }

.modal-box {
    background: #222;
    border-radius: 20px;
    padding: 30px;
    max-width: 460px;
    width: 100%;
    border: 1px solid #3a3a3a;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #c8a96e;
    text-align: center;
    margin-bottom: 25px;
}

/* ===== DELIVERY OPTIONS ===== */
.delivery-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}
.delivery-btn {
    background: #2d2d2d;
    border: 2px solid #3a3a3a;
    border-radius: 14px;
    padding: 20px 15px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-family: 'Cairo', sans-serif;
}
.delivery-btn:hover {
    border-color: #c8a96e;
    background: #333;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(200,169,110,0.2);
}
.delivery-icon { font-size: 2.5rem; }
.delivery-label { font-size: 1.1rem; font-weight: 800; color: #fff; }
.delivery-sub { font-size: 0.8rem; color: #888; }

/* ===== ORDER SUMMARY IN MODAL ===== */
.order-summary {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #3a3a3a;
}
.summary-items { margin-bottom: 10px; }
.summary-row {
    display: flex;
    justify-content: space-between;
    color: #ccc;
    font-size: 0.88rem;
    padding: 4px 0;
    border-bottom: 1px solid #2d2d2d;
}
.summary-total {
    display: flex;
    justify-content: space-between;
    color: #c8a96e;
    font-weight: 800;
    font-size: 1rem;
    padding-top: 10px;
}

/* ===== CUSTOMER FORM ===== */
.customer-form { margin: 15px 0; }
.customer-form input,
.customer-form textarea {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 10px 12px;
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 10px;
    direction: rtl;
    transition: border 0.3s;
    box-sizing: border-box;
}
.customer-form input:focus,
.customer-form textarea:focus { outline: none; border-color: #c8a96e; }
.customer-form input::placeholder,
.customer-form textarea::placeholder { color: #666; }

/* ===== WHATSAPP BUTTON ===== */
.btn-whatsapp {
    width: 100%;
    background: #25d366;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.3s;
}
.btn-whatsapp:hover {
    background: #1da851;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(37,211,102,0.4);
}

/* ===== PAY ONLINE BUTTON ===== */
.btn-pay-online {
    width: 100%;
    background: #1a3d6b;
    color: #fff;
    border: 1px solid #2a5ea8;
    padding: 13px;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.3s;
}
.btn-pay-online:hover {
    background: #1e4d8c;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(30,77,140,0.4);
}
.btn-pay-online:disabled {
    background: #2a2a2a;
    border-color: #444;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

/* ===== MODAL CLOSE ===== */
.modal-close {
    width: 100%;
    background: transparent;
    color: #888;
    border: 1px solid #3a3a3a;
    padding: 10px;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.3s;
}
.modal-close:hover { border-color: #c8a96e; color: #c8a96e; }

/* ===== CONFIRM SCREEN ===== */
.confirm-box { text-align: center; }
.confirm-animation {
    font-size: 4rem;
    margin-bottom: 10px;
    animation: bounce 0.8s ease infinite alternate;
}
@keyframes bounce {
    from { transform: translateY(0); }
    to   { transform: translateY(-12px); }
}
.confirm-title { font-size: 1.6rem; font-weight: 900; color: #c8a96e; margin-bottom: 10px; }
.confirm-msg { font-size: 1.1rem; color: #fff; margin-bottom: 8px; }
.confirm-sub { font-size: 0.9rem; color: #888; margin-bottom: 20px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    /* Drawer يملأ الشاشة كاملة على الموبايل */
    .cart-drawer { width: 100vw; border-radius: 0; }
    .cart-float-btn { bottom: 20px; left: 12px; padding: 11px 16px; font-size: 0.95rem; }

    /* Modal يملأ الشاشة على الموبايل */
    .modal-overlay { padding: 0; align-items: flex-end; }
    .modal-box {
        border-radius: 20px 20px 0 0;
        max-height: 92vh;
        padding: 24px 18px;
    }
    .delivery-options { grid-template-columns: 1fr 1fr; gap: 10px; }
    .delivery-btn { padding: 16px 10px; }
    .delivery-icon { font-size: 2rem; }
    .delivery-label { font-size: 1rem; }

    /* Toast في الوسط */
    .toast { font-size: 0.88rem; padding: 10px 18px; max-width: 90vw; }

    /* Cart navbar icon */
    .cart-nav-btn { padding: 5px 10px; font-size: 0.85rem; }
}

/* ===== AREA SELECTOR & DELIVERY FEE ===== */
#areaSelectRow {
    margin-bottom: 10px;
}
#custArea {
    width: 100%;
    background: #2d2d2d;
    color: #fff;
    border: 1px solid #4a4a4a;
    border-radius: 10px;
    padding: 12px 14px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.92rem;
    margin-bottom: 8px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}
#custArea:focus { border-color: #c8a96e; }
#custArea option { background: #2d2d2d; color: #fff; }
.fee-inline-hint {
    font-size: 0.85rem;
    padding: 6px 10px;
    border-radius: 8px;
    margin-bottom: 4px;
    min-height: 0;
}
.fee-free { color: #27ae60; font-weight: 700; margin-left: 6px; }
.fee-amount { color: #f39c12; font-weight: 700; }
.fee-hint { color: #888; font-size: 0.78rem; margin-right: 8px; }
.delivery-free-row .free-tag { color: #27ae60; font-weight: 800; }
.delivery-fee-row { color: #f39c12; }

/* Summary rows for delivery fee */
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 0.9rem; color: #ccc; }

/* ===== ITEM NOTE INPUT ===== */
.item-note-input {
    width: 100%;
    background: transparent;
    border: none;
    border-top: 1px dashed #3a3a3a;
    color: #aaa;
    font-size: 0.8rem;
    font-family: 'Cairo', sans-serif;
    padding: 6px 4px 2px;
    margin-top: 6px;
    outline: none;
    transition: color 0.2s, border-color 0.2s;
    box-sizing: border-box;
}
.item-note-input::placeholder { color: #555; }
.item-note-input:focus {
    color: #c8a96e;
    border-color: #c8a96e;
}
.summary-item-note {
    color: #888;
    font-size: 0.78rem;
    padding: 1px 8px 4px;
    font-style: italic;
}
