/* Makkah store: 5 selectable designs (data-mk-theme on <html>, saved in localStorage). */

/* ---------- default design: Makkah green ---------- */
html {
    --mk-p: #0f6b63;
    --mk-pd: #0b5a52;
    --mk-pl: #13867a;
    --mk-accent: #f2c94c;
    --mk-tint: #f4faf8;
    --mk-border: #dcebe8;
    --mk-filter: none;
    --mk-radius: 16px;
}
html[data-mk-theme="night"]  { --mk-p: #34d399; --mk-pd: #0b3d36; --mk-pl: #10a37f; --mk-accent: #f2c94c; --mk-tint: #13292a; --mk-border: #25403d; --mk-filter: saturate(.95); --mk-radius: 16px; }

/* store colour tokens follow the chosen design (inline style is beaten by !important) */
html .araa-store {
    --st-primary: var(--mk-p) !important;
    --st-primary-600: var(--mk-pl) !important;
    --st-primary-700: var(--mk-pd) !important;
    --st-tint: var(--mk-tint) !important;
    --st-tint-2: var(--mk-tint) !important;
    --st-radius: var(--mk-radius) !important;
}

/* category / offers banners: recolour the artwork with a hue rotation */
.araa-store__banner.araa-store__banner--makkah { background: var(--mk-pd) !important; position: relative; isolation: isolate; }
.araa-store__banner--makkah::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: url("../img/category-banner.webp") center / cover no-repeat; filter: none; }
@media (max-width: 760px) {
    .araa-store__banner.araa-store__banner--makkah { background: var(--mk-pd) !important; }
    .araa-store__banner--makkah::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(90deg, rgba(0,0,0,.12), rgba(0,0,0,.6)); }
}

/* gold / red banners keep their meaning; gold adapts a little */
html[data-mk-theme="night"] .mk-ban--new { background: linear-gradient(120deg, #b8860b, #8a6508); color: #fff7d6; }

/* ---------- night (dark) design ---------- */
html[data-mk-theme="night"] .araa-store { background: #0e1a19; color: #e3efec; --st-text: #e3efec !important; --st-ink: #061110; }
html[data-mk-theme="night"] .araa-store h1, html[data-mk-theme="night"] .araa-store h2, html[data-mk-theme="night"] .araa-store h3, html[data-mk-theme="night"] .araa-store h4 { color: #f1f8f6; }
html[data-mk-theme="night"] .araa-store p, html[data-mk-theme="night"] .araa-store__head-text { color: #b9cdc9; }
html[data-mk-theme="night"] .araa-store__header { background: rgba(14, 26, 25, .96); border-color: #25403d; }
html[data-mk-theme="night"] .araa-store__nav a, html[data-mk-theme="night"] .araa-store__nav button { color: #d8e8e4; }
html[data-mk-theme="night"] .araa-store__nav-menu { background: #15282a; border-color: #25403d; }
html[data-mk-theme="night"] .araa-store__search { background: #15282a; border-color: #25403d; color: #e3efec; }
html[data-mk-theme="night"] .araa-store__search input { color: #e3efec; background: transparent; }
html[data-mk-theme="night"] .araa-store__section, html[data-mk-theme="night"] .araa-store__section--tinted { background: transparent; }
html[data-mk-theme="night"] .araa-store__section--tinted { background: #101f1e; }
html[data-mk-theme="night"] .araa-store__card, html[data-mk-theme="night"] .araa-store__feature, html[data-mk-theme="night"] .araa-store__form,
html[data-mk-theme="night"] .mk-order, html[data-mk-theme="night"] .mk-stat, html[data-mk-theme="night"] .mk-table-wrap, html[data-mk-theme="night"] .mk-details > div,
html[data-mk-theme="night"] .araa-store__quick-box, html[data-mk-theme="night"] .mk-cart__box { background: #15282a; border-color: #25403d; color: #e3efec; }
html[data-mk-theme="night"] .araa-store__card-media, html[data-mk-theme="night"] .araa-store__card-media img.araa-store__ph { background: #1b3335; }
html[data-mk-theme="night"] .araa-store__card h3 { color: #6ee7b7; }
html[data-mk-theme="night"] .araa-store__price, html[data-mk-theme="night"] .araa-store__price span { color: #f1f8f6; }
html[data-mk-theme="night"] .mk-qty { background: #1b3335; border-color: #25403d; }
html[data-mk-theme="night"] .mk-qty button { background: #223d3f; color: #6ee7b7; }
html[data-mk-theme="night"] .mk-qty input { color: #f1f8f6; }
html[data-mk-theme="night"] .mk-table th { background: #1b3335; color: #6ee7b7; }
html[data-mk-theme="night"] .mk-table td { border-color: #25403d; color: #e3efec; }
html[data-mk-theme="night"] .mk-line, html[data-mk-theme="night"] .mk-cart__head, html[data-mk-theme="night"] .mk-cart__foot { border-color: #25403d; }
html[data-mk-theme="night"] .mk-line__name, html[data-mk-theme="night"] .mk-cart__sum { color: #f1f8f6; }
html[data-mk-theme="night"] .mk-steps li { background: #1b3335; color: #8fb0aa; }
html[data-mk-theme="night"] .mk-steps li.is-done { background: #14513f; color: #b6f3d8; }
html[data-mk-theme="night"] .mk-steps li.is-current { background: #34d399; color: #04241b; }
html[data-mk-theme="night"] .mk-subs a, html[data-mk-theme="night"] .araa-store__subs a { background: #15282a; border-color: #25403d; color: #6ee7b7; }
html[data-mk-theme="night"] .araa-store__subs a.is-active { background: #34d399; color: #04241b; }
html[data-mk-theme="night"] .mk-cart__note textarea, html[data-mk-theme="night"] .mk-when__row select, html[data-mk-theme="night"] .mk-rate input[type=text] { background: #1b3335; color: #e3efec; border-color: #25403d; }
html[data-mk-theme="night"] .mk-redeem, html[data-mk-theme="night"] .mk-note { background: #2a2a14; border-color: #5b5a1d; color: #f2e7a8; }
html[data-mk-theme="night"] .araa-store__btn--outline { background: transparent; color: #6ee7b7; border-color: #34d399; }
html[data-mk-theme="night"] .araa-store__btn--primary { color: #04241b; }
html[data-mk-theme="night"] .araa-store__empty { color: #8fb0aa; }

/* ---------- theme button + menu in the header ---------- */
.mk-themes { position: relative; }
.mk-themes__btn { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--mk-border); background: #fff; color: var(--mk-p); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.mk-themes__btn:hover { background: var(--mk-tint); }
.mk-themes__btn .ti { font-size: 19px; }
.mk-themes__menu { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 80; width: 250px; padding: 8px; background: #fff; border: 1px solid var(--mk-border); border-radius: 14px; box-shadow: 0 14px 36px rgba(0,0,0,.18); }
.mk-themes__menu[hidden] { display: none; }
.mk-themes__menu h4 { margin: 4px 8px 8px; font-size: 13px; color: #5b6b68; font-weight: 700; }
.mk-theme-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 2px solid transparent; border-radius: 10px; background: transparent; font: inherit; font-weight: 700; font-size: 14px; color: #12302d; cursor: pointer; text-align: start; }
.mk-theme-opt:hover { background: #f1f5f4; }
.mk-theme-opt[aria-pressed="true"] { border-color: var(--mk-p); background: var(--mk-tint); }
.mk-theme-opt i { flex: none; width: 34px; height: 24px; border-radius: 7px; background: linear-gradient(90deg, var(--c1) 0 55%, var(--c2) 55% 100%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.mk-theme-opt small { display: block; font-weight: 500; font-size: 12px; color: #6b7b78; }
html[data-mk-theme="night"] .mk-themes__btn { background: #15282a; border-color: #25403d; color: #6ee7b7; }
html[data-mk-theme="night"] .mk-themes__menu { background: #15282a; border-color: #25403d; }
html[data-mk-theme="night"] .mk-theme-opt { color: #e3efec; } html[data-mk-theme="night"] .mk-theme-opt:hover { background: #1b3335; }
@media (max-width: 560px) { .mk-themes__btn span { display: none; } .mk-themes__btn { padding: 0 11px; } .mk-themes__menu { inset-inline-end: -40px; } }

/* night: keep the dark-green logo readable on dark surfaces */
html[data-mk-theme="night"] .araa-store__brand img,
html[data-mk-theme="night"] .araa-store__header img[width="46"],
html[data-mk-theme="night"] .araa-store__footer img[width="40"],
html[data-mk-theme="night"] .mk-ccard__brand img { background: #fff; border-radius: 10px; padding: 3px 6px; }
html[data-mk-theme="night"] .araa-store__card-media { background: #f4faf8; }
html[data-mk-theme="night"] .araa-store__card-media img.araa-store__ph { background: #f4faf8; }


/* ---- banners: the original artwork (and real logo colours) stay as they are in the green design;
        the other designs get a clean gradient with the logo on a white card ---- */
.araa-store__banner--makkah .mk-ban__logo--theme { display: none; }
html[data-mk-theme] .araa-store__banner.araa-store__banner--makkah { background: linear-gradient(120deg, var(--mk-pl) 0%, var(--mk-pd) 100%) !important; }
html[data-mk-theme] .araa-store__banner--makkah::before { background: radial-gradient(circle at 12% 25%, rgba(255,255,255,.28) 0 2px, transparent 3px), radial-gradient(circle at 45% 75%, rgba(255,255,255,.22) 0 2px, transparent 3px), radial-gradient(circle at 80% 30%, rgba(255,255,255,.25) 0 2px, transparent 3px), linear-gradient(110deg, transparent 55%, rgba(255,255,255,.10) 55% 56%, transparent 56%); background-size: 90px 90px, 90px 90px, 90px 90px, 100% 100%; }
html[data-mk-theme] .araa-store__banner--makkah::after { display: none; }
html[data-mk-theme] .araa-store__banner--makkah .mk-ban__logo--theme { display: flex; justify-self: center; position: relative; width: clamp(90px, 14vw, 150px); height: clamp(90px, 14vw, 150px); padding: 10px; background: #fff; border-radius: 26px; box-shadow: 0 10px 26px rgba(0,0,0,.22); transform: rotate(-4deg); }
html[data-mk-theme] .araa-store__banner--makkah .mk-ban__logo--theme img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 760px) { html[data-mk-theme] .araa-store__banner--makkah .mk-ban__logo--theme { display: none; } }
