/*
 * Shoponlina identity: the homepage hero (.so-hero, its three cards .so-card and the "I live in" picker .so-live),
 * the [so_store] button (.so-store-btn) and the affiliate line (.so-disclosure).
 *
 * Loaded on the front page when the new hero renders, and on posts that have a [so_store] button or an affiliate
 * link. It brings no fonts: the theme's fonts are inherited, and the icons are inline SVG, so nothing arrives
 * late and moves. Logical properties only, so it works right to left.
 */

.so-hero, .so-store-btn, .so-disclosure {
    --soi-navy: #0a1628; --soi-ink: #0d1117; --soi-muted: #5d6879; --soi-paper: #fff;
    --soi-orange: #e8920d; --soi-orange-hi: #f5a623; --soi-orange-deep: #a35f00; --soi-wash: #fdf2e0;
    --soi-line: rgba(10, 22, 40, .12); --soi-line-strong: rgba(10, 22, 40, .28);
}

/* ---------- Homepage hero ---------- */

.so-hero {
    position: relative;
    padding: 6.25rem 1rem 2.75rem;     /* the fixed site header sits on the first 4.5rem */
    text-align: center;
    color: var(--soi-ink);
    background: linear-gradient(135deg, #faf8f5 0%, #fff7ed 35%, #fffefb 65%, #fef3e2 100%);
}
.so-hero__in { max-width: 64rem; margin-inline: auto; }

/* Two classes outrank the theme's ".shoponlina-theme h1", which picks the heading font. */
.so-hero .so-hero__title {
    max-width: 18em;
    margin: 0 auto 1.75rem;
    font-size: clamp(1.6rem, 1.1rem + 2.6vw, 3.1rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--soi-ink);
    text-wrap: balance;
    overflow-wrap: break-word;
}

/* Entry cards */
.so-hero .so-cards { display: grid; gap: .75rem; max-width: 64rem; margin: 0 auto; text-align: start; }
.so-hero a.so-card {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr) 1.25rem;
    align-items: center;
    gap: .85rem;
    min-height: 5rem;
    padding: .9rem 1rem;
    border: 1px solid var(--soi-line);
    border-radius: 14px;
    background: var(--soi-paper);
    color: var(--soi-ink);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(10, 22, 40, .05);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.so-hero a.so-card:focus-visible { outline: 3px solid var(--soi-navy); outline-offset: 2px; }
.so-hero .so-card__ico {
    display: flex; align-items: center; justify-content: center;
    width: 2.75rem; height: 2.75rem;
    border-radius: 12px;
    background: var(--soi-wash);
    color: var(--soi-orange-deep);
}
.so-hero .so-card__ico svg { width: 1.45rem; height: 1.45rem; }
.so-hero .so-card__t { display: block; font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }
.so-hero .so-card__d { display: block; margin-top: .2rem; font-size: .9rem; line-height: 1.45; color: var(--soi-muted); }
.so-hero .so-card__go { width: 1.25rem; height: 1.25rem; color: var(--soi-orange-deep); }
[dir="rtl"] .so-hero .so-card__go { transform: scaleX(-1); }
.so-hero svg.so-i { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (hover: hover) {
    .so-hero a.so-card:hover { transform: translateY(-2px); border-color: var(--soi-orange); box-shadow: 0 10px 28px rgba(10, 22, 40, .10); }
}
@media (prefers-reduced-motion: reduce) {
    .so-hero a.so-card { transition: none; }
    .so-hero a.so-card:hover { transform: none; }
}

@media (min-width: 48rem) {
    .so-hero { padding-block-end: 3.5rem; }
    .so-hero .so-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
    .so-hero a.so-card {
        grid-template-columns: 1fr auto;
        grid-template-areas: "ico go" "txt txt";
        align-items: start;
        align-content: start;
        gap: 1rem .85rem;
        min-height: 11rem;
        padding: 1.25rem;
    }
    .so-hero .so-card__ico { grid-area: ico; }
    .so-hero .so-card__go { grid-area: go; justify-self: end; margin-top: .75rem; }
    .so-hero .so-card__txt { grid-area: txt; }
}

/* "I live in..." picker. The row has one fixed height whether it shows the list (no script) or the select,
   so the swap moves nothing. */
.so-hero .so-live {
    display: flex; flex-direction: column; align-items: center; gap: .5rem;
    height: 5rem;
    margin: 1.75rem auto 0;
}
.so-hero .so-live__label { display: block; height: 1.5rem; font-size: .95rem; font-weight: 600; line-height: 1.5rem; color: var(--soi-ink); }
.so-hero .so-live__pick { width: 100%; max-width: 30rem; height: 3rem; }
.so-hero .so-live__sel {
    display: none;
    width: min(100%, 22rem); height: 3rem;
    margin-inline: auto;
    padding-inline: .9rem;
    border: 1px solid var(--soi-line-strong);
    border-radius: 12px;
    background-color: var(--soi-paper);
    color: var(--soi-ink);
    font: inherit; font-size: 1rem;    /* 16px: iOS doesn't zoom the page on focus */
    cursor: pointer;
}
.so-hero .so-live__sel:focus-visible { outline: 3px solid var(--soi-navy); outline-offset: 2px; }
.so-hero .so-live__list { display: flex; align-items: center; height: 3rem; margin: 0; padding: 0; list-style: none; gap: .4rem; overflow-x: auto; }
/* Centred when they fit, scrollable from the start when they don't. */
.so-hero .so-live__list li:first-child { margin-inline-start: auto; }
.so-hero .so-live__list li:last-child { margin-inline-end: auto; }
.so-hero .so-live__list li { flex: none; }
.so-hero .so-live__list a {
    display: inline-flex; align-items: center;
    height: 2.75rem; padding-inline: .8rem;
    border: 1px solid var(--soi-line-strong);
    border-radius: 999px;
    background: var(--soi-paper);
    color: var(--soi-ink);
    font-size: .95rem; font-weight: 600; white-space: nowrap; text-decoration: none;
}
.so-hero .so-live__list a:hover { border-color: var(--soi-orange); }
.so-hero .so-live__list a:focus-visible { outline: 3px solid var(--soi-navy); outline-offset: 2px; }
/* The inline script adds so-live--js: the select replaces the list. */
.so-hero .so-live--js .so-live__sel { display: block; }
.so-hero .so-live--js .so-live__list { display: none; }

/* ---------- "Go to store" button ---------- */

/* Doubled class: outranks the article's "a" and "a:hover" colours (.article-body a, 0,1,1 and 0,2,1). */
a.so-store-btn.so-store-btn {
    display: inline-flex; align-items: center; justify-content: center;
    box-sizing: border-box;
    max-width: 100%; min-height: 48px;
    margin-block: .25rem 1rem;
    padding: .75rem 1.4rem;
    border-radius: 12px;
    background: var(--soi-orange);
    color: var(--soi-navy);
    font-size: 1rem; font-weight: 700; line-height: 1.25;
    text-align: center; text-decoration: none; overflow-wrap: anywhere;
    box-shadow: 0 2px 0 rgba(10, 22, 40, .22);
    transition: background-color .15s ease, transform .15s ease;
}
a.so-store-btn.so-store-btn:hover { background: var(--soi-orange-hi); color: var(--soi-navy); text-decoration: none; }
a.so-store-btn.so-store-btn:active { transform: translateY(1px); box-shadow: none; }
a.so-store-btn.so-store-btn:focus-visible { outline: 3px solid var(--soi-navy); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
    a.so-store-btn.so-store-btn { transition: none; }
}

/* ---------- Affiliate line ---------- */

.so-disclosure {
    margin-block: -.75rem 1.5rem;      /* sits under the paragraph above, which has its own bottom margin */
    font-size: .8125rem; font-weight: 400; font-style: normal; line-height: 1.5;
    text-align: start;
    color: var(--soi-muted);
}
