.ward-page {
    --ward-bg: #f7f5f1;
    --ward-card: #ffffff;
    --ward-ink: #151515;
    --ward-muted: #6b625d;
    --ward-border: #e7ded8;
    --ward-accent: #a44019;
    --ward-accent-dark: #713013;
    --ward-shadow: 0 10px 28px rgba(61, 37, 24, .13);
    --ward-ar-display: "Aref Ruqaa", "Reem Kufi", "Cairo", serif;
    min-height: 100vh;
    margin: 0;
    color: var(--ward-ink);
    background: var(--ward-bg);
    font-family: "Cairo", "Tajawal", Arial, sans-serif;
}

.ward-page * {
    box-sizing: border-box;
}

.ward-frame {
    width: min(100%, 520px);
    min-height: 100vh;
    margin: 0 auto;
    background: var(--ward-bg);
}

.ward-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 86px 1fr 86px;
    align-items: center;
    min-height: 70px;
    padding: 6px 14px;
    border-bottom: 1px solid var(--ward-border);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(14px);
}

.ward-language {
    width: 82px;
    min-height: 38px;
    padding: 6px 8px;
    border: 1px solid var(--ward-border);
    border-radius: 999px;
    color: var(--ward-accent-dark);
    background: #fff;
    font-size: .84rem;
    font-weight: 800;
    outline: none;
}

.ward-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ward-logo img {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
}

.ward-shop {
    padding: 22px 16px 12px;
    text-align: center;
}

.ward-shop-name {
    margin: 0;
    color: var(--ward-accent-dark);
    font-family: "Reem Kufi", "Cairo", sans-serif;
    font-size: 1.75rem;
    line-height: 1.35;
}

.ward-page[dir="rtl"] .ward-shop-name {
    font-family: var(--ward-ar-display);
    font-size: 2rem;
    font-weight: 700;
}

.ward-shop-desc {
    margin: 7px auto 0;
    color: var(--ward-muted);
    font-size: .92rem;
    line-height: 1.75;
}

.ward-category-strip {
    display: grid;
    grid-auto-columns: 44%;
    grid-auto-flow: column;
    gap: 18px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 16px 14px 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.ward-category-strip::-webkit-scrollbar {
    display: none;
}

.ward-category-card {
    scroll-snap-align: start;
    display: block;
    color: var(--ward-ink);
    text-align: center;
    text-decoration: none;
}

.ward-category-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / .92;
    border-radius: 9px;
    object-fit: cover;
    background: #eee7df;
    box-shadow: var(--ward-shadow);
}

.ward-category-card span {
    display: block;
    margin-top: 12px;
    color: #111;
    font-family: "Reem Kufi", "Cairo", sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.35;
}

.ward-page[dir="rtl"] .ward-category-card span {
    font-family: var(--ward-ar-display);
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.45;
}

.ward-search-wrap {
    padding: 0 18px 18px;
}

.ward-search {
    position: relative;
    display: block;
}

.ward-search input {
    width: 100%;
    min-height: 70px;
    padding: 14px 58px 14px 18px;
    border: 1px solid var(--ward-border);
    border-radius: 4px;
    color: var(--ward-ink);
    background: #fff;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 8px 22px rgba(84, 59, 43, .07);
}

.ward-page[dir="ltr"] .ward-search input {
    padding-right: 18px;
    padding-left: 58px;
}

.ward-search input:focus {
    border-color: rgba(164, 64, 25, .45);
    box-shadow: 0 0 0 4px rgba(164, 64, 25, .09);
}

.ward-search-icon {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    color: #111;
    font-size: 1.6rem;
}

.ward-page[dir="ltr"] .ward-search-icon {
    right: auto;
    left: 20px;
}

.ward-menu-body {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.ward-page[dir="rtl"] .ward-menu-body {
    direction: ltr;
}

.ward-page[dir="ltr"] .ward-menu-body {
    flex-direction: row-reverse;
}

.ward-menu-sections {
    flex: 1 1 auto;
    min-width: 0;
}

.ward-page[dir="rtl"] .ward-menu-sections {
    direction: rtl;
}

.ward-page[dir="ltr"] .ward-menu-sections {
    direction: ltr;
}

.ward-browse-tab {
    position: sticky;
    top: 84px;
    z-index: 12;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    min-height: 255px;
    padding: 10px 6px;
    border: 0;
    color: #fff;
    background: var(--ward-accent-dark);
    font-family: "Cairo", "Tajawal", Arial, sans-serif;
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.18;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    box-shadow: none;
}

.ward-section {
    margin-bottom: 18px;
    scroll-margin-top: 94px;
}

.ward-section-title {
    margin: 0;
    padding: 19px 18px;
    color: #fff;
    background: var(--ward-accent);
    font-family: "Reem Kufi", "Cairo", sans-serif;
    font-size: 1.82rem;
    font-weight: 800;
    line-height: 1.2;
}

.ward-page[dir="rtl"] .ward-section-title {
    font-family: var(--ward-ar-display);
    font-size: 2.05rem;
    font-weight: 700;
}

.ward-items {
    padding: 16px 14px 2px;
}

.ward-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
    padding: 18px 16px;
    border: 1px solid rgba(231, 222, 216, .82);
    border-radius: 7px;
    background: var(--ward-card);
    box-shadow: 0 9px 24px rgba(51, 31, 22, .08);
}

.ward-page-with-product-images .ward-item {
    grid-template-columns: 104px 1fr;
    gap: 12px;
    min-height: 122px;
}

.ward-page-with-product-images[dir="ltr"] .ward-item {
    grid-template-columns: 1fr 104px;
}

.ward-page-with-product-images[dir="ltr"] .ward-product-image {
    order: 2;
}

.ward-page-with-product-images[dir="ltr"] .ward-product-copy {
    order: 1;
}

.ward-product-image {
    display: block;
    width: 104px;
    height: 104px;
    border-radius: 7px;
    object-fit: cover;
    background: #eee7df;
    box-shadow: 0 5px 14px rgba(52, 31, 19, .12);
}

.ward-product-copy {
    align-self: center;
}

.ward-item-name {
    margin: 0 0 7px;
    color: #151515;
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.45;
}

.ward-page[dir="rtl"] .ward-item-name {
    font-family: "Cairo", "Tajawal", Arial, sans-serif;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.65;
}

.ward-item-desc {
    margin: 0;
    color: var(--ward-muted);
    font-size: .91rem;
    line-height: 1.75;
}

.ward-price {
    min-width: 86px;
    color: #111;
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1.25;
    white-space: nowrap;
}

.ward-product-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.ward-page[dir="ltr"] .ward-product-actions {
    align-items: flex-end;
}

.ward-product-actions .ward-price {
    min-width: 0;
}

.ward-add-receipt {
    min-height: 32px;
    padding: 6px 12px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--ward-accent-dark);
    font-family: "Cairo", "Tajawal", Arial, sans-serif;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.ward-page[dir="rtl"] .ward-price {
    text-align: left;
}

.ward-page[dir="ltr"] .ward-price {
    text-align: right;
}

.ward-empty {
    display: none;
    margin: 18px;
    padding: 20px;
    border: 1px dashed var(--ward-border);
    border-radius: 8px;
    color: var(--ward-muted);
    background: #fff;
    text-align: center;
}

.ward-page.is-search-empty .ward-empty {
    display: block;
}

.ward-footer {
    margin-top: 28px;
    padding: 34px 18px 42px;
    color: #4b4f55;
    background: #fff;
    text-align: center;
}

.ward-footer-note {
    max-width: 360px;
    margin: 0 auto 28px;
    color: #6b6f76;
    font-family: "Cairo", "Tajawal", Arial, sans-serif;
    font-size: 1.12rem;
    font-weight: 500;
    line-height: 1.8;
}

.ward-footer-note bdi[dir="ltr"] {
    direction: ltr;
    unicode-bidi: isolate;
}

.ward-social-title {
    margin: 0 0 14px;
    color: #4b4f55;
    font-family: "Raleway", "Cairo", Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.3;
}

.ward-account-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin: 18px 0 0;
    padding: 0 18px;
    border: 1px solid #383c40;
    border-radius: 999px;
    color: #383c40;
    background: #fff;
    font-family: "Raleway", "Cairo", Arial, sans-serif;
    font-size: .84rem;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
}

.ward-account-link:hover,
.ward-account-link:focus {
    color: #fff;
    background: #383c40;
}

.ward-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.ward-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    background: #383c40;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

.ward-socials img {
    display: block;
    max-width: 20px;
    max-height: 20px;
}

.ward-back-to-top {
    position: fixed;
    right: 0;
    bottom: 0;
    z-index: 55;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    padding: 0;
    border: 0;
    color: #fff;
    background: #1c1e20;
    font-family: Arial, sans-serif;
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    visibility: hidden;
    cursor: pointer;
    transition: opacity .25s ease, visibility .25s ease, background-color .25s ease;
}

.ward-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.ward-back-to-top:hover,
.ward-back-to-top:focus {
    background: #383c40;
}

.ward-page[dir="rtl"] .ward-back-to-top {
    right: auto;
    left: 0;
}

.ward-page-with-receipt .ward-back-to-top {
    right: auto;
    left: 18px;
    bottom: 18px;
}

.ward-page-with-receipt[dir="rtl"] .ward-back-to-top {
    right: auto;
    left: 18px;
}

.ward-drawer {
    position: fixed;
    inset-block: 0;
    z-index: 40;
    width: min(84vw, 360px);
    background: #fff;
    box-shadow: 12px 0 36px rgba(0, 0, 0, .24);
    transition: transform .24s ease;
}

.ward-page[dir="rtl"] .ward-drawer {
    left: 0;
    transform: translateX(-104%);
}

.ward-page[dir="ltr"] .ward-drawer {
    right: 0;
    transform: translateX(104%);
}

.ward-drawer.is-open {
    transform: translateX(0) !important;
}

.ward-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
    padding: 14px;
    border-bottom: 1px solid var(--ward-border);
}

.ward-drawer-head strong {
    color: var(--ward-accent-dark);
    font-size: 1.1rem;
}

.ward-drawer-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--ward-accent);
    font-size: 1.15rem;
}

.ward-drawer-list {
    height: calc(100vh - 78px);
    overflow-y: auto;
    padding: 12px;
}

.ward-drawer-link {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid var(--ward-border);
    border-radius: 7px;
    color: var(--ward-ink);
    background: #fff;
    text-decoration: none;
}

.ward-drawer-link img {
    width: 72px;
    height: 72px;
    border-radius: 6px;
    object-fit: cover;
    background: #eee7df;
}

.ward-drawer-link span {
    font-weight: 800;
    line-height: 1.45;
}

.ward-scrim {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: none;
    background: rgba(0, 0, 0, .38);
}

.ward-scrim.is-open {
    display: block;
}

.ward-receipt {
    position: fixed;
    right: 16px;
    bottom: 104px;
    z-index: 1000;
    display: none;
    width: min(360px, calc(100vw - 32px));
    max-height: min(520px, calc(100vh - 140px));
    overflow-y: auto;
    padding: 18px;
    border: 1px solid var(--ward-border);
    border-radius: 16px;
    color: var(--ward-ink);
    background: #fff;
    box-shadow: 0 18px 44px rgba(34, 20, 12, .24);
}

.ward-page[dir="rtl"] .ward-receipt {
    right: 16px;
    left: auto;
}

.ward-receipt.is-open {
    display: block;
}

.ward-receipt-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.ward-receipt-head strong {
    color: var(--ward-accent-dark);
    font-size: 1.05rem;
    font-weight: 900;
}

.ward-receipt-head button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--ward-accent);
    font-size: 1.15rem;
    cursor: pointer;
}

.ward-receipt-empty {
    margin: 0 0 12px;
    color: var(--ward-muted);
    font-size: .9rem;
}

.ward-receipt-list {
    margin: 0 0 14px;
    padding-inline-start: 20px;
    color: var(--ward-muted);
    font-size: .9rem;
    line-height: 1.7;
}

.ward-receipt-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--ward-border);
    font-weight: 900;
}

.ward-receipt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ward-receipt-actions button,
.ward-receipt-button {
    min-height: 36px;
    padding: 7px 13px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--ward-accent-dark);
    font-family: "Cairo", "Tajawal", Arial, sans-serif;
    font-size: .82rem;
    font-weight: 800;
    cursor: pointer;
}

.ward-receipt-actions button.danger {
    background: #b42318;
}

.ward-receipt-button {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    min-width: 70px;
    min-height: 70px;
    padding: 0;
    background: linear-gradient(135deg, #7250c9, #168deb);
    box-shadow: 0 14px 30px rgba(31, 45, 61, .24);
    overflow: hidden;
}

.ward-page[dir="rtl"] .ward-receipt-button {
    right: 18px;
    left: auto;
}

.ward-receipt-button img {
    max-width: 72%;
    max-height: 72%;
    object-fit: contain;
}

.ward-receipt-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    background: #b42318;
    font-size: .68rem;
    line-height: 16px;
    text-align: center;
}

.ward-page[dir="rtl"] .ward-receipt-count {
    right: -4px;
    left: auto;
}

@media (min-width: 768px) {
    .ward-frame {
        margin-top: 20px;
        margin-bottom: 20px;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 18px 44px rgba(48, 31, 21, .12);
    }
}

@media (max-width: 420px) {
    .ward-back-to-top {
        right: 20px;
        bottom: 20px;
    }

    .ward-page[dir="rtl"] .ward-back-to-top {
        right: auto;
        left: 20px;
    }

    .ward-page-with-receipt .ward-back-to-top,
    .ward-page-with-receipt[dir="rtl"] .ward-back-to-top {
        right: auto;
        left: 20px;
        bottom: 20px;
    }

    .ward-header {
        grid-template-columns: 78px 1fr 78px;
    }

    .ward-language {
        width: 76px;
        font-size: .78rem;
    }

    .ward-logo img {
        width: 52px;
        height: 52px;
    }

    .ward-category-strip {
        grid-auto-columns: 47%;
    }

    .ward-section-title {
        font-size: 1.58rem;
    }

    .ward-page[dir="rtl"] .ward-section-title {
        font-size: 1.86rem;
    }

    .ward-item {
        grid-template-columns: 1fr;
    }

    .ward-page-with-product-images .ward-item {
        grid-template-columns: 92px 1fr;
        gap: 10px;
        min-height: 106px;
    }

    .ward-page-with-product-images[dir="ltr"] .ward-item {
        grid-template-columns: 1fr 92px;
    }

    .ward-product-image {
        width: 92px;
        height: 92px;
    }

    .ward-price {
        text-align: inherit !important;
    }

    .ward-product-actions {
        align-items: inherit !important;
    }

    .ward-add-receipt {
        font-size: .72rem;
        padding: 6px 10px;
    }
}
