/* KUKiDU Order Page — Styles */
:root {
    --red: #D42027;
    --red-light: #fef2f2;
    --red-dark: #b91c1c;
    --yellow: #FFC107;
    --green: #22c55e;
    --green-light: #f0fdf4;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --radius: 16px;
    --radius-sm: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
button, input, select, textarea { font-family: inherit; }

body {
    font-family: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body { font-family: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif; }

/* ===== HEADER ===== */
.header {
    background: white;
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.header-inner {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-logo { height: 36px; }
.header-right { display: flex; align-items: center; gap: 8px; }
.lang-btn {
    border: none;
    background: var(--gray-100);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    transition: all 0.2s;
}
.lang-btn.active {
    background: var(--red);
    color: white;
}

/* ===== CLOSED BANNER ===== */
.closed-banner {
    max-width: 600px;
    margin: 16px auto;
    padding: 16px 20px;
    background: var(--red-light);
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    text-align: center;
    display: none;
}
.closed-banner.show { display: block; }
.closed-banner h3 {
    color: var(--red);
    font-size: 16px;
    margin-bottom: 4px;
}
.closed-banner p {
    color: var(--gray-600);
    font-size: 13px;
}

/* ===== LOYALTY HERO BANNER (Menu Page) ===== */
.loyalty-hero {
    max-width: 600px;
    margin: 12px auto 0;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: none;
}
.loyalty-hero.show { display: block; }
.loyalty-hero::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.15) 0%, transparent 70%);
    animation: heroShimmer 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes heroShimmer {
    0%, 100% { transform: translateX(-30%) rotate(0deg); }
    50% { transform: translateX(30%) rotate(5deg); }
}
.loyalty-hero--new {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b33;
}
.loyalty-hero--silver {
    background: linear-gradient(135deg, #f0fdf4, #bbf7d0);
    border: 1px solid #22c55e33;
}
.loyalty-hero--vip {
    background: linear-gradient(135deg, #fef3c7, #f59e0b);
    border: 1px solid #d97706;
}
.loyalty-hero__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: relative;
    z-index: 1;
}
.loyalty-hero__icon { font-size: 24px; }
.loyalty-hero__text {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}
.loyalty-hero--new .loyalty-hero__text { color: #92400e; }
.loyalty-hero--silver .loyalty-hero__text { color: #166534; }
.loyalty-hero--vip .loyalty-hero__text { color: #78350f; }
.loyalty-hero__arrow {
    font-size: 16px;
    opacity: 0.5;
    transition: transform 0.2s;
}
[dir="rtl"] .loyalty-hero__arrow { transform: scaleX(-1); }
.loyalty-hero:active .loyalty-hero__arrow { transform: translateX(3px); }
[dir="rtl"] .loyalty-hero:active .loyalty-hero__arrow { transform: scaleX(-1) translateX(3px); }

/* Progress bar inside hero */
.loyalty-hero__progress {
    margin-top: 10px;
    position: relative;
    z-index: 1;
}
.loyalty-hero__track {
    height: 8px;
    background: rgba(255,255,255,0.5);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}
.loyalty-hero__fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}
.loyalty-hero--new .loyalty-hero__fill { background: linear-gradient(90deg, #f59e0b, #eab308); }
.loyalty-hero--silver .loyalty-hero__fill { background: linear-gradient(90deg, #22c55e, #16a34a); }
.loyalty-hero--vip .loyalty-hero__fill { background: linear-gradient(90deg, #f59e0b, #d97706); }
.loyalty-hero__fill::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 20px; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
    border-radius: 4px;
    animation: barGlow 1.5s ease-in-out infinite;
}
@keyframes barGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}
.loyalty-hero__count {
    font-size: 11px;
    text-align: right;
    margin-top: 4px;
    font-weight: 700;
    opacity: 0.7;
}
[dir="rtl"] .loyalty-hero__count { text-align: left; }

/* ===== STAMP CARD (Checkout Modal) ===== */
.stamp-card {
    margin-top: 12px;
    padding: 16px;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    animation: stampCardIn 0.4s ease;
}
@keyframes stampCardIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.stamp-card--new {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1.5px solid #fde68a;
}
.stamp-card--silver {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1.5px solid #bbf7d0;
}
.stamp-card--vip {
    background: linear-gradient(135deg, #fffbeb, #fde68a);
    border: 1.5px solid #f59e0b;
}
.stamp-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.stamp-card__brand {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.6;
}
.stamp-card__tier {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}
.stamp-card--new .stamp-card__tier { background: #fde68a; color: #92400e; }
.stamp-card--silver .stamp-card__tier { background: #bbf7d0; color: #166534; }
.stamp-card--vip .stamp-card__tier { background: #f59e0b; color: #78350f; }

/* Stamps grid */
.stamp-card__stamps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.stamp {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
}
.stamp--filled {
    background: var(--red);
    color: white;
    box-shadow: 0 2px 6px rgba(212,32,39,0.3);
    animation: stampPop 0.3s ease;
}
.stamp--empty {
    background: rgba(255,255,255,0.6);
    border: 2px dashed rgba(0,0,0,0.12);
    color: transparent;
}
.stamp--next {
    background: rgba(255,255,255,0.6);
    border: 2px dashed var(--red);
    color: var(--red);
    animation: stampPulse 2s ease-in-out infinite;
}
@keyframes stampPop {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
@keyframes stampPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.08); opacity: 1; }
}

/* Stamp card progress text */
.stamp-card__info {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
}
.stamp-card--new .stamp-card__info { color: #92400e; }
.stamp-card--silver .stamp-card__info { color: #166534; }
.stamp-card--vip .stamp-card__info { color: #78350f; }

.stamp-card__streak {
    margin-top: 8px;
    font-size: 12px;
    text-align: center;
    padding: 6px 12px;
    background: rgba(255,255,255,0.5);
    border-radius: 20px;
    display: inline-block;
}

/* ===== CONFETTI ===== */
.confetti-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}
.confetti-piece {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 10px;
    opacity: 0;
    will-change: transform, opacity;
    animation: confettiFall 3s ease-out forwards;
}
.confetti-piece:nth-child(odd) { border-radius: 50%; }
.confetti-piece:nth-child(even) { border-radius: 2px; }
@keyframes confettiFall {
    0% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
    80% { opacity: 1; }
    100% { opacity: 0; transform: translateY(100vh) rotate(720deg) scale(0.3); }
}

/* ===== GOLDEN GLOW ===== */
.glow-gold {
    animation: glowPulse 1.5s ease-in-out;
}
@keyframes glowPulse {
    0% { box-shadow: 0 0 0 0 rgba(245,158,11,0); }
    30% { box-shadow: 0 0 20px 8px rgba(245,158,11,0.4); }
    100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); }
}

/* ===== TIER UP CELEBRATION (in confirm screen) ===== */
.tier-up-card {
    margin-top: 16px;
    padding: 18px;
    border-radius: 16px;
    text-align: center;
    animation: tierCardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}
@keyframes tierCardIn {
    from { transform: scale(0.6) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}
.tier-up-card--silver {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
}
.tier-up-card--vip {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}
.tier-up-card__icon {
    font-size: 36px;
    margin-bottom: 8px;
    animation: tierIconBounce 0.6s ease 0.3s both;
}
@keyframes tierIconBounce {
    0% { transform: scale(0) rotate(-15deg); }
    60% { transform: scale(1.3) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}
.tier-up-card__title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
}
.tier-up-card--silver .tier-up-card__title { color: #166534; }
.tier-up-card--vip .tier-up-card__title { color: #92400e; }
.tier-up-card__desc {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.8;
}
.tier-up-card__stamps {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 12px 0 8px;
}
.tier-up-card__stamps .stamp {
    width: 26px;
    height: 26px;
    font-size: 11px;
}
.tier-up-card__next {
    font-size: 12px;
    margin-top: 8px;
    font-weight: 600;
    opacity: 0.7;
}

/* ===== CATEGORY TABS ===== */
.category-tabs {
    background: white;
    position: sticky;
    top: 60px;
    z-index: 90;
    border-bottom: 1px solid var(--gray-200);
}
.tabs-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}
.tabs-inner {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 4px;
    padding: 8px 16px;
    scroll-behavior: smooth;
}
.tabs-inner::-webkit-scrollbar { display: none; }
.tab-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--gray-600);
    transition: all 0.2s;
    opacity: 0;
    pointer-events: none;
}
.tab-arrow.visible { opacity: 1; pointer-events: auto; }
.tab-arrow:active { background: var(--gray-100); }
.tab-arrow-left { left: 4px; }
.tab-arrow-right { right: 4px; }
[dir="rtl"] .tab-arrow-left { left: auto; right: 4px; }
[dir="rtl"] .tab-arrow-right { right: auto; left: 4px; }
.tabs-fade-left, .tabs-fade-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}
.tabs-fade-left { left: 0; background: linear-gradient(to right, white 30%, transparent); }
.tabs-fade-right { right: 0; background: linear-gradient(to left, white 30%, transparent); }
[dir="rtl"] .tabs-fade-left { left: auto; right: 0; background: linear-gradient(to left, white 30%, transparent); }
[dir="rtl"] .tabs-fade-right { right: auto; left: 0; background: linear-gradient(to right, white 30%, transparent); }
.tabs-fade-left.visible, .tabs-fade-right.visible { opacity: 1; }
.tab-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    border: none;
    background: var(--gray-100);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
[dir="rtl"] .tab-btn { font-family: inherit; }
.tab-btn.active {
    background: var(--red);
    color: white;
}

/* ===== MENU ===== */
.menu-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 120px;
    min-height: 60vh;
}
.category-section {
    margin-bottom: 24px;
}
.category-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 12px;
    padding: 4px 0;
}

/* ===== MENU ITEM ===== */
.menu-item {
    background: white;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    transition: all 0.2s;
}
.menu-item:active { transform: scale(0.98); }
.menu-item.unavailable {
    opacity: 0.5;
    pointer-events: none;
}
.item-info { flex: 1; min-width: 0; }
.item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}
.item-desc {
    font-size: 12px;
    color: var(--gray-400);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--red);
    margin-top: 4px;
}
.item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--red);
    background: white;
    color: var(--red);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.qty-btn:active {
    background: var(--red);
    color: white;
}
.qty-btn.add {
    background: var(--red);
    color: white;
    border-color: var(--red);
}
.qty-btn.add:active { background: var(--red-dark); }
.qty-display {
    font-size: 16px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}
.add-first-btn {
    background: var(--red);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.add-first-btn:active { background: var(--red-dark); }
.item-image {
    width: 56px; height: 56px; border-radius: 8px;
    object-fit: cover; flex-shrink: 0;
}

/* ===== CART BAR ===== */
.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.cart-bar.show { transform: translateY(0); }
.cart-bar-inner {
    max-width: 600px;
    margin: 0 auto;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
}
.cart-btn {
    width: 100%;
    background: var(--red);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -2px 20px rgba(212,32,39,0.3);
    transition: all 0.15s;
}
.cart-btn:active { background: var(--red-dark); }
.cart-count {
    background: white;
    color: var(--red);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

/* ===== CHECKOUT MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: none;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-overlay.show { display: flex; }
.modal {
    background: white;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px 20px;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.modal-handle {
    width: 40px;
    height: 4px;
    background: var(--gray-300);
    border-radius: 2px;
    margin: 0 auto 20px;
}
.modal h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

/* Cart items in modal */
.cart-items { margin-bottom: 20px; }
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}
.cart-item-name { font-size: 14px; font-weight: 500; }
.cart-item-qty { color: var(--gray-400); font-size: 13px; }
.cart-item-price { font-weight: 700; color: var(--red); }
.cart-total {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    font-size: 18px;
    font-weight: 700;
    border-top: 2px solid var(--gray-200);
}

/* Form fields */
.form-group { margin-bottom: 16px; }
.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 8px;
    display: block;
}
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--red); }

/* Time & type buttons */
.option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.option-btn {
    flex: 1;
    min-width: 70px;
    padding: 10px 8px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: white;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}
.option-btn.selected {
    border-color: var(--red);
    background: var(--red-light);
    color: var(--red);
}
.option-btn .option-icon { font-size: 20px; display: block; margin-bottom: 2px; }

/* Submit button */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    transition: all 0.15s;
}
.submit-btn:active { background: #1da851; }
.submit-btn svg { width: 22px; height: 22px; fill: white; }

/* ===== LOYALTY CODE MODAL ===== */
.loyalty-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}
.loyalty-modal.show { display: flex; }
.loyalty-card {
    background: white;
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    max-width: 360px;
    width: 100%;
    animation: popIn 0.3s ease;
}
@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.loyalty-emoji { font-size: 48px; margin-bottom: 12px; }
.loyalty-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}
.loyalty-desc {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 20px;
}
.loyalty-code-display {
    background: var(--yellow);
    color: var(--gray-900);
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 2px;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-family: inherit;
}
.loyalty-note {
    font-size: 12px;
    color: var(--gray-400);
    margin-bottom: 20px;
}
.loyalty-close-btn {
    background: var(--red);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* ===== LOADING ===== */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== ADD-ONS MODAL ===== */
.addons-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 250;
    display: none;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.addons-overlay.show { display: flex; }
.addons-modal {
    background: white;
    border-radius: 24px 24px 0 0;
    width: 100%; max-width: 600px;
    max-height: 75vh; overflow-y: auto;
    padding: 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    animation: slideUp 0.3s ease;
}
.addons-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px;
}
.addons-header h3 { font-size: 17px; font-weight: 700; }
.addons-close {
    width: 30px; height: 30px; border-radius: 50%;
    border: none; background: var(--gray-100);
    font-size: 16px; cursor: pointer; color: var(--gray-500);
}
.addon-group-title {
    font-size: 13px; font-weight: 700; color: var(--gray-500);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin: 12px 0 8px; padding-bottom: 4px;
    border-bottom: 1px solid var(--gray-100);
}
.addon-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--gray-50);
}
.addon-info { flex: 1; }
.addon-name { font-size: 14px; font-weight: 500; }
.addon-price { font-size: 12px; color: var(--gray-400); }
.addon-toggle {
    display: flex; align-items: center; gap: 6px;
}
.addon-qty-btn {
    width: 28px; height: 28px; border-radius: 50%;
    border: 1.5px solid var(--red); background: white;
    color: var(--red); font-size: 16px; font-weight: 700;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.addon-qty-btn.add { background: var(--red); color: white; }
.addon-qty { font-size: 14px; font-weight: 700; min-width: 16px; text-align: center; }
.addons-done-btn {
    width: 100%; margin-top: 16px; padding: 14px;
    background: var(--red); color: white; border: none;
    border-radius: 14px; font-size: 15px; font-weight: 700;
    cursor: pointer;
}

/* ===== RTL ===== */
[dir="rtl"] .item-name,
[dir="rtl"] .item-desc,
[dir="rtl"] .category-title,
[dir="rtl"] .form-label,
[dir="rtl"] .addon-group-title,
[dir="rtl"] .addons-header h3,
[dir="rtl"] .modal h2 { text-align: right; }

/* ===== SEARCH BAR ===== */
.search-bar {
    max-width: 600px; margin: 0 auto; padding: 8px 16px 0;
}
.search-input {
    width: 100%; padding: 10px 16px 10px 38px; border: 1.5px solid var(--gray-200);
    border-radius: 12px; font-size: 14px; background: white;
    outline: none; font-family: inherit;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%239ca3af' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: 10px center; background-size: 18px;
}
[dir="rtl"] .search-input { padding: 10px 38px 10px 16px; background-position: calc(100% - 10px) center; }
.search-input:focus { border-color: var(--red); }

/* ===== CONFIRMATION SCREEN ===== */
.confirm-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.6); z-index:999; display:none; align-items:center; justify-content:center; padding:20px; }
.confirm-overlay.show { display:flex; }
.confirm-card { background:white; border-radius:20px; padding:32px 24px; text-align:center; max-width:380px; width:100%; animation:popIn 0.4s ease; }
.confirm-check { width:64px; height:64px; background:var(--green); border-radius:50%; display:flex; align-items:center; justify-content:center; margin:0 auto 16px; font-size:32px; animation:checkBounce 0.6s ease 0.2s; }
@keyframes checkBounce { 0%{transform:scale(0)} 50%{transform:scale(1.2)} 100%{transform:scale(1)} }
.confirm-title { font-size:20px; font-weight:700; margin-bottom:4px; }
.confirm-sub { font-size:13px; color:var(--gray-400); margin-bottom:16px; }
.confirm-order-num { font-size:32px; font-weight:900; color:var(--red); margin-bottom:4px; }
.confirm-time { font-size:14px; color:var(--gray-500); margin-bottom:20px; }
.confirm-close { width:100%; padding:14px; background:var(--red); color:white; border:none; border-radius:12px; font-size:15px; font-weight:700; cursor:pointer; }
