/* ============================================================
   SOLAR WIZARD — wizard.css
   Mobile-first (matches the approved mockup), then tablet / desktop.
   Everything is scoped under .sw so it cannot leak into the theme, and
   buttons are reset explicitly because Woodmart styles bare <button>s.
   ============================================================ */

.sw {
    --sw-green: #1a7a4a;
    --sw-green-light: #22a05a;
    --sw-green-bg: #f0fdf4;
    --sw-green-border: #bbf7d0;
    --sw-text: #1a2332;
    --sw-muted: #64748b;
    --sw-border: #e2e8f0;
    --sw-bg: #f8fafc;
    --sw-card: #ffffff;
    --sw-red: #dc2626;
    --sw-indigo: #3730a3;
    --sw-indigo-bg: #e0e7ff;
    --sw-amber: #92400e;

    direction: rtl;
    font-family: 'Cairo', sans-serif;
    color: var(--sw-text);
    line-height: 1.5;
    text-align: right;
}

.sw *,
.sw *::before,
.sw *::after {
    box-sizing: border-box;
}

/* Reset every <button> inside the wizard (theme styles are not wanted here). */
/* (The calculator's own add-to-cart button is excluded: it already has its
   styling in main.css and the reset would strip it.) */
.sw button:where(:not(.res-pricing-cta__btn)) {
    all: unset;
    box-sizing: border-box;
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Saved-page add-to-cart: white pill with green text, kept in every state. */
.sw .res-pricing-cta__btn,
.sw .res-pricing-cta__btn:hover,
.sw .res-pricing-cta__btn:focus,
.sw .res-pricing-cta__btn:active {
    background: #fff;
    color: var(--sw-green) !important;
    border: none;
    border-radius: 99px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    box-shadow: none;
}

.sw button:focus-visible,
.sw a:focus-visible {
    outline: 3px solid rgba(26, 122, 74, 0.35);
    outline-offset: 2px;
}

.sw button[disabled] {
    cursor: not-allowed;
}

.sw svg {
    flex-shrink: 0;
}

/* ── Page shell ── */
.sw-main {
    /* Woodmart lays the page content out in a CSS grid; without these the
       wizard would shrink to the width of its content. */
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    background: #f8fafc;
    padding: 16px 12px 90px; /* extra bottom room for the mobile bottom bar */
}

.sw-card {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.07);
    padding: 18px 16px 24px;
}

/* ── Top: back + progress ── */
.sw-top {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.sw .sw-back {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--sw-border);
    background: #fff;
    color: var(--sw-text);
}

.sw .sw-back[hidden] {
    display: none;
}

.sw .sw-back:hover {
    border-color: var(--sw-green);
    color: var(--sw-green);
}

.sw-progress {
    grid-column: 2;
    grid-row: 1;
    text-align: center;
}

.sw-progress__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--sw-text);
    margin-bottom: 6px;
}

.sw-progress__bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    max-width: 220px;
    margin: 0 auto;
}

.sw-progress__bar span {
    height: 5px;
    border-radius: 99px;
    background: var(--sw-border);
    transition: background 0.2s;
}

.sw-progress__bar span.is-on {
    background: var(--sw-green);
}

/* ── Titles ── */
.sw .sw-title {
    margin: 0 0 6px;
    padding: 0;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--sw-text);
    text-align: center;
}

.sw .sw-sub {
    margin: 0 auto 20px;
    max-width: 440px;
    font-size: 14px;
    color: var(--sw-muted);
    text-align: center;
}

/* ── Buttons ── */
.sw .sw-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 54px;
    padding: 12px 20px;
    border: 1.5px solid transparent;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
}

.sw .sw-btn--primary {
    background: var(--sw-green);
    color: #fff;
}

.sw .sw-btn--primary:hover:not([disabled]) {
    background: #14633b;
}

/* The theme recolours button text on hover; keep ours white in every state
   (only the background changes). */
.sw .sw-btn--primary,
.sw .sw-btn--primary:hover,
.sw .sw-btn--primary:focus,
.sw .sw-btn--primary:active,
.sw .sw-btn--primary[disabled],
.sw .sw-stepper__btn,
.sw .sw-stepper__btn:hover,
.sw .sw-stepper__btn:focus,
.sw .sw-stepper__btn:active {
    color: #fff !important;
}

.sw .sw-btn--primary[disabled] {
    background: #cbd5e1;
    color: #fff;
}

.sw .sw-btn--primary.is-busy {
    opacity: 0.8;
}

.sw .sw-btn--ghost {
    background: #fff;
    border-color: var(--sw-border);
    color: var(--sw-text);
    font-size: 14px;
    padding-inline: 12px;
}

.sw .sw-btn--ghost:hover {
    border-color: var(--sw-green);
    color: var(--sw-green);
}

.sw-actions {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

/* ── Chip: "منظومة 5 kW" ── */
.sw-sizechip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: fit-content;
    margin: 0 auto 18px;
    padding: 7px 16px;
    border-radius: 99px;
    background: var(--sw-green-bg);
    border: 1px solid var(--sw-green-border);
    color: var(--sw-green);
    font-size: 14px;
    font-weight: 700;
}

.sw .sw-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 99px;
    background: var(--sw-green-bg);
    border: 1px solid var(--sw-green-border);
    color: var(--sw-green);
    font-size: 13px;
    font-weight: 700;
}

/* ── Step 1: tiers ── */
.sw-tiers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.sw .sw-tier {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 18px 6px 16px;
    min-height: 150px;
    border: 1.5px solid var(--sw-border);
    border-radius: 18px;
    background: #fff;
    text-align: center;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.sw .sw-tier:hover {
    border-color: var(--sw-green-light);
}

.sw .sw-tier.is-on {
    border-color: var(--sw-green);
    background: var(--sw-green-bg);
    box-shadow: 0 6px 18px rgba(26, 122, 74, 0.12);
}

.sw-tier__tick {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--sw-green);
    color: #fff;
}

.sw-tier__icon {
    color: var(--sw-green);
}

.sw-tier__kw {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--sw-text);
}

.sw-tier__desc {
    font-size: 12px;
    color: var(--sw-muted);
    line-height: 1.35;
    padding: 0 4px;
}

.sw-selected {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 13px 16px;
    border-radius: 14px;
    background: var(--sw-green-bg);
    border: 1px solid var(--sw-green-border);
    color: var(--sw-green);
    font-size: 15px;
}

/* ── Step 2: packages ── */
.sw-packs {
    display: grid;
    gap: 12px;
}

.sw .sw-pack {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
        "icon text go"
        "strip strip price";
    align-items: center;
    gap: 10px 12px;
    padding: 14px;
    border: 1.5px solid var(--sw-border);
    border-radius: 18px;
    background: #fff;
    text-align: right;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.sw .sw-pack:hover:not(.is-disabled) {
    border-color: var(--sw-green);
    box-shadow: 0 6px 18px rgba(26, 122, 74, 0.1);
}

.sw .sw-pack.is-disabled {
    opacity: 0.55;
    cursor: default;
    background: var(--sw-bg);
}

.sw-pack__icon {
    grid-area: icon;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--sw-green-bg);
    color: var(--sw-green);
}

.sw-pack__text {
    grid-area: text;
    display: grid;
    gap: 2px;
    min-width: 0;
}

.sw-pack__title {
    font-size: 17px;
    font-weight: 800;
    color: var(--sw-text);
}

.sw-pack__desc {
    font-size: 13px;
    color: var(--sw-muted);
}

.sw-pack__go {
    grid-area: go;
    color: var(--sw-muted);
}

.sw-pack__strip {
    grid-area: strip;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sw-pack__price {
    grid-area: price;
    font-size: 17px;
    font-weight: 800;
    color: var(--sw-green);
    white-space: nowrap;
}

.sw-pack__soon {
    grid-column: 1 / -1;
    font-size: 13px;
    font-weight: 700;
    color: var(--sw-muted);
}

.sw .sw-pack--build {
    grid-template-areas: "icon text go";
    background: #f5f7ff;
    border-color: #c7d2fe;
}

.sw .sw-pack--build:hover {
    border-color: var(--sw-indigo);
    box-shadow: 0 6px 18px rgba(55, 48, 163, 0.12);
}

.sw-pack__icon--build {
    background: var(--sw-indigo-bg);
    color: var(--sw-indigo);
}

.sw-tag {
    display: inline-block;
    margin-inline-start: 6px;
    padding: 2px 10px;
    border-radius: 99px;
    background: var(--sw-indigo-bg);
    color: var(--sw-indigo);
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.sw-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border: 1px solid var(--sw-border);
    border-radius: 12px;
    background: #fff;
    color: var(--sw-green);
}

.sw-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sw-plus {
    color: var(--sw-muted);
    font-weight: 700;
}

/* ── Step 3: brands, slots, summary ── */
.sw-build {
    display: grid;
    gap: 18px;
}

.sw-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.sw-col {
    min-width: 0;
    padding: 10px 8px 8px;
    border: 1px solid var(--sw-border);
    border-radius: 16px;
    background: #fff;
}

.sw-col__head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    /* Room for two lines on phones ("الألواح الشمسية" wraps there), so all three
       columns' brand lists start on the same line. Reset from tablet up. */
    min-height: 48px;
    padding-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    color: var(--sw-text);
    text-align: center;
}

@media (min-width: 768px) {
    .sw-col__head {
        min-height: 0;
    }
}

.sw-col__head svg {
    color: var(--sw-green);
}

.sw-col__empty {
    padding: 10px 4px;
    font-size: 11px;
    color: var(--sw-muted);
    text-align: center;
}

.sw .sw-brand {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    margin-top: 6px;
    padding: 8px 6px;
    border: 1.5px solid var(--sw-border);
    border-radius: 10px;
    background: #fff;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: var(--sw-text);
    transition: border-color 0.15s, background 0.15s;
}

.sw .sw-brand:hover,
.sw .sw-brand:focus {
    color: var(--sw-text);
}

.sw .sw-brand:hover {
    border-color: var(--sw-green-light);
}

.sw .sw-brand.is-on {
    border-color: var(--sw-green);
    background: var(--sw-green-bg);
}

/* Logos are sized by HEIGHT with a width cap, so square logos stay square and wide
   wordmarks are shown whole (never cropped or squeezed into a square). */
.sw-brand__logo {
    flex-shrink: 0;
    width: auto;
    height: 28px;
    max-width: min(84px, 100%);
    border-radius: 4px;
    object-fit: contain;
}

/* Names wrap between words (never mid-word). On phones the logo sits ABOVE the
   name so the name gets the whole chip width; from tablet up it sits beside it. */
.sw-chip__name {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
}

.sw .sw-brand {
    flex-direction: column;
    gap: 4px;
}

@media (min-width: 768px) {
    .sw .sw-brand {
        flex-direction: row;
        gap: 7px;
    }
}

.sw-brand__tick {
    position: absolute;
    top: -7px;
    inset-inline-end: -7px;
    display: none;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--sw-green);
    color: #fff;
    box-shadow: 0 0 0 2px #fff;
}

.sw .sw-brand.is-on .sw-brand__tick {
    display: inline-flex;
}

/* The selected products: same 3-column grid (and gap) as the brand columns
   above, so each product sits directly under its own brand column. */
.sw-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* "+" between neighbouring products, drawn on the gap. */
.sw-slot:not(:last-child)::after {
    content: '+';
    position: absolute;
    inset-inline-end: -16px;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-top: -12px;
    border-radius: 50%;
    background: var(--sw-green);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

/* Titles that tell the two blocks apart: brands vs. chosen products. */
.sw-build__main {
    display: grid;
    gap: 24px;
}

.sw .sw-blocktitle {
    text-transform: none;
    text-align: start;
    line-height: 1.4;
    margin: 0 0 8px;
    padding-inline: 4px;
    font-size: 13px;
    font-weight: 800;
    color: var(--sw-muted);
}

.sw-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 118px;
    padding: 10px 4px;
    border: 1px solid var(--sw-border);
    border-radius: 14px;
    background: #fff;
    text-align: center;
}

.sw-slot.is-empty {
    border-style: dashed;
    background: transparent;
    color: var(--sw-muted);
}

.sw-slot__ph {
    color: #94a3b8;
}

.sw-slot__label {
    font-size: 11px;
}

.sw-slot__img {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    color: var(--sw-green);
}

.sw-slot__img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sw-slot__name {
    display: inline-flex;
    /* Logo and brand name share a line when they fit; otherwise the name drops
       below the logo (instead of being squeezed into a one-letter-wide column). */
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 5px;
    max-width: 100%;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: break-word;
    text-align: center;
}

.sw-slot__logo {
    flex-shrink: 0;
    width: auto;
    height: 22px;
    max-width: 64px;
    border-radius: 4px;
    object-fit: contain;
}

/* Product name, between the brand and the quantity (same name as in "منظومتي"). */
.sw-slot__product {
    max-width: 100%;
    padding-inline: 4px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--sw-muted);
    overflow-wrap: break-word;
    text-align: center;
}

@media (min-width: 768px) {
    .sw-slot__product {
        font-size: 13px;
    }
}

.sw-slot__count {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    color: var(--sw-green);
}

.sw .sw-slot__x {
    position: absolute;
    top: 5px;
    inset-inline-start: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fee2e2;
    color: var(--sw-red);
}

.sw .sw-slot__x:hover {
    background: var(--sw-red);
    color: #fff;
}

/* Summary */
.sw-sum {
    padding: 16px;
    border: 1px solid var(--sw-border);
    border-radius: 18px;
    background: #fff;
}

.sw-sum__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 800;
}

.sw-sum__title svg {
    color: var(--sw-green);
}

.sw-sum__lines {
    display: grid;
    gap: 6px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.sw-sum__line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding: 0;
    font-size: 13px;
}

.sw-sum__role {
    flex-shrink: 0;
    color: var(--sw-muted);
}

.sw-sum__val {
    min-width: 0;
    font-weight: 700;
    text-align: start;
}

.sw-sum__val bdi {
    font-size: 15px;
    font-weight: 800;
    color: var(--sw-green);
}

.sw-sum__logo {
    width: auto;
    height: 18px;
    max-width: 48px;
    margin-inline-end: 6px;
    border-radius: 3px;
    object-fit: contain;
    vertical-align: -4px;
}

.sw-sum__line.is-empty .sw-sum__val {
    font-weight: 400;
    color: #94a3b8;
}

.sw-stepper-box {
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 14px;
    background: var(--sw-bg);
    text-align: center;
}

.sw-stepper-box__label {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
}

.sw-stepper {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.sw .sw-stepper__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--sw-green);
    color: #fff;
}

.sw .sw-stepper__btn:hover:not([disabled]) {
    background: #14633b;
}

.sw .sw-stepper__btn[disabled] {
    background: #cbd5e1;
}

.sw-stepper__val {
    min-width: 40px;
    font-size: 24px;
    font-weight: 800;
    text-align: center;
}

.sw-stepper-box__hint {
    margin-top: 6px;
    font-size: 11px;
    color: var(--sw-muted);
}

.sw-sum__total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px dashed var(--sw-border);
    font-size: 14px;
    font-weight: 700;
}

.sw-sum__total strong {
    font-size: 24px;
    font-weight: 800;
    color: var(--sw-green);
    white-space: nowrap;
}

.sw-sum__note {
    margin: 6px 0 14px;
    font-size: 11px;
    color: var(--sw-muted);
}

/* ── Misc states ── */
.sw-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 36px 10px;
    color: var(--sw-muted);
    font-size: 14px;
}

.sw-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid var(--sw-border);
    border-top-color: var(--sw-green);
    border-radius: 50%;
    animation: sw-spin 0.8s linear infinite;
}

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

.sw-error {
    margin: 0 0 12px;
    padding: 11px 14px;
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-radius: 12px;
    background: rgba(220, 38, 38, 0.06);
    color: var(--sw-red);
    font-size: 13px;
    font-weight: 700;
}

.sw-error[hidden] {
    display: none;
}

/* ── Saved bundle page ── */
.sw-bundle {
    padding: 20px 16px 22px;
}

.sw-bundle__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.sw .sw-bundle__head h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
}

.sw-bundle__list {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.sw-line {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
        "thumb info price"
        "thumb info qty";
    align-items: center;
    gap: 2px 12px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--sw-border);
    border-radius: 16px;
    background: #fcf9fa;
}

.sw-line .sw-thumb { grid-area: thumb; }
.sw-line__info { grid-area: info; display: grid; gap: 1px; min-width: 0; }
.sw-line__role { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--sw-muted); }
.sw-line__brand { display: inline-flex; align-items: center; gap: 6px; color: var(--sw-text); font-weight: 700; }
.sw-brandlogo { width: auto; height: 22px; max-width: 64px; border-radius: 4px; object-fit: contain; }
.sw-line__name { font-size: 14px; font-weight: 700; }
.sw-line__warranty { font-size: 11px; color: var(--sw-green); }
.sw-line__qty { grid-area: qty; justify-self: end; font-size: 18px; font-weight: 800; line-height: 1.1; color: var(--sw-text); }
.sw-line__price { grid-area: price; justify-self: end; font-size: 15px; font-weight: 800; white-space: nowrap; }

.sw-bundle__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.sw .sw-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1.5px solid var(--sw-border);
    border-radius: 99px;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    color: var(--sw-muted);
}

.sw .sw-action:hover,
.sw .sw-action.is-done {
    border-color: var(--sw-green);
    background: var(--sw-green-bg);
    color: var(--sw-green);
}

/* ============================================================
   TABLET  (>= 768px)
   ============================================================ */
@media (min-width: 768px) {
    .sw-main {
        padding: 28px 20px 60px;
    }

    .sw-card {
        max-width: 780px;
        padding: 28px 32px 32px;
    }

    .sw .sw-title {
        font-size: 28px;
    }

    .sw-tiers {
        gap: 16px;
    }

    .sw .sw-tier {
        min-height: 180px;
        padding: 24px 12px 20px;
    }

    .sw-tier__kw {
        font-size: 26px;
    }

    .sw-tier__desc {
        font-size: 13px;
    }

    .sw-actions {
        grid-template-columns: 1fr 1fr;
        margin-top: 24px;
    }

    .sw-packs {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    .sw .sw-pack {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "icon text"
            "strip strip"
            "price go";
        align-content: start;
        padding: 18px;
    }

    /* Three packages share one row here: slightly smaller thumbs so the
       three component images + "+" signs fit inside each card. */
    .sw .sw-pack .sw-thumb {
        width: 46px;
        height: 46px;
    }

    .sw-pack__strip {
        gap: 4px;
    }

    .sw-pack__go {
        justify-self: end;
    }

    .sw .sw-pack--build {
        grid-column: 1 / -1;
        grid-template-columns: auto 1fr auto;
        grid-template-areas: "icon text go";
    }

    .sw-col__head {
        font-size: 14px;
    }

    .sw .sw-brand {
        min-height: 46px;
        font-size: 13px;
    }

    .sw-slot {
        min-height: 140px;
    }

    .sw-slot__img {
        width: 76px;
        height: 76px;
    }

    .sw-sum {
        padding: 20px;
    }

    .sw-line {
        padding: 14px 16px;
    }

    .sw-bundle {
        padding: 28px 28px 30px;
    }
}

/* ============================================================
   DESKTOP  (>= 1100px)
   ============================================================ */
@media (min-width: 1100px) {
    .sw-card {
        max-width: 1080px;
        padding: 36px 48px 44px;
    }

    .sw .sw-title {
        font-size: 32px;
    }

    .sw-tiers {
        max-width: 760px;
        margin: 0 auto;
    }

    .sw-actions {
        max-width: 760px;
        margin-inline: auto;
    }

    .sw-selected {
        max-width: 760px;
        margin-inline: auto;
    }

    .sw-packs {
        gap: 18px;
    }

    .sw-build {
        grid-template-columns: 1fr 340px;
        align-items: start;
        gap: 28px;
    }

    .sw-sum {
        position: sticky;
        top: 110px;
    }

    .sw-bundle {
        padding: 36px 44px 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sw-spinner {
        animation-duration: 2.4s;
    }

    .sw * {
        transition: none !important;
    }
}

/* Print: the saved bundle page should print clean (PDF button on results). */
@media print {
    .sw-bundle__actions {
        display: none;
    }
}

/* One-off message shown when the wizard resets a choice by itself (e.g. the
   inverter no longer fits after changing the panels). */
.sw-notice {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #fde68a;
    border-radius: 12px;
    background: #fffbeb;
    color: var(--sw-amber);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

/* Hint under the panel stepper can run to two lines. */
.sw-stepper-box__hint {
    line-height: 1.5;
}

/* Capacity line under a selected panel / inverter (watts). */
.sw-slot__cap {
    max-width: 100%;
    padding-inline: 4px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--sw-green);
    text-align: center;
}

@media (min-width: 768px) {
    .sw-slot__cap {
        font-size: 13px;
    }
}

/* Inverter chips: the exact model, the panel power it accepts and (after a reset) a hint
   that it is a different model than the one that was removed. */
.sw .sw-brand--detail {
    flex-wrap: wrap;
    row-gap: 3px;
    padding-block: 10px;
}
.sw-brand__model,
.sw-brand__range,
.sw-brand__alt {
    flex: 0 0 100%;
    text-align: center;
}
.sw-brand__model {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}
.sw-brand__range {
    font-size: 10.5px;
    font-weight: 500;
    color: var(--sw-muted);
}
.sw-brand__alt {
    margin-top: 2px;
    padding: 2px 6px;
    border-radius: 6px;
    background: #fff4d6;
    color: #7a5200;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.3;
}
