/* MAGMA Store Platform — this store's own little file of overrides.
   It is loaded after the platform stylesheets, so anything written here wins.
   Keep it small and additive: the platform files (styles.*.css, app.*.css) are
   generated and get a new name on every build, this one keeps its name. */

/* The logo: the white ring around it is gone (it read as a white box on the dark
   header) and it stands a little bigger, on the same line as the search field.
   The logo file itself is transparent, so nothing is drawn behind it. */
.sf-logo {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.sf-logo img {
    object-fit: contain;
}

.sf-head-in {
    min-height: 62px;
}

@media (min-width: 768px) {
    .sf-logo {
        width: 58px;
        height: 58px;
        flex: 0 0 58px;
    }

    .sf-head-in {
        min-height: 72px;
    }
}

/* ============ the categories bar wears the store's own colour ============
   The sticky chips row (.sf-tools — only the category chips are left in it)
   takes the store's accent instead of the page background, like the service
   bar, so the shop's colour runs across the top of the page. On top of it the
   chips are white pills with a fixed dark ink and the picked one is a dark
   pill: that reading works on every accent a store may choose, light or dark
   (this store's is a light gold #ecb132, where white ink would vanish). */

.sf-tools {
    background: var(--acc-fill);
    border-bottom: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding-top: 8px;
    padding-bottom: 8px;
}

.sf-tools .sf-chip {
    background: rgba(255, 255, 255, .92);
    border-color: rgba(255, 255, 255, .55);
    color: #251c2b;
}

.sf-tools .sf-chip:hover {
    background: #fff;
    color: #251c2b;
}

.sf-tools .sf-chip.is-on {
    background: rgba(23, 16, 26, .84);
    border-color: rgba(23, 16, 26, .84);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
}

@media (max-width: 640px) {
    .sf-tools {
        padding-top: 6px;
        padding-bottom: 6px;
    }
}

/* ============ phones: the checkout alone, the rest under the ⋮ ============
   Below 640px the header row folds — the same breakpoint where the platform
   itself folds the three currency pills into one. The cart keeps its round
   button on its own; the account (Sign in), the currency pill and the language
   pill move into a single "⋮" menu that js/rx-nav.js opens. The menu does not
   re-implement anything: it clicks the buttons the storefront already drew, so
   the sign-in dialog, the currency switch and the language toggle behave
   exactly as before. Wider screens are untouched. */

.rx-more-btn {
    display: none;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--acc-soft);
    color: var(--acc-text);
    cursor: pointer;
}

.rx-more-btn[aria-expanded="true"] {
    background: var(--acc);
    color: #fff;
}

@media (max-width: 640px) {
    .sf-head-actions > .sf-cur,
    .sf-head-actions > .sf-cur-m,
    .sf-head-actions > button.sf-lang:not(.sf-acct),
    .sf-head-actions > button.sf-acct {
        display: none !important;
    }

    .rx-more-btn {
        display: inline-flex;
    }
}

/* the menu: a card under the ⋮, above everything, following the page direction */
.rx-mm {
    position: fixed;
    z-index: 2147483000;
    min-width: 214px;
    max-width: calc(100vw - 20px);
    padding: 8px;
    border-radius: 16px;
    background: var(--card, #fff);
    color: var(--ink, #251c2b);
    box-shadow: 0 18px 44px rgba(20, 10, 32, .26), 0 2px 8px rgba(20, 10, 32, .12);
    font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.25;
    text-align: start;
}

.rx-mm-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    text-align: start;
    cursor: pointer;
}

.rx-mm-row:hover,
.rx-mm-row:focus-visible {
    background: rgba(136, 2, 144, .08);
    outline: none;
}

.rx-mm-label {
    padding: 8px 12px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-3, #7a6a86);
}

.rx-mm-row + .rx-mm-label {
    margin-top: 4px;
    border-top: 1px solid var(--line, #ece6f2);
    padding-top: 12px;
}

.rx-mm-cur {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 10px 10px;
}

.rx-mm-chip {
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid var(--line, #e4d9ec);
    border-radius: 999px;
    background: var(--line-2, #faf7fc);
    color: inherit;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.rx-mm-chip.is-on {
    background: var(--acc-soft, #f3e6f5);
    border-color: var(--acc, #880290);
    color: var(--acc-text, #6a0170);
}

/* ================= the Checkout bar that follows the shopper =================
   The platform already draws this bar (button.sf-fab) but hides it from 720px
   up, and it reads "Cart · 2 items". Here it is the shop's checkout bar on
   every screen: the store's colour, "Checkout now" on one side, the cart total
   on the other. The words come from CSS (::before) so the app's own re-render
   can never write them back, and its label span is folded away. js/rx-store.js
   slides it in when something lands in the cart and tucks it away when the
   shopper scrolls down, so it never covers what they are reading. */

button.sf-fab,
button.sf-fab.rx-fab {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    position: fixed;
    inset-inline: 12px;
    bottom: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    max-width: 560px;
    margin-inline: auto;
    min-height: 56px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--acc-fill, var(--acc, #880290));
    color: #fff;
    font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer;
    z-index: 40;
    box-shadow: 0 16px 38px rgba(20, 10, 32, .32), 0 2px 8px rgba(20, 10, 32, .16);
    transition: transform .3s cubic-bezier(.22, .9, .3, 1), opacity .22s ease;
    will-change: transform;
}

button.sf-fab:hover {
    filter: brightness(1.04);
}

/* the app's "Cart · 2 items" text is replaced, not rewritten */
button.sf-fab > span:first-child {
    font-size: 0;
    line-height: 0;
}

button.sf-fab > span:first-child::before {
    content: "Checkout now";
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

html[dir="rtl"] button.sf-fab > span:first-child::before,
html[lang="ar"] button.sf-fab > span:first-child::before {
    content: "إتمام الشراء الآن";
}

button.sf-fab .sf-fab-total {
    font-size: 16px;
    font-weight: 700;
    opacity: .96;
}

.sf-fab.rx-fab-in {
    animation: rx-bar-rise .38s cubic-bezier(.22, .9, .3, 1) both;
}

.sf-fab.rx-fab-hide {
    transform: translateY(180%);
    opacity: 0;
    pointer-events: none;
}

@keyframes rx-bar-rise {
    from {
        transform: translateY(180%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    button.sf-fab {
        transition: none;
    }

    .sf-fab.rx-fab-in {
        animation: none;
    }
}

/* ============ phones: categories instead of the filters panel ============
   On a phone the chips bar under the header and the filter column cost more
   room than they give. Both step aside and a Categories section takes their
   place at the top of the shop: the same categories the panel offers, as a row
   of pills with their counts, one tap away. js/rx-store.js builds it from the
   buttons the panel already drew, so filtering still runs through the app. */

.rx-cats {
    display: none;
}

@media (max-width: 640px) {
    body.rx-shop .sf-tools,
    .sf-filters,
    .sf-fback,
    .sf-fbtn {
        display: none !important;
    }

    .rx-cats {
        display: block;
        margin: 2px 0 12px;
    }
}

.rx-cats-h {
    margin: 0 0 8px 2px;
    font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-3, #7a6a86);
}

.rx-cats-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.rx-cats-row::-webkit-scrollbar {
    display: none;
}

.rx-cat {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid var(--line, #e4d9ec);
    border-radius: 999px;
    background: var(--card, #fff);
    color: var(--ink, #251c2b);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.rx-cat-c {
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-3, #7a6a86);
}

.rx-cat.is-on {
    background: rgba(23, 16, 26, .88);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 16px rgba(20, 10, 32, .22);
}

.rx-cat.is-on .rx-cat-c {
    color: rgba(255, 255, 255, .82);
}

/* ==================== the option picker, made easy ====================
   The platform draws one card per option ("Color") with a button per value.
   Here every option is a card of its own with a clear name, and the values are
   full-size pills: the picked one is dark and unmistakable, a value that is out
   of stock is grey and crossed, and a product whose option has only one value
   picks it by itself (js/rx-store.js), so the shopper never has to work out
   what is missing before Add to cart answers. */

.sf-variants {
    display: grid;
    gap: 12px;
    margin: 18px 0 6px;
}

.sf-vgroup {
    padding: 14px 16px 16px;
    border: 1px solid var(--line, #e4d9ec);
    border-radius: 16px;
    background: var(--card, #fff);
}

.sf-vg-h {
    margin: 0 0 12px;
    font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-3, #7a6a86);
}

.sf-vg-vals {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sf-vval {
    min-width: 58px;
    min-height: 46px;
    padding: 0 18px;
    border: 1.5px solid var(--line, #e4d9ec);
    border-radius: 999px;
    background: var(--card, #fff);
    color: var(--ink, #251c2b);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .16s ease, color .16s ease, border-color .16s ease, transform .12s ease;
}

.sf-vval:hover {
    border-color: var(--acc, #880290);
}

.sf-vval:active {
    transform: scale(.98);
}

.sf-vval.is-on {
    border-color: transparent;
    background: rgba(23, 16, 26, .9);
    color: #fff;
    box-shadow: 0 8px 18px rgba(20, 10, 32, .22);
}

.sf-vval.is-oos {
    opacity: .42;
    text-decoration: line-through;
    cursor: not-allowed;
}

.sf-vnote {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--ink-3, #7a6a86);
}

.sf-vnote.is-err {
    color: #b3261e;
}

/* With the Filters button gone on a phone, the bar above the grid would be left
   half empty: the finder takes the whole line instead, so it reads as one clear
   button rather than something pushed to the edge. */
@media (max-width: 640px) {
    body.rx-shop .sf-fbar {
        width: 100%;
    }

    body.rx-shop .sf-fbar .sf-findbtn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

/* ============ ten products, then "Show more" ============ */
/* Cards past the tenth are folded away by js/rx-more.js; the button after the
   grid brings the next ten. It sits outside the grid, so the column layout is
   exactly what the platform drew. */
.sf-grid > .rx-off {
    display: none !important;
}

.rx-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 320px;
    min-height: 50px;
    margin: 22px auto 6px;
    padding: 0 24px;
    border: 1.5px solid var(--line, #e4d9ec);
    border-radius: 999px;
    background: var(--card, #fff);
    color: var(--ink, #251c2b);
    font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .12s ease;
}

.rx-more:hover {
    border-color: var(--acc, #880290);
    background: var(--acc-soft, #f7eef8);
}

.rx-more:active {
    transform: scale(.99);
}

.rx-more[hidden] {
    display: none !important;
}

/* ------- phones: the categories are a list down the left, not a row on top -------
   The shop keeps a gutter on its start side, and the list sits in it: it scrolls
   in with the page, then holds just under the header while the shopper browses,
   and it never covers the hero or the products. The tiles stay in the same order
   and still filter through the panel's own buttons. */
@media (max-width: 640px) {
    body.rx-shop .sf-shop-body {
        padding-inline-start: 104px;
        /* the rail is pinned only while the shop is on screen: clipping the shop
           box makes the tiles stop exactly at the last row instead of sliding on
           and floating over the section after it. overflow: clip creates no scroll
           container, so the rail still sticks while the products are in view. */
        overflow: clip;
    }

    body.rx-shop .rx-cats {
        display: block;
        position: sticky;
        top: 78px;
        width: 88px;
        height: 0;
        margin-inline-start: -96px;
        padding: 0;
        z-index: 25;
    }

    body.rx-shop .rx-cats-h {
        display: none;
    }

    body.rx-shop .rx-cats-row {
        flex-direction: column;
        gap: 6px;
        overflow: visible;
        padding-bottom: 0;
    }

    body.rx-shop .rx-cat {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 1px;
        min-height: 50px;
        padding: 7px 10px;
        border-radius: 12px;
        font-size: 12.5px;
        line-height: 1.15;
        white-space: normal;
        text-align: start;
        box-shadow: 0 4px 12px rgba(20, 10, 32, .10);
    }

    body.rx-shop .rx-cat-c {
        font-size: 10.5px;
    }
}

/* ============ phones: the footer columns, smaller and side by side ============
   On a phone the footer's link columns were two wide tracks, so the third group
   (Policies) dropped under the first and the band read as three long stacks.
   Here the tracks are narrower — three of them on a 390px screen, two on a very
   small one, and only as many as the store really has — with a smaller heading
   and link face, so the groups sit next to each other instead of under each
   other. The colours, the order and every link are the platform's own. */
@media (max-width: 719px) {
    .sf-ft-in {
        padding: 24px 14px 20px;
    }

    .sf-ft-cols {
        grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
        gap: 16px 10px;
    }

    .sf-ft-col {
        gap: 1px;
    }

    .sf-ft-h,
    [dir="rtl"] .sf-ft-h {
        font-size: 10px;
        letter-spacing: .04em;
        line-height: 15px;
    }

    [dir="rtl"] .sf-ft-h {
        font-size: 10.5px;
        letter-spacing: 0;
    }

    .sf-ft-a {
        font-size: 11.5px;
        line-height: 19px;
    }
}

/* ============ desktop: the filter column never rides over the header ============
   The chips row and the filter column used to be offset by a fixed number
   (--sf-head-h) that did not match the real header height, so the panel bled
   over the category chips / search bar. The real height is measured in
   js/rx-store.js; here the header and the chips row simply paint above the
   panel, so nothing ever covers them. */
@media (min-width: 960px) {
    .sf-head {
        z-index: 90;
    }

    .sf-tools {
        z-index: 80;
    }
}

/* ============ "Back to the store": right end of its own row ===================
   The pill used to sit at the left of a row of its own above the product image.
   It now takes the right end of that same row - right in English, left in
   Arabic, because the margins are logical - and no extra line is added.
   Merchant's rule, 2026-11-15. */
section:has(> .sf-backlink) > .sf-backlink,
.sf-prodpage > .sf-backlink,
.sf-policy > .sf-backlink,
.sf-finder > .sf-backlink {
    display: flex;
    width: fit-content;
    margin-inline-start: auto;
    margin-inline-end: 0;
}

/* ======== the cart / checkout drawer stacks above the sticky bars ========
   The header, the chips bar and the filter column are sticky and stack at
   90 / 80 / 66, while the cart sheet was at 60: opening the cart left the
   header and the chips painting over the drawer's own title row, and the
   filter column floating on top of the checkout - it read as if the Filters
   drawer had opened on the checkout page, and its inputs could still be
   clicked behind the dim. The sheet now sits above all three, so the cart
   and the checkout are one clean surface and the page behind them is only
   the dimmed backdrop. Merchant's report, 2026-11-15. */
.sf-sheet {
    z-index: 900;
}

/* ======== banner posters on a phone: the picture sets the box ==============
   A store makes its poster once, wide (Mirlaki's is 1800x738 = 2.44:1) and the
   phone box was 16:10, so object-fit: cover took a third of the width away: the
   store's own logo lost its first letter and the model on the right was sliced
   - the merchant had to crop a second, phone-shaped picture by hand. Now, under
   720 px, js/rx-banners.js measures the poster and writes --rx-banner-ratio, and
   the box takes the picture's own proportions: the whole poster shows edge to
   edge, nothing to prepare, nothing to upload twice, for every banner of every
   store and for the ones opened later (this is the shared storefront CSS).
   A very tall or very wide picture stays within 1.25 - 3 so the box never eats
   the screen or collapses to a strip. Desktop keeps its 2.4:1 poster.
   Merchant's rule, 2026-11-15. */
@media (max-width: 719.98px) {
    .sf-slider.rx-auto-frame .sf-slides {
        aspect-ratio: var(--rx-banner-ratio, 16 / 10);
    }

    /* a wide poster is a short box on a phone: pack the overlay so the title,
       the line and the button still sit inside it */
    .sf-slider.rx-auto-frame .sf-slide-ov {
        padding: 10px 12px 12px;
    }

    .sf-slider.rx-auto-frame .sf-slide-t {
        font-size: 15px;
        line-height: 1.2;
    }

    .sf-slider.rx-auto-frame .sf-slide-s {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 12px;
        line-height: 1.35;
    }

    .sf-slider.rx-auto-frame .sf-slider .sf-slide-in {
        gap: 6px;
    }

    .sf-slider.rx-auto-frame .sf-slide-btn {
        padding: 7px 14px;
        font-size: 12px;
    }

    .sf-slider.rx-auto-frame .sf-sl-dots {
        bottom: 6px;
    }
}

/* ======== the loading grid looks like the products it is loading ===========
   While the store's items are on their way the home grid used to show six bare
   grey blocks (height 190px, no shape), under a categories bar that already
   looked finished: the page read as half-built rather than as loading. Each
   placeholder is now a card of the real shape - a square picture area on top
   and two lines for the name underneath, in the same border, radius and shadow
   as a product card, all of it shimmering gently. Same markup, same six
   elements, nothing for the merchant to do, every store. Merchant's report on
   the loading page, 2026-11-15. */
.sf-grid > .ms-skel {
    position: relative;
    display: block;
    height: auto !important;
    aspect-ratio: 1 / 1.42;
    padding: 0;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--sh-sm);
    animation: none;
}

/* the picture, square like .sf-thumb */
.sf-grid > .ms-skel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 70.4%;
    background: linear-gradient(90deg, var(--skel-a) 25%, var(--skel-b) 37%, var(--skel-a) 63%);
    background-size: 400% 100%;
    animation: ms-shimmer 1.4s ease infinite;
}

/* the name, two lines, at the same left edge as .sf-card-b */
.sf-grid > .ms-skel::after {
    content: "";
    position: absolute;
    inset: auto 11px 12px 11px;
    height: 28px;
    border-radius: 5px;
    background:
        linear-gradient(var(--skel-a), var(--skel-a)) 0 0 / 88% 9px no-repeat,
        linear-gradient(var(--skel-a), var(--skel-a)) 0 19px / 52% 9px no-repeat;
    animation: ms-shimmer 1.4s ease infinite;
}

/* ======== the shop's first moment: its own logo on its own colour ==========
   Opening a shop used to show the half-built page first - header, categories
   bar, six loading cards - and only then the shop itself. Now the very first
   frame is a splash made of the store's own brand: its logo in the middle on a
   white plate over a deep shade of its own accent colour, a small white ring
   under it, and at the foot "Powered by" above the Magma Solutions mark. It is
   plain HTML in index.html, styled here, so it is painted before the app is
   even parsed; js/rx-splash.js puts the store's own logo in it - the logo and
   nothing else: no name, no letter - and takes it away when the items are on
   the page. Every store, and every store opened later, gets its
   own colours without doing anything. Dashboards never see it: the inline
   script in index.html marks a shopper's page with data-rx-sf="1".
   Merchant's request, 2026-11-15. */
#rx-splash {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px 24px calc(104px + env(safe-area-inset-bottom, 0px));
    /* a deeper shade of the store's own colour: the accent itself, darkened
       towards the edges - never a pale tint and never a colour of its own */
    background:
        radial-gradient(120% 92% at 50% 20%,
            rgba(0, 0, 0, .06) 0%,
            rgba(0, 0, 0, .30) 46%,
            rgba(0, 0, 0, .54) 100%),
        rgb(var(--acc-rgb, 136, 2, 144));
    transition: opacity .34s ease;
}

/* the merchants' dashboards and the platform pages never see it */
html[data-rx-sf="0"] #rx-splash {
    display: none;
}

#rx-splash.is-done {
    opacity: 0;
    pointer-events: none;
}

/* the white plate keeps any logo readable, whatever its colours */
#rx-splash .rx-splash-mark {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 116px;
    min-height: 116px;
    padding: 20px 24px;
    background: #fff;
    border-radius: 26px;
    box-shadow:
        0 22px 50px rgba(0, 0, 0, .28),
        0 2px 8px rgba(0, 0, 0, .18);
    animation: rx-splash-rise .45s cubic-bezier(.2, .7, .25, 1) both;
}

#rx-splash-logo {
    display: none;
    width: auto;
    height: auto;
    max-width: min(52vw, 190px);
    max-height: 76px;
    object-fit: contain;
}

#rx-splash.has-logo #rx-splash-logo {
    display: block;
}

/* the plate appears the moment the store's own mark is known - a shopper on a
   slow connection sees the ring on the tinted page, never an empty white box -
   and the ring steps aside for it */
#rx-splash.has-logo .rx-splash-mark {
    display: flex;
}

#rx-splash.has-logo .rx-splash-ring {
    display: none;
}

#rx-splash .rx-splash-ring {
    width: 22px;
    height: 22px;
    margin-top: 2px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .26);
    border-top-color: #fff;
    animation: rx-splash-spin .85s linear infinite;
}

#rx-splash .rx-splash-foot {
    position: absolute;
    inset-inline: 0;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

#rx-splash .rx-splash-by {
    font-size: 8px;
    font-weight: 600;
    letter-spacing: .20em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .74);
}

/* the deep background takes the white version of the Magma Solutions mark
   (/images/magma-logo-white.png), drawn straight on it - no card - with a soft
   shadow so it stays crisp even for a store whose own colour is very pale */
#rx-splash .rx-splash-link {
    display: block;
    line-height: 0;
    text-decoration: none;
    /* the mark stays small, but the finger gets a comfortable target */
    padding: 9px 8px;
    margin: -9px -8px;
    transition: opacity .2s ease;
}

#rx-splash .rx-splash-link:hover,
#rx-splash .rx-splash-link:focus-visible {
    opacity: .78;
}

#rx-splash .rx-splash-foot img {
    height: 17px;
    width: auto;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .38));
}

@keyframes rx-splash-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes rx-splash-rise {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.985);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    #rx-splash .rx-splash-mark {
        animation: none;
    }
}

/* ======== the platform's mark in the store's own footer ====================
   One small line under Track order / Contact us, right where the store's
   links end: "Powered by" and the Magma Solutions mark, aligned with the links
   (centred on a phone, on the reading end on a wide screen, like the links
   themselves). js/rx-brand.js puts the line there; the mark is the dark logo on
   a light footer and the white one on a dark footer. Merchant's request,
   2026-11-15. */
.sf-ft-bar-links > .rx-brand {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 2px;
    line-height: 1;
}

.rx-brand-by {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ft-ink-3, rgba(27, 18, 32, .45));
    white-space: nowrap;
}

/* Arabic has no uppercase and wide letter-spacing breaks the words there */
[dir="rtl"] .rx-brand-by {
    font-size: 10px;
    letter-spacing: 0;
    text-transform: none;
}

.rx-brand-link {
    display: inline-flex;
    align-items: center;
    padding: 5px 3px;
    margin: -5px -3px;
    line-height: 0;
    text-decoration: none;
}

.rx-brand-link img {
    display: block;
    height: 15px;
    width: auto;
    opacity: .92;
}

.rx-brand-link:hover img,
.rx-brand-link:focus-visible img {
    opacity: 1;
}

/* ---- Track order / Contact us on the line of the social icons ------------
   The app draws those two links in the bottom bar; js/rx-brand.js carries the
   block up into the social block, right after the icons, and the rules below
   put them on one line with the icons, aligned to the same end, with the
   "Powered by" mark on its own line under them. Merchant's request,
   2026-11-15. */
.sf-ft-soc-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px 14px;
    text-align: end;
}

.sf-ft-soc-wrap > .sf-ft-soc-h {
    flex: 0 0 100%;
}

.sf-ft-soc-wrap > .sf-ft-socials {
    margin-top: 0;
}

.sf-ft-soc-wrap > .sf-ft-bar-links {
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px 14px;
    margin: 0;
}

.sf-ft-soc-wrap > .sf-ft-bar-links > .rx-brand {
    justify-content: flex-end;
    margin-top: 0;
}

/* the "Powered by" mark, now a line of its own under the icons and the links:
   centred on a phone, like the copyright and the payment strip above it, and
   clear of the round buttons the shop floats at the bottom corner. */
.sf-ft-soc-wrap > .rx-brand {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    line-height: 1;
}

@media (min-width: 720px) {
    .sf-ft-soc-wrap > .rx-brand {
        justify-content: flex-end;
    }
}

/* ---- final ordering, merchant 2026-11-15 (b) ------------------------------
   Track order / Contact us keep the social icons' line but move to its left
   side; the icons stay right under "Connect with us"; the "Powered by" mark
   goes back down under the payment strip. These rules come last on purpose. */
.sf-ft-soc-wrap > .sf-ft-bar-links {
    margin: 0 auto 0 0;
    justify-content: flex-start;
    gap: 14px;
}

@media (min-width: 720px) {
    .sf-ft-soc-wrap {
        flex: 1 1 auto;
    }
}

/* the mark, on its own line under the payment icons */
.sf-ft-bar > .rx-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    line-height: 1;
}

@media (min-width: 720px) {
    .sf-ft-bar > .rx-brand {
        grid-column: 2;
        grid-row: 2;
        justify-self: center;
        margin-top: 4px;
    }
}

/* ---- the WhatsApp button in place of the shortcut stack -------------------
   Merchant, 2026-11-15: the app's three shortcuts at the right edge (back to
   top, WhatsApp, call) are hidden, and the WhatsApp logo stands there in the
   size of the screen, opening the number kept in the store's data. */
.sf-fabs {
    display: none !important;
}

.rx-wa {
    position: fixed;
    inset-inline-end: 14px;
    bottom: 78px;
    z-index: 38;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #25d366;
    line-height: 0;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(37, 211, 102, .38), 0 2px 6px rgba(0, 0, 0, .16);
    transition: transform .15s ease, box-shadow .15s ease;
}

.rx-wa img {
    display: block;
    width: 27px;
    height: 27px;
}

.rx-wa:hover {
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 10px 26px rgba(37, 211, 102, .46), 0 2px 6px rgba(0, 0, 0, .18);
}

.rx-wa:active {
    transform: scale(.97);
}

.rx-wa:focus-visible {
    outline: 2px solid #128c7e;
    outline-offset: 3px;
}

@media (min-width: 720px) {
    .rx-wa {
        inset-inline-end: 22px;
        bottom: 24px;
        width: 58px;
        height: 58px;
    }

    .rx-wa img {
        width: 30px;
        height: 30px;
    }
}

@media (min-width: 1200px) {
    .rx-wa {
        width: 64px;
        height: 64px;
    }

    .rx-wa img {
        width: 33px;
        height: 33px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rx-wa {
        transition: none;
    }
}

/* ============== the merchant's phone notes, 2026-11-15 =====================
   Five things he marked on his own phone, fixed here so every store that runs
   this platform gets them — the ones open now and the ones opened later. */

/* 1. the product page's description reads like text, from the side the
      language starts on (left in English, right in Arabic). It was centred,
      which is what a title does, not a paragraph of 570 characters. */
.sf-prod-desc,
.sf-prod-desc p,
.sf-prod-desc .sf-prod-p,
.sf-prod-desc li,
.sf-prod-desc span,
.sf-prod-desc div {
    text-align: start !important;
}

/* the product page's own heading and price stay centred: only the long text
   moves to the edge the language starts on. */
.sf-prod-desc .sf-prod-p:first-child {
    text-align: start !important;
}

/* 2. the social icons in the footer sit in the middle of their round button.
      The 15px icon was laid on the 24px text baseline, so it hung low in a
      circle that is visibly bigger than it. */
.sf-ft-socials a.sf-ft-soc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sf-ft-socials a.sf-ft-soc > span {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.sf-ft-socials a.sf-ft-soc svg {
    display: block;
    vertical-align: middle;
}

/* 3. the filter chips (All / the store's categories) were one line that slid
      sideways, so the ones on the right sat past the edge and looked missing.
      The row wraps instead: every chip is on screen at any width. */
.sf-chips {
    flex-wrap: wrap !important;
    row-gap: 8px;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}

/* 4. phones: the categories leave the 88px rail down the left, where the pills
      were squeezed and half of them sat below the fold, and become a strip
      pinned above the grid that you swipe sideways — every category is one flick
      away, and the products get the whole width back: two cards side by side,
      as roomy as the "most ordered" row. */
@media (max-width: 640px) {
    body.rx-shop .sf-shop-body {
        padding-inline-start: 0 !important;
        overflow: visible !important;
    }

    body.rx-shop .rx-cats {
        display: block !important;
        position: sticky;
        top: calc(var(--sf-head-h, 63px) + 4px);
        width: auto;
        height: auto;
        margin: 6px 0 2px;
        padding: 8px 0 6px;
        z-index: 24;
        background: var(--rx-shop-bg, #fdf6f4);
    }

    body.rx-shop .rx-cats-h {
        display: block;
        font-size: 11px;
        letter-spacing: .08em;
        text-transform: uppercase;
        opacity: .62;
        margin: 0 0 7px;
    }

    body.rx-shop .rx-cats-row {
        display: flex;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px;
        overflow-x: auto !important;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        padding: 0 0 3px;
    }

    body.rx-shop .rx-cats-row::-webkit-scrollbar {
        display: none;
    }

    body.rx-shop .rx-cat {
        flex: 0 0 auto !important;
        width: auto !important;
        flex-direction: row !important;
        align-items: center;
        justify-content: center;
        gap: 7px;
        min-height: 40px;
        padding: 0 14px !important;
        border-radius: 999px;
        font-size: 13px;
        line-height: 1.1;
        white-space: nowrap;
        text-align: center;
        box-shadow: 0 3px 10px rgba(20, 10, 32, .10);
        scroll-snap-align: start;
    }

    body.rx-shop .rx-cat-c {
        font-size: 11.5px;
        opacity: .7;
    }

    /* the products use the whole width, two comfortable cards a row */
    body.rx-shop .sf-shop-body .sf-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }
}

/* ===== smaller category covers (owner 2026-11-16) =====================
   The home covers were 2 per row: each tile filled half the phone screen and
   the label looked lost. 3 per row on phones, 4 on tablets, 6 on desktop —
   same design, smaller boxes, and a row of 3 categories is one neat line. */
.sf-cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.sf-cat-tile {
    aspect-ratio: 1 / 1;
}

.sf-cat-fill {
    font-size: 17px;
}

.sf-cat-ov {
    padding: 16px 7px 6px;
}

.sf-cat-name {
    font-size: 11px;
    line-height: 1.2;
}

.sf-cat-count {
    font-size: 9px;
}

@media (min-width: 720px) {
    .sf-cat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
    }

    .sf-cat-tile {
        aspect-ratio: 4 / 3;
    }

    .sf-cat-ov {
        padding: 20px 9px 7px;
    }

    .sf-cat-name {
        font-size: 12.5px;
    }

    .sf-cat-count {
        font-size: 10.5px;
    }
}

@media (min-width: 1040px) {
    .sf-cat-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 12px;
    }
}

/* ===== smaller variant pills (owner 2026-11-16) =======================
   "Shade 01" pills were 105x46 with 15px text: two per row, as loud as the
   product title. Now compact chips — 3-4 per row on a phone, the same
   selected state and the same colour dot. */
.sf-vg-vals {
    gap: 6px;
}

.sf-vval {
    min-width: 42px;
    min-height: 32px;
    padding: 0 9px;
    border-width: 1px;
    font-size: 12px;
}

.sf-vval.is-on {
    box-shadow: 0 3px 8px rgba(20, 10, 32, .18);
}

/* ===== Suggested items on the product page (owner 2026-11-16) ==========
   A strip under the Add to cart block, filled by js/rx-suggested.js with
   random items from the whole catalogue, different on every reload. */
.rx-sug {
    margin: 18px 0 4px;
}

.rx-sug-h {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 0 10px;
}

.rx-sug-t {
    margin: 0;
    font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--ink, #251c2b);
}

.rx-sug-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.rx-sug-row::-webkit-scrollbar {
    display: none;
}

.rx-sug-card {
    flex: 0 0 132px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line, #e4d9ec);
    border-radius: 14px;
    background: var(--card, #fff);
    color: inherit;
    text-decoration: none;
}

.rx-sug-img {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5eff7;
}

.rx-sug-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rx-sug-b {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 9px 10px;
}

.rx-sug-n {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 31px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink, #251c2b);
}

.rx-sug-p {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink, #251c2b);
}

.rx-sug-old {
    margin-inline-start: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--ink-3, #7a6a86);
    text-decoration: line-through;
}

@media (min-width: 720px) {
    .rx-sug-card {
        flex: 0 0 152px;
    }

    .rx-sug-n {
        font-size: 12.5px;
    }
}

/* ---- phones: the Categories strip on the shop's home page ---- */
/* Client, 2026-11-17: on the phone version the strip of categories
   (All / Makeup / Perfumes / …) above the grid is not wanted there —
   the bottom tab bar's "Categories" tab opens the same list. Wide
   screens never showed the strip in the first place. */
@media (max-width: 900px) {
    .rx-cats,
    body.rx-shop .rx-cats {
        display: none !important;
        position: static;
        height: auto;
        margin: 0;
        padding: 0;
    }
}

/* ============ the loading circle around the store's logo, 2026-11-17 ========
   The merchant asked for the shop's first moment to carry a circle turning
   around its logo (his message, 2026-11-17), on every store - the ones open
   today and the ones opened later. The white plate that holds the mark is a
   circle now, and a thin ring turns around it: a bright arc sweeping over a
   faint track, the ordinary "working" reading, drawn in the store's own
   splash and gone with it the moment its items are on the page. The rules
   live here, in the shared storefront layer, so no store needs anything. */
#rx-splash .rx-splash-mark {
    position: relative;
    width: 138px;
    height: 138px;
    min-width: 0;
    min-height: 0;
    padding: 18px;
    border-radius: 50%;
}

/* the ring itself: 4px band, 9px clear of the plate */
#rx-splash.has-logo .rx-splash-mark::before {
    content: "";
    position: absolute;
    inset: -9px;
    border-radius: 50%;
    background:
        conic-gradient(from 0deg,
            rgba(255, 255, 255, 0) 0deg,
            rgba(255, 255, 255, 0) 205deg,
            rgba(255, 255, 255, .92) 322deg,
            #fff 360deg),
        rgba(255, 255, 255, .20);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4.5px), #000 calc(100% - 4px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 4.5px), #000 calc(100% - 4px));
    animation: rx-splash-turn 1.15s linear infinite;
}

@keyframes rx-splash-turn {
    to {
        transform: rotate(360deg);
    }
}

/* the plate is round now, so the logo is capped inside it */
#rx-splash-logo {
    max-width: min(46vw, 160px);
    max-height: 88px;
}

@media (prefers-reduced-motion: reduce) {
    #rx-splash.has-logo .rx-splash-mark::before {
        animation: none;
    }
}

/* ============ a clean picture on the product page, 2026-11-17 ==============
   The merchant wants the product's own photo untouched: no discount badge
   (-7%) drawn over it, and no zoom button (the magnifier with the plus) in its
   corner. Both are gone from the photo on every store; the discount still
   reads beside the price, where it belongs. (His message, 2026-11-17.) */
.sf-prodpage .sf-prod-media .sf-off,
.sf-prodpage .sf-prod-media .sf-zoom-open {
    display: none !important;
}

/* the picture is the zoom now that its button is gone (see js/rx-zoomtap.js) */
.sf-prodpage .sf-prod-media .sf-prod-img {
    cursor: zoom-in;
}

/* ============ no Categories strip on a product page, 2026-11-17 ============
   The merchant does not want the chips row (Find my product / All / Perfumes /
   ...) above a single product (his message, 2026-11-17): it filters the grid,
   it has no meaning on one item. js/rx-zoomtap.js marks the page with
   html.rx-prod while a product is open, and only there is the row taken away -
   the shop, the category pages and the search results keep it. The tools row
   that holds it is only the strip's own frame, so it closes with it. */
html.rx-prod .sf-chips {
    display: none !important;
}

html.rx-prod .sf-tools {
    padding-block: 0 !important;
    min-height: 0 !important;
}


/* ===== a slimmer header: three smaller buttons, a wider search, 2026-11-17 ====
   His message with the phone screenshot (2026-11-17): the three round buttons
   took too much of the bar and the search field was left small. The buttons
   shrink to 30px and the gaps close up, so the search gains the room. Scoped to
   the header's own action row, so nothing else on the shop moves. */
.sf-head-in {
    gap: 6px;
}

.sf-head-actions {
    gap: 5px;
}

.sf-head-actions .sf-iconbtn,
.sf-head-actions .rx-more-btn {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
}

.sf-head-actions .sf-iconbtn svg,
.sf-head-actions .rx-wl-top svg {
    width: 16px;
    height: 16px;
}

.sf-head-actions .rx-wl-top .rx-wl-count {
    top: -5px;
    inset-inline-end: -5px;
    min-width: 17px;
    height: 17px;
    line-height: 17px;
    font-size: 10px;
    padding: 0 4px;
}

/* shop filters: the variant option groups are not offered to shoppers */
.sf-filters .sf-foptgroup,
.sf-filters .sf-fblock:has(.sf-foptgroup){display:none!important}

/* closed shop — the platform owner pressed Deactivate (rx-closed.js) */
#rx-closed-card{
    margin: 16px 0 20px;
    padding: 18px 16px;
    border-radius: 16px;
    background: #fff6f6;
    border: 1px solid #f0c8c8;
    box-shadow: 0 6px 22px rgba(120, 20, 20, .08);
}
#rx-closed-card .rx-closed-in{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    text-align: center;
}
#rx-closed-card .rx-closed-mark{
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #b91c1c;
    color: #fff;
    font: 800 22px/1 inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}
#rx-closed-card .rx-closed-text{flex: 1 1 260px}
#rx-closed-card .rx-closed-ar{
    font: 800 20px/1.5 'Cairo', 'Noto Kufi Arabic', system-ui, sans-serif;
    color: #7f1d1d;
    direction: rtl;
}
#rx-closed-card .rx-closed-ar2{
    font: 600 14px/1.7 'Cairo', 'Noto Kufi Arabic', system-ui, sans-serif;
    color: #991b1b;
    direction: rtl;
    margin-top: 2px;
}
#rx-closed-card .rx-closed-en{
    font: 500 12px/1.6 system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: #9c7373;
    margin-top: 6px;
}
@media (max-width: 520px){
    #rx-closed-card{padding: 14px 12px}
    #rx-closed-card .rx-closed-ar{font-size: 17px}
    #rx-closed-card .rx-closed-ar2{font-size: 13px}
    #rx-closed-card .rx-closed-mark{width: 34px;height: 34px;font-size: 18px}
}
