/* Shared components added with the multi-product redesign:
   pills, platform chips, product cards, FAQ, filter chips, breadcrumb, product sub-menu, "more from us" cards. */

/* product pages recolor the main call-to-action with the product accent */
[class*="theme-"] .button--primary {
    background: var(--accent); color: var(--on-accent);
    box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
[class*="theme-"] .button--primary:hover { background: color-mix(in srgb, var(--accent) 86%, #000); }
[class*="theme-"] .button--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Pills (status + category) ---------- */
.pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
    font-size: .78rem; font-weight: 650; line-height: 1.5; white-space: nowrap;
    color: var(--primary); background: var(--primary-soft); border-radius: 999px;
}
.pill svg { width: 14px; height: 14px; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--ok { color: var(--success); background: var(--success-soft); }
.pill--warn { color: var(--warn); background: var(--warn-soft); }
.pill--bad { color: var(--danger); background: var(--danger-soft); }
.pill--info { color: var(--primary); background: var(--primary-soft); }
.pill--accent { color: var(--accent); background: var(--accent-soft); }
.pill--lg { padding: 6px 16px; font-size: 1rem; }
.pill--lg .dot { width: 8px; height: 8px; }

/* ---------- Platform chips ---------- */
.platform-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.platform-chips li {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
    font-size: .82rem; font-weight: 550; color: var(--ink-2);
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
}
.platform-chips svg { width: 14px; height: 14px; }

/* ---------- Product cards ---------- */
.pcard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.pcard {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.pcard[hidden] { display: none; }
.pcard:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.pcard:has(.pcard__link:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }

.pcard__visual {
    height: clamp(180px, 22vw, 250px); padding: 28px 28px 0; overflow: hidden;
    background:
        radial-gradient(420px 220px at 80% 0%, color-mix(in srgb, var(--accent-bright) 26%, transparent), transparent 70%),
        var(--accent-soft);
    border-block-end: 1px solid var(--line);
}
.pcard__shot {
    overflow: hidden; border: 1px solid var(--line-strong); border-block-end: 0;
    border-start-start-radius: 12px; border-start-end-radius: 12px;
    background: var(--surface); box-shadow: 0 24px 40px -20px rgba(11, 18, 48, .45);
    transition: transform .4s var(--ease);
}
.pcard:hover .pcard__shot { transform: translateY(-8px); }
.pcard__shot img { width: 100%; height: auto; }

.pcard__body { display: flex; flex: 1; flex-direction: column; padding: clamp(22px, 3vw, 36px); }
.pcard__head { display: flex; align-items: center; gap: 14px; margin-block-end: 18px; }
.pcard__logo { flex: none; width: 52px; height: 52px; padding: 5px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.pcard__title { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1.2; color: var(--ink); }
.pcard__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pcard__link:focus-visible { outline: none; }
.pcard__tagline { margin-block-end: 6px; font-family: var(--font-display); font-size: 1.3rem; font-weight: 650; line-height: 1.25; color: var(--ink); }
body.rtl .pcard__tagline { font-family: "IBM Plex Sans Arabic", var(--font-display); line-height: 1.5; }
.pcard__summary { color: var(--muted); }
.pcard .tick-list { margin-block-end: 24px; }
.pcard .tick-list svg { background: var(--accent-soft); color: var(--accent); }
.pcard__foot { display: grid; gap: 16px; margin-block-start: auto; padding-block-start: 18px; border-block-start: 1px solid var(--line); }
.pcard__actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pcard__app { position: relative; z-index: 2; }
.pcard__app svg { width: 15px; height: 15px; }
.pcard__go { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; color: var(--accent); }
.pcard__go svg { width: 18px; height: 18px; }
@media (max-width: 860px) { .pcard-grid { grid-template-columns: 1fr; } }

/* "next product" invitation */
.next-product {
    display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin-block-start: clamp(16px, 2.4vw, 28px);
    padding: clamp(22px, 3vw, 34px); background: transparent;
    border: 1.5px dashed var(--line-strong); border-radius: var(--radius-xl);
}
.next-product__icon { display: grid; place-items: center; flex: none; width: 52px; height: 52px; color: var(--primary); background: var(--primary-soft); border-radius: 14px; }
.next-product__icon svg { width: 24px; height: 24px; }
.next-product > div { flex: 1 1 320px; }
.next-product h3 { margin: 0 0 4px; font-size: 1.25rem; }
.next-product p { margin: 0; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 88px); align-items: start; }
.faq-layout .section-head { position: sticky; inset-block-start: calc(var(--header-h) + 32px); margin: 0; }
@media (max-width: 860px) { .faq-layout { grid-template-columns: 1fr; } .faq-layout .section-head { position: static; } }
.faq { border-block-start: 1px solid var(--line-strong); }
.faq__item { border-block-end: 1px solid var(--line-strong); }
.faq__item summary {
    display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 22px;
    font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; line-height: 1.35; color: var(--ink);
    cursor: pointer; list-style: none;
}
body.rtl .faq__item summary { font-family: "IBM Plex Sans Arabic", var(--font-display); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--accent); }
.faq__icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; color: var(--accent); background: var(--accent-soft); border-radius: 50%; transition: transform .25s var(--ease); }
.faq__icon svg { width: 16px; height: 16px; }
.faq__item[open] .faq__icon { transform: rotate(45deg); }
.faq__body { padding-block-end: 22px; max-width: 62ch; }
.faq__body p { margin: 0; color: var(--muted); }
.faq__item[open] .faq__body { animation: faq-open .28s var(--ease); }
@keyframes faq-open { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Filter chips ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 28px; }
.chip {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 16px;
    font-size: .95rem; font-weight: 600; color: var(--ink-2); cursor: pointer;
    background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 999px;
    transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip__count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding-inline: 6px; font-size: .78rem; border-radius: 999px; background: color-mix(in srgb, currentColor 14%, transparent); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); }
.breadcrumb a { font-weight: 550; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb svg { width: 14px; height: 14px; }
[dir="rtl"] .breadcrumb svg { transform: scaleX(-1); }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 600; }

/* ---------- Product sub-menu (sticky, product pages) ---------- */
.subnav {
    position: sticky; top: var(--header-h); z-index: 50;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
    border-block: 1px solid var(--line);
}
.subnav__bar { display: flex; align-items: center; gap: 20px; min-height: 56px; }
.subnav__name { display: inline-flex; align-items: center; gap: 10px; flex: none; font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); }
.subnav__name img { width: 26px; height: 26px; object-fit: contain; }
.subnav__links { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.subnav__links::-webkit-scrollbar { display: none; }
.subnav__links a {
    position: relative; display: block; padding: 8px 12px; font-size: .92rem; font-weight: 550; white-space: nowrap; color: var(--muted);
    transition: color .18s var(--ease);
}
.subnav__links a:hover { color: var(--ink); }
.subnav__links a[aria-current="true"] { color: var(--ink); font-weight: 650; }
.subnav__links a[aria-current="true"]::after { content: ""; position: absolute; inset-inline: 12px; bottom: -9px; height: 2px; background: var(--accent); border-radius: 2px; }
.subnav__cta { margin-inline-start: auto; flex: none; }
@media (max-width: 720px) { .subnav__name b, .subnav__cta { display: none; } .subnav__links { margin-inline-end: -16px; padding-inline-end: 16px; } }

/* ---------- "More from ramDevX" ---------- */
.more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.more-card {
    display: flex; align-items: center; gap: 16px; padding: 20px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.more-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.more-card > img, .more-card__mark { flex: none; width: 52px; height: 52px; padding: 5px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.more-card__mark { display: grid; place-items: center; padding: 0; color: var(--primary); background: var(--primary-soft); border: 0; }
.more-card__mark svg { width: 24px; height: 24px; }
.more-card__text { display: grid; gap: 1px; min-width: 0; flex: 1; line-height: 1.45; }
.more-card__text b { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }
.more-card__text small { font-size: .8rem; font-weight: 650; color: var(--accent); }
.more-card__text > span { font-size: .92rem; color: var(--muted); }
.more-card > svg { flex: none; width: 20px; height: 20px; color: var(--muted); }
.more-card:hover > svg { color: var(--accent); }
.more-card--current { border-color: var(--accent); background: var(--accent-soft); }
.more-card__here { flex: none; padding: 4px 10px; font-size: .78rem; font-weight: 700; color: var(--accent); background: var(--surface, #fff); border: 1px solid var(--accent); border-radius: 999px; }
.more-card--custom { background: transparent; border-style: dashed; border-width: 1.5px; border-color: var(--line-strong); }
.more-card--custom .more-card__text small { color: var(--primary); }

/* shared bar that shows a measured value against its allowed range (WaterLab) */
.lbar { display: block; direction: ltr; position: relative; width: 100%; height: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.lbar__ok {
    position: absolute; inset-block: -1px; inset-inline-start: calc(var(--from) * 1%); width: calc((var(--to) - var(--from)) * 1%);
    background: var(--success-soft); border: 1.5px solid var(--success); border-radius: 999px;
}
.lbar__mark {
    position: absolute; top: -6px; inset-inline-start: calc(var(--v) * 1%); width: 4px; height: 20px; margin-inline-start: -2px;
    background: var(--success); border-radius: 2px; transition: inset-inline-start .15s var(--ease), background-color .15s var(--ease);
}
.lbar.is-out .lbar__mark { background: var(--danger); }
.lbar--sm { min-width: 120px; height: 8px; }
.lbar--sm .lbar__mark { top: -5px; height: 17px; }
.lbar--lg { height: 18px; }
.lbar--lg .lbar__mark { top: -8px; width: 6px; height: 34px; margin-inline-start: -3px; border-radius: 3px; }

/* ---------- Product card on tablets and phones ----------
   Desktop keeps the tall two-column card. Below 860px the card is rebuilt so it fits a screen and its two actions are clear:
   - tablet (641-860px): picture on one side, text on the other
   - phone (up to 640px): short picture, no long summary, big tap targets, "Explore" + "Try it" side by side */
@media (min-width: 641px) and (max-width: 860px) {
    .pcard { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
    .pcard__visual {
        height: auto; min-height: 100%; padding: 28px 0 0 28px; border-block-end: 0; border-inline-end: 1px solid var(--line);
    }
    [dir="rtl"] .pcard__visual { padding: 28px 28px 0 0; }
    .pcard__shot { border-inline-end: 0; border-start-end-radius: 0; }
    [dir="rtl"] .pcard__shot { border-inline-end: 1px solid var(--line-strong); border-inline-start: 0; border-start-end-radius: 12px; border-start-start-radius: 0; }
    .pcard__shot img { width: 160%; max-width: none; }
    [dir="rtl"] .pcard__shot img { margin-inline-start: -60%; }
}

@media (max-width: 640px) {
    .pcard-grid { gap: 18px; }
    .pcard__visual { height: 132px; padding: 18px 18px 0; }
    .pcard__shot img { width: 118%; max-width: none; }
    [dir="rtl"] .pcard__shot img { margin-inline-start: -18%; }
    .pcard__body { padding: 18px 18px 20px; }
    .pcard__head { gap: 12px; margin-block-end: 14px; }
    .pcard__logo { width: 48px; height: 48px; }
    .pcard__title { font-size: 1.35rem; }
    .pcard__tagline { margin-block-end: 12px; font-size: 1.15rem; }
    .pcard__summary { display: none; }                     /* the tagline and the three points say it; the product page has the rest */
    .pcard .tick-list { gap: 8px; margin-block-end: 18px; font-size: .95rem; }
    .pcard__foot { gap: 14px; padding-block-start: 16px; }
    .pcard__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .pcard__go, .pcard__app {
        display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding-inline: 14px;
        font-size: .97rem; font-weight: 650; border-radius: 12px;
    }
    .pcard__go { color: var(--on-accent); background: var(--accent); }
    .pcard__go:only-child { grid-column: 1 / -1; }
    .pcard__app { background: var(--surface); border-color: var(--line-strong); }
}
@media (max-width: 360px) {
    .pcard__body { padding-inline: 14px; }
    .pcard__title { font-size: 1.25rem; }
}
