/* Restaurant POS — واجهة الزبون */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: clip;
}

body.rpos-customer-app {
    margin: 0;
    font-family: "Tajawal", sans-serif;
    background: var(--page);
    color: var(--text);
    min-height: 100vh;
    /* ltr للإنجليزية/الفرنسية: يتبع dir على html/body */
    text-align: start;
    /* مساحة كافية تحت الشبكة حتى لا تختفي أسماء/أسعار البطاقات خلف شريط السلة الثابت */
    padding-bottom: calc(8.5rem + env(safe-area-inset-bottom, 0px));
    scroll-padding-bottom: calc(7rem + env(safe-area-inset-bottom, 0px));
}

/* الخط المحقون في menu.php للإنجليزية/الفرنسية (DM Sans) */
html[dir="ltr"] body.rpos-customer-app {
    font-family: "DM Sans", system-ui, -apple-system, sans-serif;
}

.hero {
    position: relative;
    background: linear-gradient(165deg, var(--navy-deep) 0%, var(--navy) 100%);
    color: var(--surface);
    padding: 1rem 1rem 2rem;
    overflow: hidden;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image: radial-gradient(circle at 20% 30%, var(--gold) 1px, transparent 1px);
    background-size: 24px 24px;
}

.hero-decor--tl,
.hero-decor--tr {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 50%;
    pointer-events: none;
}
.hero-decor--tl {
    top: -40px;
    left: -40px;
}
.hero-decor--tr {
    bottom: -30px;
    right: -30px;
}

.hero-container {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

.hero-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.hero-top-row--lang-only {
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

.hero-top-actions {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: min(100%, calc(100% - 4rem));
}

.rpos-lang-switch {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0;
    padding: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.rpos-lang-switch__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    padding: 0.28rem 0.42rem;
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.78);
    border-radius: 999px;
    line-height: 1.15;
    transition: background 0.15s ease, color 0.15s ease;
}

.rpos-lang-switch__btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.rpos-lang-switch__btn:focus {
    outline: none;
}

.rpos-lang-switch__btn:focus-visible {
    color: var(--navy-deep, #141c24);
    background: var(--gold-soft, #e8c547);
    box-shadow: 0 0 0 2px rgba(232, 197, 71, 0.5);
}

.rpos-lang-switch__btn.is-active {
    color: var(--navy-deep, #141c24);
    background: var(--gold-soft, #e8c547);
}

.qr-box {
    width: 56px;
    height: 56px;
    padding: 4px;
    background: var(--surface);
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.qr-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-inner {
    text-align: center;
}

.hero-logo img {
    max-height: 72px;
    border-radius: 12px;
}

.hero-table {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    font-size: 0.9rem;
}

.hero-kicker {
    margin: 0.75rem 0 0;
    font-size: 0.95rem;
    opacity: 0.85;
}

.hero-title {
    margin: 0.35rem 0 0;
    font-size: clamp(1.35rem, 4vw, 1.85rem);
    font-weight: 800;
}

.categories-wrap {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--page);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
}

.categories-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 0.75rem;
}

.categories {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
}

.cat-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--cat-nav-text, var(--text));
    font-weight: 700;
    cursor: pointer;
    font-size: 0.88rem;
}

.cat-btn--has-img {
    padding-inline-start: 0.35rem;
}

.cat-btn__img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.cat-btn__label {
    line-height: 1.2;
}

.cat-btn.is-active {
    background: var(--navy);
    color: var(--gold-soft);
    border-color: var(--navy);
}

.shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 0.75rem;
}

/* auto-fill + min(…,100%) يمنع أعمدة ضيقة تسبب شريط تمرير أفقي على الجوال */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(164px, 100%), 1fr));
    gap: 0.75rem;
}

.menu-grid > * {
    min-width: 0;
}

@media (min-width: 600px) {
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
    }
}

@media (min-width: 900px) {
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
    }
}

.product-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    cursor: pointer;
    outline: none;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.product-card:hover {
    border-color: rgba(20, 28, 36, 0.18);
}

.product-card:focus-visible {
    outline: 2px solid var(--gold-soft, #e8c547);
    outline-offset: 2px;
}

.product-card:active {
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
}

.product-card {
    position: relative;
}

.product-card > .product-qty-badge {
    position: absolute;
    top: 0.42rem;
    inset-inline-end: 0.42rem;
    z-index: 3;
}

.product-card--no-image {
    background: linear-gradient(165deg, var(--surface) 0%, color-mix(in srgb, var(--page) 72%, var(--surface)) 100%);
    border-color: color-mix(in srgb, var(--border) 88%, var(--gold-soft, #e8c547) 12%);
}

.product-card--no-image:hover {
    border-color: color-mix(in srgb, var(--navy) 22%, var(--gold-soft, #e8c547) 18%);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.product-card__head {
    position: relative;
    height: 4px;
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(90deg, var(--gold-soft, #e8c547) 0%, var(--navy) 100%);
}

.product-card--no-image .product-body {
    padding-top: 0.75rem;
}

.product-card--no-image .product-body h3 {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.product-card--no-image .product-desc {
    -webkit-line-clamp: 3;
}

/* الصورة مطلقة داخل صندوق بنِسبة ثابتة حتى لا يفرض المحتوى (flex min-height:auto) ارتفاعاً من الأبعاد الداخلية */
.product-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--page);
    flex-shrink: 0;
    min-height: 0;
    overflow: hidden;
}

@media (max-width: 479px) {
    .product-img-wrap {
        aspect-ratio: 1 / 1;
    }
}

.product-img-wrap img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
}

/* تحميل صور الأصناف عند الاقتراب + تخفيف تكلفة رسم الأقسام البعيدة */
.rpos-menu-section.rpos-menu-section--progressive {
    content-visibility: auto;
    contain-intrinsic-size: auto 260px;
}
.product-img-wrap.rpos-img--pending {
    background: linear-gradient(110deg, var(--page) 0%, var(--border) 48%, var(--page) 100%);
    background-size: 220% 100%;
    animation: rpos-lazy-shimmer 1.1s ease-in-out infinite;
}
.product-img-wrap.rpos-img--pending .rpos-lazy-product-img {
    opacity: 0;
}
.product-img-wrap.rpos-img--loaded .rpos-lazy-product-img {
    opacity: 1;
    transition: opacity 0.18s ease;
}
.product-img-wrap.rpos-img--loaded {
    animation: none;
}
@keyframes rpos-lazy-shimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}
@media (prefers-reduced-motion: reduce) {
    .product-img-wrap.rpos-img--pending {
        animation: none;
    }
}

/* احتياط للمتصفحات بدون aspect-ratio */
@supports not (aspect-ratio: 1 / 1) {
    .product-img-wrap {
        height: 0;
        padding-bottom: 100%;
    }

    .product-img-wrap img {
        position: absolute;
        inset: 0;
        height: 100%;
    }
}

.product-body {
    padding: 0.65rem 0.75rem;
    flex: 1;
}

.product-body h3 {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.35;
    color: var(--text);
    min-width: 0;
    overflow-wrap: anywhere;
}

.product-desc {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-row {
    margin-top: 0.5rem;
    font-weight: 800;
    color: var(--gold);
}

.currency {
    font-size: 0.8rem;
    font-weight: 600;
}

.product-actions {
    position: relative;
    z-index: 2;
    padding: 0 0.65rem 0.7rem;
    cursor: default;
    flex-shrink: 0;
}

.product-actions .rpos-qty--card {
    width: 100%;
    max-width: 100%;
}

.add-btn {
    width: 100%;
    min-height: 2.5rem;
    padding: 0.55rem 0.65rem;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(145deg, var(--navy-deep) 0%, var(--navy) 100%);
    color: var(--gold-soft);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.14);
    transition:
        transform 0.12s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease;
}

.add-btn:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}

.add-btn:active {
    transform: scale(0.98);
}

.add-btn:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ——— عدّاد الكمية الموحّد (بطاقة منتج + شاشة السلة) ——— */
.rpos-qty {
    display: inline-grid;
    grid-template-columns: 2.85rem minmax(2.15rem, auto) 2.85rem;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    max-width: 12.5rem;
    margin-inline: auto;
    vertical-align: middle;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--navy) 22%, var(--border));
    background: var(--surface);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    isolation: isolate;
    font-variant-numeric: tabular-nums;
    -webkit-tap-highlight-color: transparent;
}

.rpos-qty--card {
    max-width: none;
    grid-template-columns: 2.75rem minmax(2.05rem, 1fr) 2.75rem;
    border-radius: 11px;
}

.rpos-qty--sheet {
    max-width: 10.5rem;
    margin-inline: 0;
}

.rpos-qty__btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 0.12rem;
    min-width: 2.75rem;
    min-height: 2.5rem;
    border: none;
    background: linear-gradient(145deg, var(--navy-deep) 0%, var(--navy) 100%);
    color: var(--gold-soft);
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
    transition:
        background 0.18s ease,
        color 0.15s ease,
        transform 0.1s ease,
        box-shadow 0.15s ease;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.rpos-qty__btn:hover {
    background: linear-gradient(
        145deg,
        var(--navy) 0%,
        color-mix(in srgb, var(--navy) 78%, var(--gold) 22%) 100%
    );
    color: #fff;
}

.rpos-qty__btn:active {
    transform: scale(0.94);
    background: linear-gradient(145deg, var(--navy-deep) 0%, var(--navy-deep) 100%);
}

.rpos-qty__btn:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--gold, #c9a227);
    z-index: 1;
}

.rpos-qty__btn:disabled,
.rpos-qty__btn[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

.rpos-qty__ico {
    display: block;
    font-size: 1.28rem;
    font-weight: 800;
    line-height: 1;
    color: inherit;
    pointer-events: none;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.rpos-qty--sheet .rpos-qty__ico {
    font-size: 1.2rem;
}

.rpos-qty__val {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--navy-deep, #1a2b3d);
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--gold-soft) 48%, var(--surface)),
        color-mix(in srgb, var(--gold) 26%, var(--surface))
    );
    border-inline: 1px solid color-mix(in srgb, var(--gold) 35%, var(--border));
}

.rpos-qty--sheet .rpos-qty__val {
    font-size: 1.02rem;
    min-height: 2.75rem;
}

.rpos-qty--card .rpos-qty__val {
    font-size: 0.92rem;
    min-height: 2.4rem;
}

@media (prefers-reduced-motion: reduce) {
    .rpos-qty__btn {
        transition: none;
    }
}

@media (min-width: 480px) {
    .rpos-qty__btn {
        min-height: 2.65rem;
        min-width: 2.85rem;
    }

    .rpos-qty--card .rpos-qty__btn {
        min-height: 2.5rem;
        min-width: 2.75rem;
    }
}

.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
    padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom));
}

.cart-bar-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.cart-bar__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.cart-meta__title {
    font-weight: 800;
    display: block;
}

.cart-meta__sub {
    font-size: 0.85rem;
    color: var(--muted);
}

.cart-total-line {
    font-weight: 700;
}

.total-num {
    color: var(--gold);
    font-size: 1.15rem;
}

.order-btn {
    width: 100%;
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(145deg, var(--navy-deep) 0%, var(--navy) 100%);
    color: var(--gold-soft);
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-family: inherit;
    box-shadow: 0 6px 22px rgba(20, 28, 36, 0.28);
    transition:
        box-shadow 0.18s ease,
        transform 0.12s ease,
        border-color 0.18s ease;
}

.order-btn:hover:not(:disabled) {
    box-shadow: 0 8px 28px rgba(20, 28, 36, 0.34);
}

@supports (color: color-mix(in srgb, white, black)) {
    .order-btn {
        border-color: color-mix(in srgb, var(--gold) 34%, transparent);
    }

    .order-btn:hover:not(:disabled) {
        border-color: color-mix(in srgb, var(--gold-soft) 48%, transparent);
        box-shadow:
            0 8px 28px rgba(20, 28, 36, 0.32),
            0 0 0 1px color-mix(in srgb, var(--gold) 16%, transparent);
    }
}

.order-btn:active:not(:disabled) {
    transform: scale(0.99);
}

.order-btn:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.order-btn__ico {
    font-size: 1.05rem;
    opacity: 0.95;
}

.order-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.qr-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 1rem;
}

.qr-modal.show {
    display: flex;
}

.qr-modal-content {
    background: var(--surface);
    border-radius: 20px;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}

/* ——— تأكيد الطلب: لوحة حديثة (شيت سفلي + بطاقات) ——— */
.order-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 210;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    pointer-events: none;
}

.order-modal.show {
    display: flex;
    pointer-events: auto;
}

.order-modal-backdrop {
    position: absolute;
    inset: 0;
    border: none;
    padding: 0;
    margin: 0;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    animation: rpos-backdrop-in 0.22s ease-out;
}

@keyframes rpos-backdrop-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.order-modal-sheet {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: min(92vh, 760px);
    background: var(--surface);
    color: var(--text);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: rpos-sheet-up 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 640px) {
    .order-modal {
        align-items: center;
        padding: 1rem;
    }

    .order-modal-sheet {
        border-radius: 22px;
        max-height: min(88vh, 720px);
        animation-name: rpos-sheet-zoom;
    }
}

@keyframes rpos-sheet-up {
    from {
        transform: translateY(100%);
        opacity: 0.85;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes rpos-sheet-zoom {
    from {
        transform: scale(0.94) translateY(12px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .order-modal-backdrop,
    .order-modal-sheet {
        animation: none;
    }
}

.order-modal-handle {
    flex-shrink: 0;
    width: 40px;
    height: 5px;
    border-radius: 99px;
    background: var(--border);
    margin: 10px auto 6px;
    opacity: 0.85;
}

@media (min-width: 640px) {
    .order-modal-handle {
        display: none;
    }
}

.order-modal-header {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 1.15rem 0.85rem;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 82%, var(--gold) 18%);
}

.order-modal-header__title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: right;
}

.order-modal-header__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--navy) 0%, var(--navy-deep) 100%);
    color: var(--gold-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.order-modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}

.order-modal-sub {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 500;
}

.order-modal-close {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 14px;
    background: var(--page);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.15s ease;
}

.order-modal-close:hover {
    background: rgba(0, 0, 0, 0.06);
}

.order-modal-close:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.order-modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 1.15rem 1.25rem;
    -webkit-overflow-scrolling: touch;
}

/* نسخة مدمجة — أقل تمرير وأقل صناديق */
.order-modal-header--minimal {
    padding: 0.45rem 0.95rem 0.5rem;
    align-items: center;
}

.order-modal-header--minimal .order-modal-header__title-wrap {
    flex: 1;
    align-items: center;
}

.order-modal-header--minimal .order-modal-title {
    font-size: 1.05rem;
}

/* تأكيد الطلب — تخطيط مركزي وصندوق دفع بلون الثيم */
.order-modal-header.order-modal-header--checkout {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 0.35rem;
}

.order-modal-header--checkout .order-modal-header__title-wrap {
    justify-content: center;
    flex: unset;
}

.order-modal-header--checkout .order-modal-title {
    width: 100%;
    text-align: center;
}

.order-modal-header__edge-spacer {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    pointer-events: none;
}

.rpos-checkout-section__title {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 0.03em;
}

.rpos-checkout-cart-block {
    margin-bottom: 0.45rem;
}

.order-modal-body--dense .rpos-segment--active {
    background: var(--surface);
    color: var(--navy);
    box-shadow: none;
    border: 2px solid var(--navy);
}

.order-modal-body--dense .rpos-segment--active .rpos-segment__ico {
    color: var(--gold);
}

@supports (background: color-mix(in srgb, white, black)) {
    .order-modal-body--dense .rpos-segment--active {
        background: color-mix(in srgb, var(--gold) 11%, var(--surface));
    }
}

.rpos-pay-card.rpos-pay-card--checkout {
    margin-bottom: 0.55rem;
    padding: 0.75rem 0.85rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--page);
    box-shadow: none;
}

@supports (background: color-mix(in srgb, white, black)) {
    .rpos-pay-card.rpos-pay-card--checkout {
        border: 1px solid color-mix(in srgb, var(--gold) 38%, var(--border));
        background: color-mix(in srgb, var(--gold) 9%, var(--surface));
    }
}

.rpos-pay-card__checkout-head {
    margin: 0 0 0.35rem;
    font-size: 0.88rem;
    font-weight: 800;
    text-align: center;
    color: var(--navy);
}

.rpos-pay-card__methods-dash {
    margin: 0 0 0.45rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
    color: var(--text);
    line-height: 1.45;
}

.rpos-pay-card--checkout .rpos-pay-card__instructions {
    margin: 0 0 0.55rem;
    font-size: 0.76rem;
    font-weight: 600;
    text-align: center;
    color: var(--muted);
    line-height: 1.5;
}

.rpos-pay-card__account-callout {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    margin: 0 0 0.35rem;
    text-align: center;
}

.rpos-pay-card--checkout .rpos-pay-card__account-row {
    padding: 0.5rem 0.65rem;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.rpos-pay-copy.rpos-pay-copy--text {
    background: transparent;
    color: var(--navy);
    padding: 0.35rem 0.45rem;
    font-weight: 800;
    box-shadow: none;
    gap: 0;
}

.rpos-pay-copy.rpos-pay-copy--text:hover {
    color: var(--gold);
    opacity: 1;
}

.rpos-total-strip--checkout-footer {
    margin-top: 0.55rem;
    margin-bottom: 0;
    padding: 0.75rem 0.15rem 0.2rem;
    border-radius: 0;
    border-top: 1px solid var(--border);
    background: transparent !important;
    color: var(--text);
    box-shadow: none !important;
}

.rpos-total-strip--checkout-footer .rpos-total-strip__label {
    opacity: 1;
    color: var(--muted);
    font-size: 0.82rem;
}

.rpos-total-strip--checkout-footer .rpos-total-strip__value {
    font-size: 1.12rem;
    color: var(--text);
}

.rpos-total-strip--checkout-footer .rpos-total-strip__cur {
    color: var(--gold);
    opacity: 1;
}

.rpos-upload__pick {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.rpos-upload__clip {
    color: var(--navy);
    font-size: 0.95rem;
}

.order-modal-body--dense {
    padding: 0.45rem 0.9rem 0.65rem;
}

.order-modal-body--dense .rpos-segmented {
    margin-bottom: 0.5rem;
    padding: 3px;
    border-radius: 12px;
}

.order-modal-body--dense .rpos-segment {
    padding: 0.48rem 0.35rem;
    font-size: 0.8rem;
    gap: 0.3rem;
    border: 2px solid transparent;
}

.order-modal-body--dense .rpos-cart-lines {
    gap: 0;
    margin-bottom: 0.45rem;
    border: 1px solid var(--border);
    border-radius: 11px;
    overflow: hidden;
    background: var(--surface);
}

.order-modal-body--dense .rpos-cart-lines--empty {
    padding: 0.85rem;
    margin-bottom: 0.45rem;
    border-radius: 11px;
}

.rpos-cart-row--slim {
    padding: 0.42rem 0.5rem;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    gap: 0.35rem 0.45rem;
}

.rpos-cart-row--slim:last-child {
    border-bottom: none;
}

.rpos-cart-row--slim .rpos-cart-row__name {
    font-size: 0.87rem;
    font-weight: 700;
    display: inline;
    margin-inline-end: 0.3rem;
}

.rpos-cart-row--slim .rpos-cart-row__unit {
    display: inline;
    margin-top: 0;
    font-size: 0.74rem;
}

.rpos-cart-row--slim .rpos-cart-row__main {
    line-height: 1.3;
}

.rpos-cart-row--slim .rpos-cart-row__stepper button {
    width: 32px;
    height: 32px;
    font-size: 1rem;
}

.rpos-cart-row--slim .rpos-cart-row__qty {
    min-width: 1.35rem;
    font-size: 0.88rem;
}

.rpos-cart-row--slim .rpos-cart-row__line-total {
    font-size: 0.88rem;
    font-weight: 800;
}

.rpos-total-strip--compact {
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.45rem;
    border-radius: 11px;
}

.rpos-total-strip--compact .rpos-total-strip__value {
    font-size: 1.08rem;
}

.rpos-total-strip--compact .rpos-total-strip__label {
    font-size: 0.78rem;
}

.rpos-pay-card--slim {
    padding: 0.45rem 0.55rem;
    margin-bottom: 0.45rem;
    border-radius: 11px;
}

.rpos-pay-card__methods-line {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    text-align: center;
    margin: 0 0 0.35rem;
    line-height: 1.35;
}

.rpos-pay-card__instructions {
    font-size: 0.68rem;
    color: var(--muted);
    text-align: center;
    margin: 0 0 0.35rem;
    line-height: 1.45;
}

.rpos-pay-card__slim-head {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 0.3rem;
}

.rpos-pay-card--slim .rpos-pay-card__account-row {
    padding: 0.4rem 0.5rem;
}

.rpos-pay-card--slim .rpos-pay-card__num {
    font-size: 1rem;
}

.rpos-modal-fields-stack {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.rpos-field-block--compact {
    margin-bottom: 0 !important;
}

.rpos-field-block__label--inline {
    display: block;
    font-size: 0.78rem;
    margin-bottom: 0.22rem !important;
    font-weight: 700;
}

.rpos-req {
    color: var(--orange, #c45c26);
    font-weight: 800;
    margin-inline-start: 0.15rem;
}

.rpos-input.rpos-input--invalid,
textarea.rpos-input.rpos-input--invalid {
    border-color: #c0392b !important;
    box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.22);
}

.rpos-input--dense {
    padding: 0.5rem 0.65rem;
    font-size: 0.9rem;
    border-radius: 10px;
}

textarea.rpos-input--dense {
    min-height: 3rem;
}

.order-modal-body--dense .rpos-field-hint {
    margin-top: 0.15rem !important;
    font-size: 0.68rem !important;
}

.rpos-upload--dense {
    border-width: 1px;
    border-radius: 10px;
}

.rpos-upload--dense .rpos-upload__inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.55rem;
    gap: 0.25rem;
}

.rpos-upload--dense .rpos-upload__primary {
    font-size: 0.82rem;
    font-weight: 700;
}

.order-modal-footer--minimal {
    padding: 0.5rem 0.95rem calc(0.55rem + env(safe-area-inset-bottom));
    background: var(--surface);
}

.order-modal-footer--minimal .rpos-submit-order {
    padding: 0.72rem 0.85rem;
    font-size: 0.95rem;
    border-radius: 12px;
}

@media (max-width: 380px) {
    .rpos-cart-row--slim {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .rpos-cart-row--slim .rpos-cart-row__line-total {
        justify-self: end;
    }

    .rpos-cart-row--slim .rpos-cart-row__stepper {
        justify-self: stretch;
        justify-content: space-between;
    }
}

.rpos-segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 4px;
    margin-bottom: 1.1rem;
    border-radius: 16px;
    background: var(--page);
    border: 1px solid var(--border);
}

.rpos-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 0.5rem;
    border: none;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--muted);
    transition:
        background 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

.rpos-segment__ico {
    font-size: 1rem;
    opacity: 0.85;
}

.rpos-segment:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.rpos-segment--active {
    background: var(--surface);
    color: var(--navy);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.rpos-segment--active .rpos-segment__ico {
    color: var(--gold);
}

.rpos-modal-section {
    margin-bottom: 1rem;
}

.rpos-modal-section__title {
    margin: 0 0 0.55rem;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.rpos-cart-lines {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.rpos-cart-lines--empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--muted);
    font-weight: 600;
    border-radius: 16px;
    background: var(--page);
    border: 1px dashed var(--border);
}

.rpos-cart-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.65rem 0.75rem;
    align-items: center;
    padding: 0.85rem 0.95rem;
    background: var(--page);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.rpos-cart-row__main {
    min-width: 0;
    text-align: right;
}

.rpos-cart-row__name {
    display: block;
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1.35;
    word-break: break-word;
}

.rpos-cart-row__unit {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
}

.rpos-cart-row__stepper {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
}

.rpos-cart-row__stepper button {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
    transition: background 0.15s ease;
}

.rpos-cart-row__stepper button:hover {
    background: rgba(0, 0, 0, 0.05);
}

.rpos-cart-row__qty {
    min-width: 2rem;
    text-align: center;
    font-weight: 800;
    font-size: 1rem;
}

.rpos-cart-row__line-total {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text);
    white-space: nowrap;
}

.rpos-total-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 100%);
    color: var(--surface);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
}

.rpos-total-strip__label {
    font-size: 0.85rem;
    font-weight: 700;
    opacity: 0.92;
}

.rpos-total-strip__value {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.rpos-total-strip__cur {
    font-size: 0.72em;
    font-weight: 700;
    opacity: 0.85;
    margin-inline-start: 0.15em;
}

.rpos-pay-card {
    margin-bottom: 1rem;
    padding: 1rem 1.05rem;
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: linear-gradient(180deg, #fffbeb 0%, #fef9c3 40%, var(--surface) 100%);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.12);
}

.rpos-pay-card__top {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.85rem;
    text-align: right;
}

.rpos-pay-card__badge {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    font-size: 1.1rem;
}

.rpos-pay-card__title {
    display: block;
    font-size: 0.95rem;
}

.rpos-pay-card__lead {
    margin: 0.15rem 0 0;
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 600;
}

.rpos-pay-card__account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    flex-wrap: wrap;
    padding: 0.65rem 0.85rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.rpos-pay-card__account-row.is-copied {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.28);
}

@supports (color: color-mix(in srgb, white, black)) {
    .rpos-pay-card__account-row.is-copied {
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 38%, transparent);
    }
}

.rpos-pay-card__num {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font: inherit;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    text-align: right;
    padding: 0.25rem 0;
    color: var(--text);
}

.rpos-pay-copy {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    border: none;
    background: var(--navy);
    color: var(--gold-soft);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition:
        transform 0.12s ease,
        opacity 0.12s ease;
}

.rpos-pay-copy:hover {
    opacity: 0.92;
}

.rpos-pay-copy:active {
    transform: scale(0.97);
}

.rpos-pay-card__hint {
    margin: 0.55rem 0 0;
    font-size: 0.76rem;
    color: var(--muted);
    font-weight: 600;
}

.rpos-field-block {
    margin-bottom: 1rem;
}

.rpos-field-block__label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 800;
    font-size: 0.88rem;
    margin-bottom: 0.45rem;
    color: var(--text);
}

.rpos-field-block__label i {
    opacity: 0.55;
    font-size: 0.95rem;
}

.rpos-optional-hint {
    font-weight: 600;
    opacity: 0.65;
    font-size: 0.82rem;
}

.rpos-field-hint {
    margin: 0.45rem 0 0;
    font-size: 0.76rem;
    color: var(--muted);
    font-weight: 600;
}

.rpos-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--surface);
    color: var(--text);
    caret-color: var(--text);
    -webkit-text-fill-color: var(--text);
    pointer-events: auto;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.rpos-input::placeholder {
    color: var(--muted);
    opacity: 1;
}

.rpos-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.22);
}

.rpos-input--textarea {
    min-height: 5rem;
    resize: vertical;
    line-height: 1.45;
}

.rpos-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.rpos-upload {
    display: block;
    cursor: pointer;
    border-radius: 16px;
    border: 2px dashed var(--border);
    background: var(--page);
    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        transform 0.15s ease;
}

.rpos-upload:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.06);
}

.rpos-upload.is-drag {
    border-color: var(--navy);
    background: rgba(212, 175, 55, 0.07);
    transform: scale(1.01);
}

.rpos-upload.has-file {
    border-style: solid;
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.06);
}

@supports (background: color-mix(in srgb, white, black)) {
    .rpos-upload.is-drag {
        background: color-mix(in srgb, var(--gold) 12%, var(--page));
    }

    .rpos-upload.has-file {
        background: color-mix(in srgb, var(--gold) 10%, var(--surface));
    }
}

.rpos-upload__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.35rem 1rem;
    gap: 0.35rem;
}

.rpos-upload__ico {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--muted);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.rpos-upload__primary {
    font-weight: 800;
    font-size: 0.92rem;
}

.rpos-upload__secondary {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
}

.rpos-upload__filename {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--navy);
    word-break: break-all;
    max-width: 100%;
}

body.rpos-modal-open {
    overflow: hidden;
}

.order-modal-footer {
    flex-shrink: 0;
    padding: 0.85rem 1.15rem calc(0.85rem + env(safe-area-inset-bottom));
    border-top: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--surface) 82%, var(--page)) 0%,
        var(--surface) 55%
    );
}

.order-modal-cart-preview {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
    padding: 0.35rem 0;
}

.order-modal-cart-preview__ico-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--page);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--navy);
}

.order-modal-cart-preview__badge {
    position: absolute;
    top: -6px;
    inset-inline-start: -6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: linear-gradient(145deg, var(--gold-soft) 0%, var(--gold) 100%);
    color: var(--navy-deep);
    font-size: 0.72rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(20, 28, 36, 0.18);
}

.order-modal-cart-preview__txt {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--muted);
}

.rpos-submit-order {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(145deg, var(--navy-deep) 0%, var(--navy) 100%);
    color: var(--gold-soft);
    font-family: inherit;
    font-weight: 800;
    font-size: 1.05rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    box-shadow: 0 8px 26px rgba(20, 28, 36, 0.28);
    transition:
        transform 0.12s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.rpos-submit-order:hover {
    box-shadow: 0 10px 30px rgba(20, 28, 36, 0.34);
}

@supports (color: color-mix(in srgb, white, black)) {
    .rpos-submit-order {
        border-color: color-mix(in srgb, var(--gold) 34%, transparent);
    }

    .rpos-submit-order:hover {
        border-color: color-mix(in srgb, var(--gold-soft) 48%, transparent);
        box-shadow:
            0 10px 30px rgba(20, 28, 36, 0.32),
            0 0 0 1px color-mix(in srgb, var(--gold) 16%, transparent);
    }
}

.rpos-submit-order:active {
    transform: scale(0.99);
}

.rpos-submit-order:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

@media (max-width: 380px) {
    .rpos-cart-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .rpos-cart-row__line-total {
        justify-self: end;
    }

    .rpos-cart-row__stepper {
        justify-self: stretch;
        justify-content: space-between;
    }
}

/* حقول قديمة — نفس مظهر rpos-input */
.form-input,
.form-textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin-bottom: 0.65rem;
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--surface);
    color: var(--text);
    caret-color: var(--text);
    -webkit-text-fill-color: var(--text);
    pointer-events: auto;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--muted);
    opacity: 1;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.22);
}

.form-textarea {
    min-height: 4.5rem;
    resize: vertical;
    line-height: 1.45;
}

.rpos-delivery-wrap {
    margin-bottom: 0;
}

.alert-box {
    max-width: 480px;
    margin: 3rem auto;
    padding: 2rem;
    text-align: center;
}

.btn-back {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    background: var(--navy);
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
}

/* شبكة طرق الدفع — مربعات صغيرة متجاوبة */
.rpos-pm-tiles-wrap .rpos-field-block__label {
    display: block;
    margin-bottom: 0.35rem;
}
.rpos-pm-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(4.85rem, 1fr));
    gap: 0.32rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.rpos-pm-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    min-height: 2.5rem;
    margin: 0;
    padding: 0.32rem 0.28rem;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    line-height: 1.15;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
    -webkit-tap-highlight-color: transparent;
}
.rpos-pm-tile:hover {
    border-color: color-mix(in srgb, var(--gold) 55%, var(--border));
    background: color-mix(in srgb, var(--surface) 88%, var(--gold-soft));
}
.rpos-pm-tile:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
.rpos-pm-tile.is-selected {
    border-color: var(--gold);
    background: linear-gradient(165deg, color-mix(in srgb, var(--gold-soft) 35%, var(--surface)), var(--surface));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 40%, transparent), 0 2px 8px rgba(0, 0, 0, 0.08);
    font-weight: 700;
}
.rpos-pm-tile:active:not(.is-selected) {
    transform: scale(0.98);
}
.rpos-pm-tile__ico {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--navy);
    opacity: 0.88;
}
.rpos-pm-tile.is-selected .rpos-pm-tile__ico {
    color: color-mix(in srgb, var(--navy) 70%, var(--gold));
    opacity: 1;
}
.rpos-pm-tile__txt {
    font-size: clamp(0.65rem, 2.6vw, 0.76rem);
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    max-width: 100%;
}
@media (min-width: 400px) {
    .rpos-pm-tiles {
        grid-template-columns: repeat(auto-fill, minmax(5.35rem, 1fr));
        gap: 0.38rem;
    }
    .rpos-pm-tile {
        min-height: 2.65rem;
        padding: 0.38rem 0.32rem;
    }
}

/* رقم التحويل عند اختيار طريقة الدفع — مضغوط ومتجاوب */
.rpos-pm-number-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin: 0.35rem 0 0.65rem;
    padding: 0.4rem 0.55rem;
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-sizing: border-box;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.rpos-pm-number-strip__num {
    flex: 1 1 8rem;
    min-width: 0;
    font-size: clamp(0.78rem, 2.8vw, 0.9rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.35;
    color: var(--text);
}
.break-anywhere {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.rpos-pm-number-strip__copy {
    flex: 0 0 auto;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: var(--navy);
    color: #fff;
}
.rpos-pm-number-strip__copy.is-copied {
    background: var(--green);
}
.rpos-pm-number-strip.is-placeholder {
    border-style: dashed;
    opacity: 0.96;
}
.rpos-pm-number-strip.is-placeholder .rpos-pm-number-strip__num {
    font-weight: 500;
    color: var(--muted, #64748b);
}
.rpos-pm-number-strip__copy:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
@media (max-width: 380px) {
    .rpos-pm-number-strip__copy {
        width: 100%;
        text-align: center;
    }
}

/* ——— منيو الزبون — تصميم الغلاف والسلة (٢٠٢٦) ——— */
.rpos-menu-header {
    background: var(--surface);
}
.rpos-menu-topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.4rem;
    padding: 0.55rem 0.75rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* نوع الطلب: زر واحد + سهم + قائمة منسدلة مضغوطة */
.rpos-order-type-dd {
    position: relative;
    flex-shrink: 1;
    min-width: 0;
    max-width: min(100%, 16rem);
    z-index: 30;
}
.rpos-order-type-dd__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    min-height: 2.35rem;
    padding: 0.22rem 0.5rem 0.22rem 0.45rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--page);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
}
.rpos-order-type-dd__ico {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
    background: var(--navy);
    color: var(--gold-soft);
    font-size: 0.8rem;
}
.rpos-order-type-dd__lbl {
    flex: 1;
    min-width: 0;
    text-align: start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rpos-order-type-dd__chev {
    flex-shrink: 0;
    font-size: 0.62rem;
    color: var(--muted);
    transition: transform 0.2s ease;
}
.rpos-order-type-dd.is-open .rpos-order-type-dd__chev {
    transform: rotate(180deg);
}
.rpos-order-type-dd__list {
    position: absolute;
    top: calc(100% + 5px);
    inset-inline-start: 0;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    min-width: 11.25rem;
    width: max-content;
    max-width: min(18rem, calc(100vw - 1.5rem));
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    z-index: 50;
}
.rpos-order-type-dd__list li {
    margin: 0;
    padding: 0;
}
.rpos-order-type-dd__option {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.45rem;
    padding: 0.48rem 0.5rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    font: inherit;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text);
    cursor: pointer;
    text-align: start;
}
.rpos-order-type-dd__option i {
    width: 1.35rem;
    flex-shrink: 0;
    text-align: center;
    color: var(--muted);
}
.rpos-order-type-dd__option:hover,
.rpos-order-type-dd__option:focus-visible {
    background: var(--page);
    outline: none;
}
.rpos-order-type-dd__option.is-selected {
    background: rgba(232, 197, 71, 0.22);
    color: var(--navy-deep, #141c24);
}
.rpos-order-type-dd__toggle:focus-visible {
    outline: 2px solid var(--gold-soft, #e8c547);
    outline-offset: 2px;
}

.rpos-menu-topbar__start {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    justify-self: start;
}
.rpos-menu-topbar__end {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    min-width: 0;
}
.rpos-menu-topbar__center {
    display: flex;
    justify-content: center;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
}

/* لغة الهيدر: قائمة منسدلة مضغوطة */
.rpos-lang-dd {
    position: relative;
    z-index: 32;
    width: max-content;
    max-width: min(11rem, 42vw);
    margin-inline-start: auto;
}
.rpos-lang-dd__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    width: 100%;
    min-height: 2.35rem;
    padding: 0.2rem 0.45rem 0.2rem 0.42rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--page);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text);
    cursor: pointer;
}
.rpos-lang-dd__lbl {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: start;
}
.rpos-lang-dd__globe-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 8px;
    background: rgba(20, 28, 36, 0.08);
    color: var(--navy-deep, #141c24);
    font-size: 0.78rem;
}
.rpos-lang-dd__chev {
    flex-shrink: 0;
    font-size: 0.55rem;
    color: var(--muted);
    transition: transform 0.2s ease;
}
.rpos-lang-dd.is-open .rpos-lang-dd__chev {
    transform: rotate(180deg);
}
.rpos-lang-dd__list {
    position: absolute;
    top: calc(100% + 5px);
    inset-inline-end: 0;
    inset-inline-start: auto;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    min-width: 8rem;
    width: max-content;
    max-width: min(13rem, calc(100vw - 2rem));
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}
html[dir="rtl"] .rpos-lang-dd__list {
    inset-inline-start: 0;
    inset-inline-end: auto;
}
.rpos-lang-dd__list li {
    margin: 0;
    padding: 0;
}
.rpos-lang-dd__option {
    display: flex;
    width: 100%;
    align-items: center;
    padding: 0.48rem 0.52rem;
    border-radius: 10px;
    font: inherit;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--text);
    text-decoration: none;
    text-align: start;
}
.rpos-lang-dd__option:hover,
.rpos-lang-dd__option:focus-visible {
    background: var(--page);
    outline: none;
}
.rpos-lang-dd__option.is-selected {
    background: rgba(232, 197, 71, 0.25);
    color: var(--navy-deep, #141c24);
}
.rpos-lang-dd__toggle:focus-visible {
    outline: 2px solid var(--gold-soft, #e8c547);
    outline-offset: 2px;
}

/* مبدّل اللغة: الشريط يستخدم قائمة منسدلة (.rpos-lang-dd) */
.rpos-menu-icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--page);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.rpos-menu-icon-btn:active {
    transform: scale(0.98);
}
.rpos-menu-icon-btn--muted {
    color: var(--muted);
}
.rpos-menu-icon-btn.is-active {
    border-color: var(--gold-soft, #e8c547);
    box-shadow: 0 0 0 2px rgba(232, 197, 71, 0.28);
}
.rpos-menu-search-panel {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 0.75rem 0.5rem;
}
.rpos-menu-search-panel__row {
    display: flex;
    align-items: stretch;
    gap: 0.4rem;
}
.rpos-menu-search-panel__row .rpos-menu-search-input {
    flex: 1;
    min-width: 0;
}
.rpos-menu-search-dismiss {
    flex-shrink: 0;
    width: 2.55rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--page);
    color: var(--muted);
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
}
.rpos-menu-search-dismiss:hover {
    background: var(--surface);
    color: var(--text);
}
.rpos-menu-search-dismiss:focus-visible {
    outline: 2px solid var(--gold-soft, #e8c547);
    outline-offset: 1px;
}
.rpos-menu-search-input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 0.95rem;
    background-color: var(--surface);
    color: var(--text);
    caret-color: var(--text);
    -webkit-text-fill-color: var(--text);
    pointer-events: auto;
}

.rpos-menu-search-input::placeholder {
    color: var(--muted);
    opacity: 1;
}

.rpos-menu-search-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}
/* ——— منيو الزبون — غلاف شبيه ببطاقة الملف الشخصي (بانر مستدير + شعار مربع + هوية) ——— */
.rpos-menu-hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.35rem 0.75rem 0;
}
/* بانر بعرض البطاقة، نسبة ثابتة، صورة بملء الإطار (cover) دون تشوه */
.rpos-menu-cover-wrap {
    position: relative;
    width: 100%;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    height: clamp(13rem, 42vw, 21rem);
    background: linear-gradient(145deg, var(--navy-deep), var(--navy));
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}
.rpos-menu-cover__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.rpos-menu-cover__img--placeholder {
    min-height: 100%;
    height: 100%;
    background: linear-gradient(145deg, #1a2430 0%, var(--navy) 100%);
}

/* عدة صور غلاف: شريحة، سحب، نقاط، تلاشِي */
.rpos-menu-cover-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}
.rpos-menu-cover-carousel__slides {
    position: relative;
    width: 100%;
    height: 100%;
}
.rpos-menu-cover-carousel__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 520ms ease;
    z-index: 0;
}
.rpos-menu-cover-carousel__slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
    .rpos-menu-cover-carousel__slide {
        transition: none;
    }
}
.rpos-menu-cover-carousel__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    user-select: none;
    touch-action: pan-y pinch-zoom;
    -webkit-user-drag: none;
}
.rpos-menu-cover-carousel__dots {
    position: absolute;
    left: 50%;
    bottom: 0.5rem;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    max-width: 96%;
}
.rpos-menu-cover-carousel__dot {
    width: 0.5rem;
    height: 0.5rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.18);
}
.rpos-menu-cover-carousel__dot.is-active {
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.15);
}

.rpos-menu-identity {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.65rem 1rem;
    width: 100%;
    margin-top: 0;
    padding-top: 0.55rem;
    padding-bottom: 0.85rem;
    padding-inline: 0.15rem;
    position: relative;
    z-index: 4;
}
/*
 * بروفايل المنيو: مرآة حسب dir.
 * LTR (en/fr): شعار يسار | نص | Ouvert/Open يمين (مثل المواقع الأجنبية).
 * RTL (ar): شعار يمين | نص | بادج يسار.
 */
.rpos-menu-identity__text {
    order: 2;
    flex: 1;
    min-width: 0;
    padding-bottom: 0.15rem;
    text-align: start;
}
.rpos-menu-identity .rpos-open-badge {
    flex-shrink: 0;
}
.rpos-menu-identity__logo {
    flex-shrink: 0;
    margin-top: -2.6rem;
}
html[dir="ltr"] .rpos-menu-identity__logo {
    order: 1;
}
html[dir="ltr"] .rpos-menu-identity .rpos-open-badge {
    order: 3;
}
html[dir="rtl"] .rpos-menu-identity__logo {
    order: 1;
}
html[dir="rtl"] .rpos-menu-identity .rpos-open-badge {
    order: 3;
}
.rpos-menu-identity__text .rpos-menu-intro__name {
    margin: 0;
    font-size: clamp(1.22rem, 4vw, 1.52rem);
    font-weight: 800;
    line-height: 1.2;
}
.rpos-menu-identity__text .rpos-menu-intro__tagline {
    margin: 0.22rem 0 0;
}
.rpos-menu-identity__text .rpos-menu-intro__table {
    margin: 0.4rem 0 0;
}
.rpos-menu-logo-ring {
    width: 4.85rem;
    height: 4.85rem;
    border-radius: 14px;
    background: var(--surface);
    border: 3px solid var(--surface);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.rpos-menu-logo-ring img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rpos-menu-logo-ring__ico {
    font-size: 1.85rem;
}
.rpos-menu-intro__name {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
}
.rpos-menu-intro__tagline {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.45;
}
.rpos-menu-intro__table {
    margin: 0.5rem 0 0;
    font-size: 0.88rem;
    color: var(--muted);
}
.rpos-open-badge {
    flex-shrink: 0;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    background: rgba(46, 180, 120, 0.18);
    color: #1e7a52;
    border: 1px solid transparent;
}
.rpos-open-badge.is-closed {
    background: rgba(185, 28, 28, 0.22);
    color: #991b1b;
    border: 1px solid rgba(185, 28, 28, 0.45);
}
.rpos-open-badge.is-saas-paused {
    background: rgba(180, 83, 9, 0.2);
    color: #9a3412;
    border: 1px solid rgba(217, 119, 6, 0.45);
}
.rpos-menu-saas-banner {
    margin: 0 1rem 0.65rem;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.95), rgba(253, 230, 138, 0.75));
    border: 1px solid rgba(217, 119, 6, 0.35);
    color: #78350f;
    font-size: 0.84rem;
    line-height: 1.45;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.rpos-menu-saas-banner strong {
    font-weight: 800;
    font-size: 0.88rem;
}
.rpos-menu-hours-notice {
    margin: 0.35rem 1rem 0;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.35;
}
.rpos-menu-hours-notice--closed {
    background: rgba(220, 38, 38, 0.1);
    color: #991b1b;
    border: 1px solid rgba(220, 38, 38, 0.18);
}
details.rpos-menu-more {
    margin: 0.6rem 1rem 0;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    position: relative;
    z-index: 6;
}
.rpos-menu-more__summary {
    list-style: none;
    cursor: pointer;
    padding: 0.65rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text);
    display: block;
}
.rpos-menu-more__summary::-webkit-details-marker {
    display: none;
}
.rpos-menu-more__summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
}
.rpos-menu-more__summary-chevron {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--muted);
    transition: transform 0.15s ease;
    line-height: 1;
}
details.rpos-menu-more[open] .rpos-menu-more__summary-chevron {
    transform: rotate(-180deg);
}
.rpos-menu-more__body {
    padding: 0 0.85rem 0.85rem;
    border-top: 1px solid var(--border);
}
.rpos-menu-hours-block__title {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin: 0.75rem 0 0.45rem;
}
.rpos-menu-hours-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}
.rpos-menu-hours-table th {
    text-align: start;
    font-weight: 600;
    color: var(--text);
    padding: 0.35rem 0.35rem 0.35rem 0;
    vertical-align: top;
    width: 42%;
}
.rpos-menu-hours-table td {
    padding: 0.35rem 0;
    color: var(--muted);
}
.rpos-social-bar {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}
.rpos-social-bar__label {
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--muted);
    margin-bottom: 0.45rem;
}
.rpos-social-bar__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}
.rpos-social-bar__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    background: var(--page);
    color: var(--text);
    font-size: 1.05rem;
    text-decoration: none;
    border: 1px solid var(--border);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.rpos-social-bar__link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}
.rpos-social-bar__link--fb {
    color: #1877f2;
}
.rpos-social-bar__link--ig {
    color: #e4405f;
}
.rpos-social-bar__link--tk {
    color: var(--text);
}
.rpos-social-bar__link--wa {
    color: #25d366;
}
.rpos-categories-wrap {
    top: 0;
}
.rpos-menu-shell {
    padding-top: 0.5rem;
}
.rpos-menu-section__title {
    margin: 1rem 0 0.65rem;
    font-size: 1.05rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.rpos-menu-section__thumb {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.rpos-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.65rem !important;
}
@media (min-width: 600px) {
    .rpos-menu-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}
.product-qty-badge {
    position: absolute;
    top: 0.42rem;
    inset-inline-end: 0.42rem;
    z-index: 2;
    min-width: 2.1rem;
    height: 1.95rem;
    padding: 0 0.5rem;
    border-radius: 999px;
    background: linear-gradient(145deg, var(--navy-deep, #0f172a) 0%, #1a2332 100%);
    color: var(--gold-soft, #e8d089);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    font-variant-numeric: tabular-nums;
    transition: transform 0.15s ease;
}
.product-qty-badge__x {
    font-weight: 700;
    opacity: 0.85;
}
.rpos-menu-footer-qr {
    max-width: 1100px;
    margin: 2rem auto 1rem;
    padding: 1.5rem 1rem;
    text-align: center;
    border-top: 1px dashed var(--border);
}
.rpos-menu-footer-qr__title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 800;
}
.rpos-menu-footer-qr__actions {
    display: inline-flex;
    align-items: stretch;
    justify-content: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    width: 100%;
}
.rpos-menu-footer-qr__share {
    flex: 0 0 auto;
    min-width: min(8.5rem, 38vw);
    max-width: 10.5rem;
    min-height: 8.75rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.85rem;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-weight: 800;
    font-size: 0.92rem;
    cursor: pointer;
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.08);
}
.rpos-menu-footer-qr__share:focus-visible {
    outline: 2px solid var(--gold-soft, #e8c547);
    outline-offset: 2px;
}
.rpos-menu-footer-qr__share:active {
    transform: scale(0.99);
}
.rpos-menu-footer-qr__share i {
    font-size: 2rem;
    opacity: 0.88;
}
.rpos-menu-footer-qr__share-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    text-wrap: balance;
}
.rpos-menu-footer-qr__btn {
    display: inline-block;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.rpos-menu-footer-qr__btn img {
    display: block;
    width: 140px;
    height: 140px;
    border-radius: 12px;
}
.rpos-menu-footer-qr__hint {
    margin: 0.65rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.cart-bar--modern {
    background: #fff;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}
/* شريط السلة: ترتيب DOM [ملخص] ثم [زر] + صف عادي — ينعكس تلقائياً مع dir (عربي: ملخص يمين، زر يسار) */
.cart-bar-inner--modern {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0;
}
.cart-bar__cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1.1rem;
    border-radius: 14px;
    border: none;
    background: linear-gradient(180deg, #1ba97a 0%, #0d7a59 100%);
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(13, 122, 89, 0.35);
}
.cart-bar__cta:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}
.cart-bar__cta-ico {
    font-size: 1.15rem;
}
.cart-bar__summary {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.25rem;
    margin: 0;
    font: inherit;
    color: inherit;
    text-align: start;
    cursor: pointer;
    border-radius: 12px;
}
.cart-bar__summary:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}
.cart-bar__summary:not(:disabled):active {
    transform: scale(0.99);
}
.cart-bar__bag {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    background: var(--page);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 1.1rem;
}
.cart-bar__summary-text {
    min-width: 0;
}
.cart-bar__items {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
}
.cart-bar__total-line {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
}
.cart-bar__cur {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
    margin-inline-start: 0.2rem;
}

/* شاشة السلة */
.rpos-cart-sheet {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.rpos-cart-sheet.show {
    pointer-events: auto;
    opacity: 1;
    display: flex;
}
.rpos-cart-sheet[hidden] {
    display: none !important;
}
.rpos-cart-sheet__backdrop {
    position: absolute;
    inset: 0;
    border: none;
    padding: 0;
    margin: 0;
    background: rgba(15, 23, 30, 0.45);
    cursor: pointer;
}
.rpos-cart-sheet__panel {
    position: absolute;
    inset: 0;
    margin-inline-start: auto;
    width: min(100%, 28rem);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    max-height: 100%;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
}
html[dir="ltr"] .rpos-cart-sheet__panel {
    margin-inline-start: 0;
    margin-inline-end: auto;
}
.rpos-cart-sheet__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border);
}
.rpos-cart-sheet__back {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    border: none;
    background: var(--page);
    cursor: pointer;
    color: var(--text);
}
.rpos-cart-sheet__title {
    flex: 1;
    margin: 0;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 800;
}
.rpos-cart-sheet__head-spacer {
    width: 2.5rem;
    flex-shrink: 0;
}
.rpos-cart-sheet__body {
    flex: 1;
    overflow: auto;
    padding: 0 0.75rem 0.75rem;
    -webkit-overflow-scrolling: touch;
}
.rpos-cart-sheet__lines {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.rpos-cart-line {
    display: grid;
    grid-template-columns: 3.85rem minmax(0, 1fr);
    gap: 0.7rem;
    align-items: start;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--border);
}

.rpos-cart-line:last-child {
    border-bottom: none;
}

.rpos-cart-line__thumb {
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 11px;
    overflow: hidden;
    background: var(--page);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.rpos-cart-line__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rpos-cart-line__ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.rpos-cart-line__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rpos-cart-line__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.rpos-cart-line__titles {
    flex: 1;
    min-width: 0;
}

.rpos-cart-line__name {
    font-weight: 800;
    font-size: 0.92rem;
    line-height: 1.38;
}

.rpos-cart-line__cat {
    font-weight: 600;
    color: var(--muted);
    font-size: 0.78rem;
}

.rpos-cart-line__panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem 0.65rem;
    padding: 0.58rem 0.65rem;
    border-radius: 12px;
    background: var(--page);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.rpos-cart-line__stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.rpos-cart-line__stat--emph .rpos-cart-line__stat-val {
    color: var(--gold, #c9a227);
    font-size: 1rem;
}

.rpos-cart-line__stat-lbl {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    color: var(--muted);
    line-height: 1.2;
}

.rpos-cart-line__stat-val {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text);
}

.rpos-cart-line__stat-val--ltr {
    white-space: nowrap;
}

.rpos-cart-line__qty-row {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem 0.75rem;
    padding-top: 0.48rem;
    margin-top: 0.08rem;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.rpos-cart-line__qty-lbl {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--muted);
    flex-shrink: 0;
}

.rpos-cart-line__rm {
    flex-shrink: 0;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 10px;
    border: 1px solid transparent;
    background: rgba(0, 0, 0, 0.04);
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition:
        background 0.18s ease,
        color 0.15s ease,
        transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.rpos-cart-line__rm:hover {
    background: rgba(192, 57, 43, 0.1);
    color: #a93226;
}

.rpos-cart-line__rm:active {
    transform: scale(0.95);
}

.rpos-cart-line__rm:focus-visible {
    outline: 2px solid var(--gold, #c9a227);
    outline-offset: 2px;
}

.rpos-cart-line__rm-ico {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
}

@media (max-width: 360px) {
    .rpos-cart-line {
        grid-template-columns: 3.25rem minmax(0, 1fr);
        gap: 0.55rem;
    }

    .rpos-cart-line__panel {
        grid-template-columns: 1fr;
    }

    .rpos-cart-line__qty-row {
        flex-direction: column;
        align-items: stretch;
    }

    .rpos-qty--sheet {
        max-width: none;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rpos-cart-line__rm {
        transition: none;
    }
}
.rpos-cart-sheet__footer {
    padding: 0.75rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.rpos-cart-sheet__footer-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    font-size: 0.95rem;
    font-weight: 700;
}
.rpos-cart-sheet__footer-total strong {
    font-size: 1.1rem;
}
.rpos-cart-sheet__checkout {
    width: 100%;
    padding: 0.85rem;
    border-radius: 12px;
    border: none;
    background: #111;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}

/* ——— قائمة جانبية (معلومات المطعم) ——— */
.rpos-side-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
}
.rpos-side-menu:not([hidden]) {
    pointer-events: auto;
}
.rpos-side-menu__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    cursor: pointer;
}
.rpos-side-menu__panel {
    position: absolute;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    width: min(22rem, 92vw);
    max-width: 100%;
    background: var(--surface);
    box-shadow: 8px 0 32px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    outline: none;
}
html[dir="ltr"] .rpos-side-menu__panel {
    inset-inline-start: auto;
    inset-inline-end: 0;
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
}
.rpos-side-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0.75rem 0.65rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.rpos-side-menu__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    flex: 1;
    text-align: start;
}
.rpos-side-menu__close {
    order: 2;
    width: 2.35rem;
    height: 2.35rem;
    border: none;
    border-radius: 10px;
    background: var(--page);
    color: var(--muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    font-weight: 700;
    flex-shrink: 0;
}
html[dir="ltr"] .rpos-side-menu__close {
    order: 0;
}
.rpos-side-menu__scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.rpos-side-menu__nav {
    padding: 0.35rem 0 0.25rem;
    overflow-x: visible;
}
.rpos-side-menu__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 0.95rem;
    margin: 0;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    text-align: start;
    text-decoration: none;
    cursor: pointer;
}
.rpos-side-menu__row--link {
    box-sizing: border-box;
}
.rpos-side-menu__row:hover {
    background: rgba(0, 0, 0, 0.03);
}
.rpos-side-menu__row:focus-visible {
    outline: 2px solid var(--menu-accent, #c62828);
    outline-offset: -2px;
}
.rpos-side-menu__row-label {
    flex: 1;
    min-width: 0;
}
.rpos-side-menu__row-ico {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--menu-accent, #c62828);
    color: #fff;
    font-size: 0.95rem;
}
.rpos-side-menu__social-strip {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem 0.8rem;
    margin: 0;
    border-bottom: 1px solid var(--border);
}
.rpos-side-menu__social-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
    border-radius: 999px;
    -webkit-tap-highlight-color: transparent;
}
.rpos-side-menu__social-ico:hover {
    filter: brightness(1.06);
}
.rpos-side-menu__social-ico:focus-visible {
    outline: 2px solid var(--menu-accent, #c62828);
    outline-offset: 2px;
}
.rpos-side-menu__social-ico:active .rpos-side-menu__row-ico {
    transform: scale(0.96);
}
.rpos-side-menu__row--expand[aria-expanded="true"] {
    border-bottom: none;
}
.rpos-side-menu__hours-panel {
    padding: 0 0.95rem 0.85rem;
    background: var(--page);
}
.rpos-side-menu__hours-panel[hidden] {
    display: none !important;
}
.rpos-side-menu__hours-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.rpos-side-menu__hours-table th {
    text-align: start;
    font-weight: 600;
    padding: 0.28rem 0.4rem 0.28rem 0;
    color: var(--text);
}
.rpos-side-menu__hours-table td {
    padding: 0.28rem 0;
    color: var(--muted);
}
.rpos-side-menu__hours-note {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.45;
}
.rpos-side-menu__social {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.85rem 0.75rem;
    padding-bottom: calc(0.85rem + env(safe-area-inset-bottom));
    background: var(--menu-accent, #c62828);
}
.rpos-side-menu__soc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    color: #fff;
    font-size: 1.15rem;
    text-decoration: none;
    opacity: 0.98;
}
.rpos-side-menu__soc:active {
    transform: scale(0.94);
}

/* ——— نوافذ منبثقة (أوقات العمل، تقييم الخدمة) ——— */
.rpos-cm-modal[hidden] {
    display: none !important;
}
.rpos-cm-modal {
    position: fixed;
    inset: 0;
    z-index: 220;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    isolation: isolate;
}
.rpos-cm-modal__backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    cursor: pointer;
    pointer-events: auto;
}
.rpos-cm-modal__dialog {
    position: relative;
    z-index: 2;
    pointer-events: auto;
    width: min(100%, 26rem);
    max-height: min(90vh, 34rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
}

/* اختيار أول زيارة: داخل المطعم / توصيل */
.rpos-service-intro .rpos-service-intro__backdrop {
    cursor: default;
}
.rpos-service-intro .rpos-service-intro__dialog {
    max-height: none;
    width: min(100%, 22.5rem);
}
.rpos-service-intro__head {
    padding: 1.2rem 1.1rem 0.35rem;
    text-align: center;
}
.rpos-service-intro__title {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
}
.rpos-service-intro__lead {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 600;
    line-height: 1.45;
}
.rpos-service-intro__hint {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.45;
}
.rpos-service-intro__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding: 1rem 1.1rem 1.25rem;
}
@media (min-width: 420px) {
    .rpos-service-intro__actions {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
}
.rpos-service-intro__pick {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    min-height: 5.5rem;
    padding: 1rem 0.75rem;
    border-radius: 14px;
    border: 2px solid var(--border);
    background: var(--page);
    color: var(--text);
    font: inherit;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.rpos-service-intro__pick:active {
    transform: scale(0.98);
}
.rpos-service-intro__pick--dinein:focus-visible,
.rpos-service-intro__pick--delivery:focus-visible {
    outline: 2px solid var(--gold, #c0943b);
    outline-offset: 2px;
}
.rpos-service-intro__pick--dinein:hover {
    border-color: var(--navy, #1a2f4a);
    background: rgba(26, 47, 74, 0.06);
}
.rpos-service-intro__pick--delivery:hover {
    border-color: var(--menu-accent, #c62828);
    background: rgba(198, 40, 40, 0.06);
}
.rpos-service-intro__ico {
    font-size: 1.5rem;
    line-height: 1;
    color: var(--muted);
}
.rpos-service-intro__label {
    text-align: center;
    line-height: 1.3;
}

/* أوقات العمل */
.rpos-hours-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1rem 0.75rem;
    flex-shrink: 0;
}
.rpos-hours-modal__title {
    margin: 0;
    flex: 1;
    text-align: start;
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--text);
}
.rpos-hours-modal__close {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    border: none;
    border-radius: 999px;
    background: #eceff1;
    color: var(--muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    font-weight: 700;
}
.rpos-hours-modal__body {
    padding: 0 0.75rem 1.1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.rpos-hours-modal__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.72rem 0.75rem;
    font-size: 0.92rem;
    border-radius: 10px;
}
.rpos-hours-modal__row:nth-child(odd) {
    background: #fff;
}
.rpos-hours-modal__row:nth-child(even) {
    background: #fcecea;
}
.rpos-hours-modal__day {
    font-weight: 700;
    color: var(--text);
    text-align: start;
}
.rpos-hours-modal__time {
    color: var(--text);
    font-weight: 500;
    text-align: end;
    white-space: nowrap;
}
.rpos-hours-modal__note {
    margin: 0.75rem 0 0;
    padding: 0 0.25rem;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.45;
}

/* تقييم الخدمة */
.rpos-rating-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1rem 0.6rem;
    flex-shrink: 0;
}
.rpos-rating-modal__title {
    margin: 0;
    flex: 1;
    text-align: start;
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--text);
}
.rpos-rating-modal__close {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    border: none;
    border-radius: 999px;
    background: #eceff1;
    color: var(--muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    font-weight: 700;
}
.rpos-rating-modal__form {
    padding: 0 1rem 1rem;
    overflow-y: auto;
    max-height: calc(min(90vh, 38rem) - 3.5rem);
}
.rpos-rating-modal__field {
    display: block;
    margin-bottom: 0.85rem;
}
.rpos-rating-modal__hint {
    margin: -0.15rem 0 0.5rem;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--muted);
}

.rpos-rating-modal__label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text);
    text-align: start;
}
.rpos-rating-modal__input,
.rpos-rating-modal__textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--text);
    box-sizing: border-box;
}
.rpos-rating-modal__input::placeholder,
.rpos-rating-modal__textarea::placeholder {
    color: #9ca3af;
}
.rpos-rating-modal__textarea {
    resize: vertical;
    min-height: 5.5rem;
}
.rpos-rating-modal__stars-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}
.rpos-rating-modal__star-cap {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    flex-shrink: 0;
}
.rpos-rating-modal__stars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}
.rpos-rating-modal__star-btn {
    padding: 0.15rem;
    border: none;
    background: none;
    cursor: pointer;
    color: #bdbdbd;
    font-size: 1.35rem;
    line-height: 1;
}
.rpos-rating-modal__star-btn.is-active,
.rpos-rating-modal__star-btn.is-active i {
    color: #f5b301;
}
.rpos-rating-modal__submit {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 14px;
    background: var(--menu-accent, #c62828);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(198, 40, 40, 0.35);
}
.rpos-rating-modal__submit:active {
    transform: scale(0.99);
}

/* —— تقييمات العملاء —— */
.rpos-customer-reviews {
    max-width: 920px;
    margin: 1.5rem auto 0;
    padding: 0 1rem 1.25rem;
}
.rpos-customer-reviews__title {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 0 0.75rem;
    color: var(--menu-ink-strong, #1a1a1a);
}
.rpos-customer-reviews__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
}
.rpos-customer-reviews__avg-wrap {
    display: inline-flex;
    align-items: baseline;
    gap: 0.2rem;
}
.rpos-customer-reviews__avg {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--menu-accent, #c62828);
}
.rpos-customer-reviews__avg-denom {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.7;
}
.rpos-customer-reviews__meta {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.85;
}
.rpos-customer-reviews__empty {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    opacity: 0.8;
}
.rpos-customer-reviews__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.rpos-customer-reviews__item {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.06);
}
.rpos-customer-reviews__stars {
    display: flex;
    gap: 0.15rem;
    margin-bottom: 0.35rem;
    color: #f5b301;
    font-size: 0.95rem;
}
.rpos-customer-reviews__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
}
.rpos-customer-reviews__name {
    font-size: 0.95rem;
    font-weight: 700;
}
.rpos-customer-reviews__date {
    font-size: 0.8rem;
    opacity: 0.65;
    white-space: nowrap;
}
.rpos-customer-reviews__comment {
    margin: 0.45rem 0 0;
    font-size: 0.92rem;
    line-height: 1.45;
    opacity: 0.92;
    word-break: break-word;
}

/* ——— توحيد الحقول وعداد الكمية (كل ثيمات المنيو، ومنها كلاسيكي داكن/ذهبي) ——— */
body.rpos-customer-app .order-modal.show input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]),
body.rpos-customer-app .order-modal.show textarea,
body.rpos-customer-app .order-modal.show select {
    pointer-events: auto;
}

body.rpos-customer-app .rpos-input:-webkit-autofill,
body.rpos-customer-app .rpos-input:-webkit-autofill:hover,
body.rpos-customer-app .rpos-input:-webkit-autofill:focus,
body.rpos-customer-app .form-input:-webkit-autofill,
body.rpos-customer-app .form-textarea:-webkit-autofill,
body.rpos-customer-app .rpos-menu-search-input:-webkit-autofill,
body.rpos-customer-app .rpos-rating-modal__input:-webkit-autofill,
body.rpos-customer-app .rpos-rating-modal__textarea:-webkit-autofill {
    -webkit-text-fill-color: var(--text) !important;
    caret-color: var(--text);
    transition: background-color 99999s ease-out 0s;
    box-shadow: 0 0 0 1000px var(--surface) inset !important;
}

@media (max-width: 480px) {
    body.rpos-customer-app .rpos-input,
    body.rpos-customer-app .rpos-input--dense,
    body.rpos-customer-app .form-input,
    body.rpos-customer-app .form-textarea,
    body.rpos-customer-app .rpos-menu-search-input,
    body.rpos-customer-app .rpos-rating-modal__input,
    body.rpos-customer-app .rpos-rating-modal__textarea {
        font-size: 16px;
    }

    .rpos-qty--card {
        grid-template-columns: 2.55rem minmax(1.9rem, 1fr) 2.55rem;
    }

    .rpos-qty--card .rpos-qty__btn {
        min-width: 2.55rem;
        min-height: 2.35rem;
    }

    .rpos-qty--card .rpos-qty__ico {
        font-size: 1.05rem;
    }
}

/* ——— نافذة تأكيد الطلب: حقول تفاعلية واضحة (ليست كنص ثابت داخل صندوق) ——— */
.order-modal-body .rpos-field-block--compact + .rpos-field-block--compact {
    margin-top: 0.15rem;
}

.order-modal-body .rpos-field-block__label--inline {
    color: var(--text);
    font-weight: 700;
    margin-bottom: 0.32rem !important;
}

.order-modal-body .rpos-optional-hint {
    color: var(--muted);
    opacity: 0.85;
}

.order-modal-body .rpos-input,
.order-modal-body textarea.rpos-input {
    display: block;
    width: 100%;
    background-color: var(--page) !important;
    border: 1.5px solid color-mix(in srgb, var(--gold) 34%, var(--border)) !important;
    color: var(--text) !important;
    caret-color: var(--text);
    -webkit-text-fill-color: var(--text) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    min-height: 2.7rem;
}

.order-modal-body textarea.rpos-input {
    min-height: 4.35rem;
    line-height: 1.5;
}

.order-modal-body .rpos-input--dense {
    padding: 0.62rem 0.78rem;
}

.order-modal-body .rpos-input::placeholder,
.order-modal-body textarea.rpos-input::placeholder {
    color: var(--muted) !important;
    opacity: 0.58 !important;
    font-style: italic;
    font-weight: 500;
    -webkit-text-fill-color: var(--muted) !important;
}

.order-modal-body .rpos-input:focus,
.order-modal-body textarea.rpos-input:focus {
    background-color: var(--surface) !important;
    border-color: var(--gold) !important;
    box-shadow:
        0 0 0 3px color-mix(in srgb, var(--gold) 30%, transparent),
        inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.order-modal-body .rpos-input:not(:placeholder-shown),
.order-modal-body textarea.rpos-input:not(:placeholder-shown) {
    border-color: color-mix(in srgb, var(--gold) 52%, var(--border)) !important;
    font-weight: 600;
}

.order-modal-body .rpos-input:-webkit-autofill,
.order-modal-body .rpos-input:-webkit-autofill:hover,
.order-modal-body .rpos-input:-webkit-autofill:focus,
.order-modal-body textarea.rpos-input:-webkit-autofill {
    -webkit-text-fill-color: var(--text) !important;
    box-shadow: 0 0 0 1000px var(--page) inset !important;
    border-color: color-mix(in srgb, var(--gold) 40%, var(--border)) !important;
}
