/*
 * SnapOS site harmony layer: makes the store look like snapos.cloud
 * (Readex Pro, soft black ink, white / #f5f5f7 sections, pill buttons, light glass header, light grey footer).
 * Colours go through the --st-* tokens, so the «المظهر» styles (emerald / violet / sunset) still recolour everything.
 */
@media screen {
    .snap-store,
    .snap-login-modal {
        --st-text: #1d1d1f;
        --st-muted: #6e6e73;
        --st-line: #e3e3e8;
        --st-gray: #f5f5f7;
        --st-shadow: 0 1px 2px rgba(11, 27, 51, 0.06), 0 4px 14px rgba(11, 27, 51, 0.06);
    }

    .snap-store,
    .snap-store h1,
    .snap-store h2,
    .snap-store h3,
    .snap-store h4 {
        font-family: "Readex Pro", system-ui, "Segoe UI", Tahoma, sans-serif !important;
    }

    .snap-store {
        font-weight: 400;
    }

    .snap-store h1,
    .snap-store h2,
    .snap-store h3 {
        font-weight: 700;
        letter-spacing: -0.01em;
    }

    /* Buttons: full pill like the site */
    .snap-store__btn {
        border-radius: 980px;
        font-weight: 600;
    }

    .snap-store__btn--primary {
        box-shadow: 0 14px 34px -12px color-mix(in srgb, var(--st-primary) 60%, transparent);
    }

    /* Header: white glass, 60px, wordmark logo */
    .snap-store__header {
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        background: rgba(251, 251, 253, 0.8);
        -webkit-backdrop-filter: saturate(1.8) blur(20px);
        backdrop-filter: saturate(1.8) blur(20px);
    }

    .snap-store__header-in {
        min-height: 64px;
        gap: 14px;
    }

    .snap-store__nav {
        gap: 0;
        margin-inline-start: 0;
    }

    .snap-store__brand--logo img {
        width: auto;
        height: 30px;
        border-radius: 0;
    }

    .snap-store__nav > a,
    .snap-store__nav-drop > button {
        padding: 8px 9px;
        color: rgba(29, 29, 31, 0.8);
        white-space: nowrap;
        font-size: 14px;
        font-weight: 500;
    }

    .snap-store__nav > a:hover,
    .snap-store__nav-drop > button:hover,
    .snap-store__nav > a.is-active {
        background: transparent;
        color: var(--st-primary);
    }

    .snap-store__lang {
        color: rgba(29, 29, 31, 0.8);
        font-size: 13.5px;
        font-weight: 600;
        white-space: nowrap;
    }

    .snap-store__lang:hover {
        color: var(--st-primary);
    }

    .snap-store__search input {
        border-radius: 980px;
    }

    /* Hero: light, black title, the key words in brand blue */
    .snap-store__hero {
        background: #fff;
        background-image: none;
        color: var(--st-text);
    }

    .snap-store__hero::before {
        background-image: linear-gradient(rgba(11, 27, 51, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(11, 27, 51, 0.045) 1px, transparent 1px);
        mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
        -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
    }

    .snap-store__hero .snap-store__tag {
        gap: 8px;
        background: var(--st-tint);
        color: var(--st-primary-600);
        font-weight: 600;
    }

    .snap-store__hero .snap-store__tag::before {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--st-accent);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--st-accent) 20%, transparent);
        content: "";
    }

    .snap-store__slide-text h1,
    .snap-store__slide-text .snap-store__slide-title {
        color: var(--st-text);
    }

    .snap-store__hl {
        color: var(--st-primary);
    }

    .snap-store__slide-text p {
        color: var(--st-muted);
    }

    .snap-store__hero .snap-store__btn--light {
        background: var(--st-primary);
        color: #fff !important;
        box-shadow: 0 14px 34px -12px color-mix(in srgb, var(--st-primary) 60%, transparent);
    }

    .snap-store__hero .snap-store__btn--light:hover {
        background: var(--st-primary-600);
    }

    .snap-store__hero .snap-store__btn--ghost {
        border-color: var(--st-primary);
        background: transparent;
        color: var(--st-primary) !important;
    }

    .snap-store__hero .snap-store__btn--ghost:hover {
        background: var(--st-tint);
    }

    .snap-store__slide-card {
        border: 1px solid var(--st-line);
        box-shadow: 0 10px 40px -10px rgba(11, 27, 51, 0.22);
    }

    .snap-store__dots button {
        background: rgba(29, 29, 31, 0.2);
    }

    .snap-store__dots button.is-active {
        background: var(--st-primary);
    }

    /* Sections alternate white / light grey like the site */
    .snap-store__section--tinted,
    .snap-store__category:nth-of-type(odd) {
        background: var(--st-gray);
    }

    html[data-store-style] .snap-store__section--tinted,
    html[data-store-style] .snap-store__category:nth-of-type(odd) {
        background: var(--st-tint-2);
    }

    /* Call to action: rounded gradient card (the site's lead box) */
    .snap-store__cta {
        padding: 56px 0;
        background: #fff;
    }

    .snap-store__cta-in {
        position: relative;
        overflow: hidden;
        padding: 44px 48px;
        border-radius: 32px;
        background: linear-gradient(135deg, var(--st-primary-700) 0%, var(--st-primary) 60%, var(--st-accent) 130%);
        box-shadow: 0 10px 40px -10px rgba(11, 27, 51, 0.22);
    }

    .snap-store__cta-in::before {
        position: absolute;
        top: -240px;
        inset-inline-end: -160px;
        width: 520px;
        height: 520px;
        border-radius: 50%;
        background: radial-gradient(rgba(255, 255, 255, 0.16), transparent 70%);
        content: "";
        pointer-events: none;
    }

    .snap-store__cta-in > * {
        position: relative;
    }

    /* Footer: light grey, 4 columns like the site */
    .snap-store__footer {
        padding: 56px 0 24px;
        border-top: 1px solid #d2d2d7;
        background: var(--st-gray);
        color: var(--st-muted);
        font-size: 13.5px;
    }

    html[data-store-style] .snap-store__footer {
        background: var(--st-tint-2);
    }

    .snap-store__fgrid {
        display: grid;
        grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
        gap: 34px;
        margin-bottom: 36px;
    }

    .snap-store__footer .snap-store__brand--logo img {
        height: 34px;
    }

    .snap-store__footer p {
        max-width: 340px;
        margin-top: 14px;
        line-height: 1.8;
    }

    .snap-store__f-h {
        margin: 0 0 14px !important;
        color: var(--st-text) !important;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.4;
    }

    .snap-store__footer ul {
        display: grid;
        gap: 9px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .snap-store__footer a {
        color: var(--st-muted);
    }

    .snap-store__footer a:hover {
        color: var(--st-text);
    }

    .snap-store__footer .snap-store__ph {
        display: flex;
        justify-content: space-between;
        gap: 10px;
    }

    .snap-store__socials--footer {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 18px;
    }

    .snap-store__socials--footer a {
        display: grid;
        width: 40px;
        height: 40px;
        border: 0;
        border-radius: 12px;
        background: #fff;
        color: var(--st-text);
        place-items: center;
    }

    .snap-store__socials--footer a:hover {
        color: var(--st-primary);
    }

    .snap-store__copy {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 12px;
        padding-top: 20px;
        border-top: 1px solid #d2d2d7;
        font-size: 13px;
    }

    @media (max-width: 900px) {
        .snap-store__fgrid {
            grid-template-columns: 1fr 1fr;
        }

        .snap-store__fgrid > :first-child {
            grid-column: 1 / -1;
        }

        .snap-store__cta-in {
            padding: 28px 20px;
            border-radius: 24px;
        }

        .snap-store__lang {
            display: none;
        }
    }

    @media (max-width: 520px) {
        .snap-store__fgrid {
            grid-template-columns: 1fr;
        }

        .snap-store__brand--logo img {
            height: 26px;
        }
    }
}

/* «كن على تواصل معنا»: same plain list as the site footer (country right, number left, no icons) */
@media screen {
    .snap-store__contact-list--site {
        display: grid;
        gap: 12px;
        max-width: 380px;
        margin: 0;
        padding: 0;
        list-style: none;
        font-size: 15px;
    }

    .snap-store__contact-list--site li {
        display: block;
    }

    .snap-store__contact-list--site a {
        padding: 0;
        color: var(--st-muted);
        font-weight: 400;
        transition: color 150ms ease;
    }

    .snap-store__contact-list--site a:hover {
        color: var(--st-text);
    }

    .snap-store__contact-list--site .snap-store__ph {
        display: flex;
        justify-content: space-between;
        gap: 10px;
    }

    .snap-store__contact-list--site span {
        padding: 0;
    }

    .snap-store__contact-list--site + .snap-store__socials {
        margin-top: 22px;
    }
}

/* Order box («اطلب عرض سعر»): same design as the SnapOS site free-trial box */
@media screen {
    .snap-order {
        position: relative;
        display: grid;
        grid-template-columns: 1fr 1.05fr;
        gap: 44px;
        overflow: hidden;
        padding: 52px;
        border-radius: 36px;
        background: linear-gradient(135deg, var(--st-primary-600) 0%, var(--st-primary) 55%, color-mix(in srgb, var(--st-accent) 70%, #0a8a55) 140%);
        color: #fff;
        text-align: start;
    }

    .snap-order::before {
        position: absolute;
        top: -240px;
        inset-inline-end: -160px;
        width: 520px;
        height: 520px;
        border-radius: 50%;
        background: radial-gradient(rgba(255, 255, 255, 0.16), transparent 70%);
        content: "";
        pointer-events: none;
    }

    .snap-order__copy,
    .snap-order__form {
        position: relative;
        z-index: 1;
    }

    .snap-order__eyebrow {
        display: inline-flex;
        margin-bottom: 14px;
        padding: 6px 14px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.14);
        color: #fff;
        font-size: 13.5px;
        font-weight: 600;
        opacity: 0.9;
    }

    .snap-store .snap-order h2 {
        margin-bottom: 14px;
        color: #fff;
        font-size: clamp(28px, 3.6vw, 44px);
        line-height: 1.25;
    }

    .snap-order__copy > p {
        margin-bottom: 24px;
        font-size: 17px;
        opacity: 0.9;
    }

    .snap-order__points {
        display: grid;
        gap: 10px;
        margin: 0 0 26px;
        padding: 0;
        list-style: none;
    }

    .snap-order__points li {
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 500;
    }

    .snap-order__points svg {
        flex-shrink: 0;
        width: 22px;
        height: 22px;
        color: #8af0a8;
    }

    .snap-store .snap-order__hours {
        margin: -6px 0 18px;
        font-size: 14px;
        opacity: 0.85;
    }

    .snap-order__contact {
        display: grid;
        gap: 8px;
        max-width: 360px;
    }

    .snap-store .snap-order__contact a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 14px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        font-size: 14.5px;
        transition: background 0.2s;
    }

    .snap-store .snap-order__contact a:hover {
        background: rgba(255, 255, 255, 0.22);
    }

    .snap-order__contact a span:first-child {
        display: flex;
        align-items: center;
        gap: 8px;
        opacity: 0.9;
    }

    .snap-order__contact .snap-store__icon {
        width: 18px;
        height: 18px;
    }

    .snap-order__form {
        padding: 28px;
        border-radius: 28px;
        background: #fff;
        color: var(--st-text);
    }

    .snap-store .snap-order__form h3 {
        margin-bottom: 16px;
        font-size: 19px;
    }

    .snap-order__product {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 14px;
        padding: 10px 14px;
        border-radius: 12px;
        background: var(--st-tint);
        color: var(--st-primary-700);
        font-weight: 600;
    }

    .snap-order__grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .snap-order__field {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .snap-order__field.is-full {
        grid-column: 1 / -1;
    }

    .snap-order__field label {
        margin: 0;
        color: #22324d;
        font-size: 14px;
        font-weight: 600;
    }

    .snap-order__opt {
        color: #8a99ae;
        font-weight: 400;
    }

    .snap-order__field input,
    .snap-order__field select {
        width: 100%;
        height: 50px;
        padding: 0 14px;
        border: 1.5px solid transparent;
        border-radius: 12px;
        background: var(--st-gray, #f5f5f7);
        color: var(--st-text);
        font: inherit;
        font-size: 16px;
        transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    }

    .snap-order__field input:focus,
    .snap-order__field select:focus {
        border-color: var(--st-primary);
        background: #fff;
        outline: none;
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--st-primary) 14%, transparent);
    }

    .snap-order__tel {
        display: flex;
        gap: 8px;
        direction: ltr;
    }

    .snap-order__tel select {
        flex: 0 0 auto;
        width: auto;
        min-width: 96px;
        padding: 0 8px 0 10px;
    }

    .snap-order__tel input {
        flex: 1 1 auto;
        min-width: 0;
        text-align: left;
    }

    .snap-order__msg {
        display: none;
        color: #f04452;
        font-size: 12.5px;
    }

    .snap-order__field.is-err input,
    .snap-order__field.is-err select {
        border-color: #f04452;
        background: #fff5f6;
    }

    .snap-order__field.is-err .snap-order__msg {
        display: block;
    }

    .snap-order__hp {
        position: absolute !important;
        left: -9999px !important;
        width: 1px;
        height: 1px;
        opacity: 0;
    }

    .snap-store .snap-order__form .snap-store__btn {
        width: 100%;
        min-height: 54px;
        margin-top: 16px;
        font-size: 16.5px;
    }

    .snap-store .snap-order__wa {
        margin-top: 12px !important;
        background: #13a83a;
        color: #fff !important;
        box-shadow: 0 14px 30px -12px rgba(19, 168, 58, 0.6);
    }

    .snap-store .snap-order__wa:hover {
        background: #0f9433;
    }

    .snap-order__wa .snap-store__icon {
        width: 24px;
        height: 24px;
    }

    .snap-order__alt {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-top: 12px;
        color: #8a99ae;
        font-size: 13px;
    }

    .snap-order__alt::before,
    .snap-order__alt::after {
        flex: 1;
        height: 1px;
        background: #e3eaf3;
        content: "";
    }

    .snap-order__spin {
        display: none;
        width: 18px;
        height: 18px;
        border: 2px solid rgba(255, 255, 255, 0.5);
        border-top-color: #fff;
        border-radius: 50%;
        animation: snap-order-spin 0.8s linear infinite;
    }

    .snap-order__submit.is-busy .snap-order__spin {
        display: inline-block;
    }

    .snap-order__submit[disabled] {
        opacity: 0.8;
        cursor: progress;
    }

    @keyframes snap-order-spin {
        to { transform: rotate(360deg); }
    }

    .snap-order__status {
        display: none;
        margin-top: 14px;
        padding: 14px;
        border-radius: 12px;
        font-size: 14.5px;
        line-height: 1.6;
    }

    .snap-order__status.is-show {
        display: block;
    }

    .snap-order__status.is-ok {
        border: 1px solid #b9efc8;
        background: #e8fbee;
        color: #0d6b27;
    }

    .snap-order__status.is-error {
        border: 1px solid #ffd0d6;
        background: #fff2f3;
        color: #a3162a;
    }

    .snap-store .snap-order__privacy {
        margin-top: 12px;
        color: #8a99ae;
        font-size: 12.5px;
        text-align: center;
    }

    @media (max-width: 1100px) {
        .snap-order {
            gap: 28px;
            padding: 36px;
        }
    }

    @media (max-width: 900px) {
        .snap-order {
            grid-template-columns: 1fr;
            padding: 26px 16px;
            border-radius: 24px;
        }

        .snap-order__form {
            padding: 20px 16px;
        }

        .snap-order__grid {
            grid-template-columns: 1fr;
        }
    }
}

@media screen {
    .snap-store__section--order {
        background: #fff;
    }

    .snap-store__sr-only {
        position: absolute !important;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

/* Snap Solutions brand (icon + name) in header and footer */
@media screen {
    .snap-store__brand--name img {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .snap-store__brand--name strong {
        color: var(--st-text);
        font-family: "Readex Pro", "Segoe UI", sans-serif;
        font-size: 21px;
        font-weight: 700;
        letter-spacing: 0;
        white-space: nowrap;
    }

    .snap-store__brand--name small {
        margin-top: 3px;
        color: var(--st-primary);
        font-size: 12px;
        font-weight: 500;
        white-space: nowrap;
    }

    .snap-store__footer .snap-store__brand--name strong {
        color: var(--st-text);
    }

    @media (max-width: 520px) {
        .snap-store__header .snap-store__brand--name img {
            width: 34px;
            height: 34px;
        }

        .snap-store__header .snap-store__brand--name strong {
            font-size: 17px;
        }

        .snap-store__header .snap-store__brand--name small {
            display: none;
        }
    }
}

/* «الموقع» button: opens the SnapOS site in the current language */
@media screen {
    .snap-store__site-btn {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        height: 40px;
        padding: 0 14px;
        border: 1px solid var(--st-primary);
        border-radius: 980px;
        color: var(--st-primary) !important;
        font-size: 14px;
        font-weight: 600;
        white-space: nowrap;
        transition: background 150ms ease, color 150ms ease;
    }

    .snap-store__site-btn:hover {
        background: var(--st-primary);
        color: #fff !important;
    }

    .snap-store__site-btn .snap-store__icon {
        width: 18px;
        height: 18px;
    }

    @media (max-width: 520px) {
        .snap-store__site-btn {
            width: 40px;
            padding: 0;
            justify-content: center;
        }

        .snap-store__site-btn span {
            display: none;
        }
    }
}

/* Desktop header fit: Arabic and the longer English labels must never overflow the header */
@media screen and (min-width: 981px) {
    .snap-store__header .snap-store__wrap {
        width: min(1440px, 100%);
    }

    .snap-store__header-in {
        gap: 10px;
    }

    .snap-store__header-tools {
        gap: 8px;
    }

    .snap-store__nav > a,
    .snap-store__nav-drop > button {
        padding: 8px 7px;
    }

    .snap-store__search {
        width: 170px;
    }
}

@media screen and (min-width: 981px) and (max-width: 1400px) {
    .snap-store__brand--name small,
    .snap-store__style-label {
        display: none;
    }

    .snap-store__search {
        width: 140px;
    }
}

@media screen and (min-width: 1181px) and (max-width: 1300px) {
    .snap-store__login-btn {
        width: 44px;
        padding: 0;
    }

    .snap-store__login-btn span {
        display: none;
    }

    .snap-store__nav > a,
    .snap-store__nav-drop > button {
        padding: 8px 5px;
        font-size: 13.5px;
    }

    .snap-store__search {
        width: 120px;
    }
}

/* 981px - 1180px: the menu moves behind the ☰ button (same dropdown as tablets) so the header always fits */
@media screen and (min-width: 981px) and (max-width: 1180px) {
    .snap-store__menu-btn {
        display: inline-flex;
    }

    .snap-store__nav {
        position: absolute;
        top: 100%;
        inset-inline: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        margin: 0;
        padding: 12px 20px 18px;
        border-bottom: 1px solid var(--st-line);
        background: #fff;
        box-shadow: var(--st-shadow);
    }

    .snap-store__nav.is-open {
        display: flex;
    }

    .snap-store__nav-menu {
        position: static;
        display: grid;
        min-width: 0;
        max-height: none;
        margin-top: 4px;
        border: 0;
        box-shadow: none;
        background: var(--st-tint-2);
    }

    .snap-store__nav-drop > button span {
        display: none;
    }

    .snap-store__header-in {
        justify-content: space-between;
    }
}
