/* pm-base: shared primitives for the product-* templates (namespace pm-).
   Fonts (Cairo, local), buttons, skeleton lines, FAQ accordion, tabs, sticky CTA, toast.
   Every template sets its own tokens on `.pm` and adds its own prefixed layout CSS. */
@font-face { font-family: "Cairo"; src: url("../assets/fonts/cairo-arabic.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Cairo"; src: url("../assets/fonts/cairo-latin-ext.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cairo"; src: url("../assets/fonts/cairo-latin.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

.pm {
  /* tokens: override per template */
  --pm-ink: #14151f; --pm-bg: #fff; --pm-surface: #fff; --pm-brand: #3b2fb5; --pm-on-brand: #fff;
  --pm-cta: #ffb020; --pm-on-cta: #14151f; --pm-muted: #51556a; --pm-line: #dcdde6; --pm-soft: #f3f3f8;
  --pm-btn-r: 12px; --pm-btn-bd: 2px solid var(--pm-ink); --pm-btn-sh: 0 4px 0 var(--pm-ink);
  --pm-font: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --pm-pad: 18px;
  margin: 0; background: var(--pm-bg); color: var(--pm-ink); font-family: var(--pm-font);
  font-size: 1.0625rem; line-height: 1.9; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  padding-bottom: 84px;
}
.pm *, .pm *::before, .pm *::after { box-sizing: border-box; }
.pm a { color: inherit; }
.pm button, .pm input { font-family: inherit; }
.pm :focus-visible { outline: 3px solid var(--pm-focus, var(--pm-brand)); outline-offset: 3px; border-radius: 6px; }
.pm [hidden] { display: none !important; }
.pm-wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--pm-pad); }
.pm-num { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.pm-skip { position: absolute; inset-inline-start: 12px; top: -90px; background: var(--pm-ink); color: #fff !important; padding: 10px 18px; z-index: 2000; border-radius: 8px; }
.pm-skip:focus { top: 10px; }
.pm-ico { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pm-h { margin: 0; font-weight: 800; text-wrap: balance; }

/* buttons */
.pm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 10px 26px; background: var(--pm-cta); color: var(--pm-on-cta) !important; border: var(--pm-btn-bd); border-radius: var(--pm-btn-r); box-shadow: var(--pm-btn-sh); font-weight: 900; font-size: 1.08rem; line-height: 1.3; text-decoration: none; cursor: pointer; transition: transform .14s, box-shadow .14s, filter .14s; }
.pm-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.pm-btn:active { transform: translateY(3px); box-shadow: none; filter: brightness(.94); }
.pm-btn--ghost { background: transparent; color: inherit !important; box-shadow: none; }
.pm-btn--ghost:hover { background: color-mix(in srgb, currentColor 10%, transparent); filter: none; }
.pm-btn--block { width: 100%; }
.pm-btn--lg { min-height: 60px; font-size: 1.18rem; padding-inline: 32px; }
.pm-btn--sm { min-height: 44px; padding: 4px 18px; font-size: .96rem; }
.pm-link { font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
.pm-link:hover { text-decoration-color: currentColor; }
.pm-cta { display: flex; flex-direction: column; gap: 14px; align-items: stretch; margin-top: 28px; }

/* skeleton lines for CSS-built product mockups */
.pm-ln { display: block; height: 5px; width: var(--w, 100%); background: color-mix(in srgb, var(--pm-ink) 16%, #fff); border-radius: 3px; }
.pm-ln--b { background: var(--pm-brand); } .pm-ln--c { background: var(--pm-cta); } .pm-ln--k { background: var(--pm-ink); }
.pm-chk { display: flex; align-items: center; gap: 7px; }
.pm-chk::before { content: ""; width: 11px; height: 11px; flex: none; border-radius: 3px; border: 2px solid color-mix(in srgb, var(--pm-ink) 40%, #fff); }
.pm-chk.on::before { background: #168a57 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.3l2.3 2.3 4.7-5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; border-color: #168a57; }

/* FAQ accordion (Bootstrap collapse) */
.pm .accordion { --bs-accordion-bg: transparent; --bs-accordion-border-color: var(--pm-line); --bs-accordion-border-radius: 0; --bs-accordion-inner-border-radius: 0; --bs-accordion-btn-focus-box-shadow: none; --bs-accordion-active-bg: transparent; --bs-accordion-active-color: var(--pm-brand); --bs-accordion-btn-padding-x: 0; --bs-accordion-body-padding-x: 0; }
.pm .accordion-item { border-inline: 0; border-top: 0; background: transparent; }
.pm .accordion-item:first-child { border-top: 1px solid var(--pm-line); }
.pm .accordion-button { font-family: var(--pm-font); font-weight: 800; font-size: 1.06rem; line-height: 1.6; padding-block: 18px; background: transparent; box-shadow: none; gap: 14px; color: inherit; }
.pm .accordion-button:not(.collapsed) { color: var(--pm-brand); box-shadow: none; }
.pm .accordion-button:focus-visible { outline: 3px solid var(--pm-focus, var(--pm-brand)); outline-offset: 2px; }
.pm .accordion-body { padding-top: 0; padding-bottom: 20px; color: var(--pm-muted); line-height: 1.95; max-width: 44em; }

/* generic tabs */
.pm-tabs { display: flex; gap: 6px; padding: 5px; background: var(--pm-soft); border-radius: 14px; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; }
.pm-tabs::-webkit-scrollbar { display: none; }
.pm-tabs button { flex: none; border: 0; background: transparent; color: inherit; font-weight: 800; font-size: .96rem; line-height: 1.4; padding: 9px 18px; border-radius: 10px; cursor: pointer; opacity: .75; }
.pm-tabs button:hover { opacity: 1; }
.pm-tabs button[aria-selected="true"] { background: var(--pm-ink); color: #fff; opacity: 1; }
.pm-panel[hidden] { display: none; }
.pm-panel.is-in { animation: pm-in .3s ease; }
@keyframes pm-in { from { opacity: 0; transform: translateY(8px); } }

/* sticky mobile CTA + toast + progress */
.pm-sticky { position: fixed; inset-inline: 0; bottom: 0; z-index: 1030; display: flex; align-items: center; gap: 12px; padding: 10px var(--pm-pad) calc(10px + env(safe-area-inset-bottom)); background: var(--pm-surface); color: var(--pm-ink); border-top: 2px solid var(--pm-ink); transform: translateY(110%); transition: transform .28s; }
.pm-sticky.is-visible { transform: none; }
.pm-sticky__p { line-height: 1.15; flex: none; }
.pm-sticky__p small { display: block; font-size: .74rem; color: var(--pm-muted); font-weight: 700; }
.pm-sticky__p b { font-size: 1.4rem; font-weight: 900; }
.pm-sticky .pm-btn { flex: 1; min-height: 50px; padding-inline: 12px; font-size: 1.02rem; }
.pm-toast { position: fixed; inset-inline: 16px; bottom: 96px; margin-inline: auto; max-width: 420px; z-index: 1040; background: var(--pm-ink); color: #fff; border-radius: 12px; padding: 12px 18px; font-size: .95rem; line-height: 1.7; opacity: 0; pointer-events: none; transition: opacity .2s; }
.pm-toast.is-visible { opacity: 1; }
.pm-progress { position: fixed; inset-inline: 0; top: 0; height: 4px; z-index: 1050; background: transparent; }
.pm-progress i { display: block; height: 100%; width: 0; background: var(--pm-cta); transition: width .1s linear; }

@media (min-width: 576px) { .pm-cta { flex-direction: row; align-items: center; gap: 18px; flex-wrap: wrap; } }
@media (min-width: 768px) { .pm { --pm-pad: 28px; } }
@media (min-width: 992px) { .pm { padding-bottom: 0; } .pm-sticky { display: none; } .pm-toast { bottom: 28px; } }
@media (prefers-reduced-motion: reduce) { .pm *, .pm *::before, .pm *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* offers (pm-offers.js): price, empty state, details dialog, filter/limit helpers */
[data-pmo-hide] { display: none !important; }
.pmo-price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; } .pmo-now { font-weight: 900; } .pmo-was { color: var(--pm-muted); font-size: .88em; font-weight: 600; }
.pmo-off { display: inline-block; background: var(--pm-soft); color: var(--pm-ink); border-radius: 6px; padding: 0 8px; font-size: .78rem; font-weight: 800; line-height: 1.9; }
.pmo-empty { border: 2px dashed var(--pm-line); border-radius: 18px; padding: 28px 22px; text-align: center; color: var(--pm-muted); display: grid; gap: 6px; justify-items: center; } .pmo-empty b { color: var(--pm-ink); font-size: 1.1rem; } .pmo-empty p { margin: 0; }
.pmo-error { color: #b3261e; font-weight: 700; }
.pmo-dialog { width: min(92vw, 480px); max-height: 88vh; border: 2px solid var(--pm-ink); border-radius: 20px; padding: 0; background: var(--pm-surface); color: var(--pm-ink); font-family: var(--pm-font); overflow: auto; }
.pmo-dialog::backdrop { background: rgba(10, 10, 20, .55); }
.pmo-dialog__x { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; margin: 0; } .pmo-dialog__x button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.8rem; line-height: 1; cursor: pointer; color: inherit; }
.pmo-dialog__b { padding: 26px 22px 22px; display: grid; gap: 10px; } .pmo-dialog__b h2 { margin: 0; font-size: 1.4rem; font-weight: 900; padding-inline-end: 34px; } .pmo-dialog__b p { margin: 0; color: var(--pm-muted); } .pmo-dialog__t { font-weight: 800; font-size: .9rem; } .pmo-dialog__b ul { margin: 0; padding-inline-start: 1.2em; line-height: 1.9; } .pmo-dialog__p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 1.3rem; }
.pm-demo { font-size: .85rem; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 10px; } .pm-demo a { text-decoration: underline; text-underline-offset: 4px; } .pm-demo a[aria-current] { font-weight: 900; text-decoration: none; }
