/*
 * KSATRIA Store listing (/store). Page-scoped; tokens come from store.css.
 * Sections: hero, sticky toolbar, catalogue grid, custom-solution band, FAQ.
 */

.sl-page {
    --sl-header-offset: 86px;
    overflow-x: clip;
}

.sl-icon {
    display: inline-flex;
}

.sl-icon svg {
    width: 18px;
    height: 18px;
}

/* ---------- Hero ---------- */

.sl-hero {
    padding: 40px 0 40px;
}

.sl-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    align-items: end;
    gap: 48px;
}

.sl-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px !important;
    color: var(--st-violet);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sl-eyebrow::before {
    content: '';
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--st-gradient);
}

.sl-hero__title {
    font-size: clamp(44px, 6vw, 80px);
}

.sl-hero__title span {
    display: block;
}

.sl-hero__title span + span {
    color: var(--st-violet);
}

.sl-hero__lead {
    max-width: 54ch;
    margin-top: 20px !important;
}

.sl-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.sl-hero__actions .st-btn--primary .sl-icon {
    transition: transform 0.3s var(--st-ease);
}

.sl-hero__actions .st-btn--primary:hover .sl-icon {
    transform: translateY(2px) rotate(90deg);
}

/* Trust facts: a quiet card, not a feature grid. */
.sl-trust {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 10px;
    list-style: none;
}

.sl-trust__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: var(--st-radius-sm);
    color: var(--st-ink-2);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.sl-trust__item + .sl-trust__item {
    border-top: 1px solid var(--st-line);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.sl-trust__icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--st-violet-soft);
    color: var(--st-violet);
}

.sl-trust__icon svg {
    width: 20px;
    height: 20px;
}

/* ---------- Sticky toolbar ---------- */

.sl-toolbar__sentinel {
    height: 1px;
    margin-bottom: -1px;
}

.sl-toolbar {
    position: sticky;
    top: var(--sl-header-offset);
    z-index: 50;
    pointer-events: none;
}

.sl-toolbar[hidden] {
    display: none;
}

.sl-toolbar__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px;
    border: 1px solid var(--st-line);
    border-radius: var(--st-radius);
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    box-shadow: var(--st-shadow-sm);
    pointer-events: auto;
    transition: box-shadow 0.3s var(--st-ease), border-color 0.3s ease;
}

.sl-toolbar.is-stuck .sl-toolbar__bar {
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), var(--st-shadow);
}

@media (prefers-reduced-transparency: reduce) {
    .sl-toolbar__bar {
        background: var(--st-surface);
    }
}

/* Chip row with a sliding active pill behind the chips. */
.sl-chips {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.sl-chips::-webkit-scrollbar {
    display: none;
}

.sl-chips .st-chip {
    position: relative;
    z-index: 1;
    flex: none;
    border-color: transparent;
    background: transparent;
}

.sl-chips .st-chip:hover {
    border-color: transparent;
    background: var(--st-bg-tint);
}

.sl-chips .st-chip[aria-pressed="true"] {
    color: #fff;
}

.sl-chips__indicator {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    width: 0;
    height: 40px;
    border-radius: 999px;
    background: var(--st-ink);
    opacity: 0;
    pointer-events: none;
}

.sl-chips.is-ready .sl-chips__indicator {
    opacity: 1;
    transition: transform 0.38s var(--st-ease), width 0.38s var(--st-ease);
}

/* Before the indicator is measured, active chip uses its own fill. */
.sl-chips:not(.is-ready) .st-chip[aria-pressed="true"] {
    background: var(--st-ink);
}

.sl-chips.is-ready .st-chip[aria-pressed="true"],
.sl-chips.is-ready .st-chip[aria-pressed="true"]:hover {
    background: transparent;
}

.sl-tools {
    display: flex;
    flex: none;
    align-items: center;
    gap: 8px;
}

.sl-search {
    position: relative;
    display: flex;
    align-items: center;
}

.sl-search__icon {
    position: absolute;
    left: 14px;
    display: flex;
    color: var(--st-muted);
    pointer-events: none;
}

.sl-search__icon svg {
    width: 18px;
    height: 18px;
}

.sl-search__input,
.sl-sort__select {
    height: 40px;
    border: 1px solid var(--st-line-strong);
    border-radius: 999px;
    background: var(--st-surface);
    color: var(--st-ink);
    font: 500 14px/1 var(--st-font);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sl-search__input {
    width: 240px;
    padding: 0 40px 0 40px;
    -webkit-appearance: none;
    appearance: none;
}

.sl-search__input::placeholder {
    color: #807e8b;
}

.sl-search__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.sl-search__kbd {
    position: absolute;
    right: 12px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1px solid var(--st-line-strong);
    border-radius: 6px;
    color: var(--st-muted);
    font: 500 12px/1 var(--st-font);
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.sl-search__input:focus ~ .sl-search__kbd,
.sl-search__input:not(:placeholder-shown) ~ .sl-search__kbd {
    opacity: 0;
}

.sl-sort__select {
    padding: 0 38px 0 16px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2366646f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
}

.sl-search__input:hover,
.sl-sort__select:hover {
    border-color: rgba(17, 16, 19, 0.28);
}

.sl-search__input:focus,
.sl-sort__select:focus {
    outline: none;
    border-color: var(--st-violet);
    box-shadow: 0 0 0 4px rgba(91, 63, 214, 0.14);
}

/* ---------- Catalogue ---------- */

.sl-catalog {
    padding: 0 0 88px;
    scroll-margin-top: var(--sl-header-offset);
}

.sl-catalog > .st-container {
    padding-top: 40px;
}

.sl-catalog > .sl-toolbar + .st-container,
.sl-catalog > .sl-toolbar__sentinel + .sl-toolbar + .st-container {
    padding-top: 32px;
}

.sl-catalog__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.sl-count {
    flex: none;
    margin: 0;
    white-space: nowrap;
    color: var(--st-muted);
    font-size: 14px;
    font-weight: 500;
}

.sl-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.sl-grid[hidden] {
    display: none;
}

.sl-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 8px;
    border: 1px solid var(--st-line);
    border-radius: var(--st-radius);
    background: var(--st-surface);
    box-shadow: var(--st-shadow-sm);
    transition: transform 0.35s var(--st-ease), box-shadow 0.35s var(--st-ease), border-color 0.3s ease;
}

.sl-card:hover {
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: var(--st-shadow-lg);
}

.sl-card:focus-within {
    outline: 2px solid var(--st-violet);
    outline-offset: 2px;
}

.sl-card__art {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
}

.sl-card__art::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(70% 70% at 50% 45%, rgba(255, 255, 255, 0.55), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.sl-card:hover .sl-card__art::after {
    opacity: 1;
}

.sl-card__icon {
    transition: transform 0.45s var(--st-ease);
}

.sl-card:hover .sl-card__icon {
    transform: translateY(-4px) rotate(-4deg);
}

.sl-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}

.sl-card__badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.sl-card__badges .st-badge--low,
.sl-card__badges .st-badge--out {
    background: rgba(255, 255, 255, 0.9);
}

.sl-card__cat {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--st-ink);
    font-size: 12px;
    font-weight: 600;
}

.sl-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px 12px 10px;
}

.sl-card__name {
    color: var(--st-ink);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.015em;
}

.sl-card__link {
    text-decoration: none;
}

.sl-card__link:focus-visible {
    outline: none;
}

/* One link per card, stretched over the whole surface. */
.sl-card__link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: var(--st-radius);
}

.sl-card__excerpt {
    display: -webkit-box;
    margin-top: 8px !important;
    overflow: hidden;
    color: var(--st-muted);
    font-size: 14.5px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.sl-card__foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--st-line);
}

/* Gap above the divider, whether or not the card has an excerpt. */
.sl-card__body > :nth-last-child(2) {
    margin-bottom: 18px !important;
}

.sl-card .st-price__was {
    font-size: 13px;
}

.sl-card__go {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--st-line-strong);
    border-radius: 999px;
    color: var(--st-ink);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.sl-card__go svg {
    width: 18px;
    height: 18px;
    transition: transform 0.35s var(--st-ease);
}

.sl-card:hover .sl-card__go {
    border-color: var(--st-ink);
    background: var(--st-ink);
    color: #fff;
}

.sl-card:hover .sl-card__go svg {
    transform: translateX(3px);
}

.sl-card.is-out .sl-card__art {
    filter: saturate(0.4);
}

/* Skeleton cards mirror the real card anatomy. */
.sl-card--skeleton {
    box-shadow: none;
}

.sl-card--skeleton:hover {
    transform: none;
    border-color: var(--st-line);
    box-shadow: none;
}

.sl-sk-art {
    aspect-ratio: 16 / 10;
    border-radius: var(--st-radius-sm);
}

.sl-sk-line {
    height: 18px;
    margin-bottom: 12px;
    border-radius: 6px;
}

.sl-sk-line--sm {
    height: 12px;
    margin-bottom: 8px;
}

.sl-card--skeleton .sl-card__foot {
    margin-top: 18px;
}

.sl-sk-price {
    width: 140px;
    height: 28px;
    border-radius: 8px;
}

.sl-sk-go {
    width: 44px;
    height: 44px;
    border-radius: 999px;
}

/* Staggered entrance after each filter change. */
@media (prefers-reduced-motion: no-preference) {
    .sl-grid.is-entering .sl-card {
        animation: sl-rise 0.5s var(--st-ease) both;
        animation-delay: calc(var(--i, 0) * 40ms);
    }
}

@keyframes sl-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* Empty / error / closed states */
.sl-state[hidden] {
    display: none;
}

.sl-empty {
    display: grid;
    justify-items: center;
    padding: 64px 24px;
    border: 1px dashed var(--st-line-strong);
    border-radius: var(--st-radius);
    background: rgba(255, 255, 255, 0.55);
    text-align: center;
}

.sl-empty__icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
    border-radius: 18px;
    background: var(--st-surface);
    box-shadow: var(--st-shadow);
    color: var(--st-violet);
}

.sl-empty__icon svg {
    width: 26px;
    height: 26px;
}

.sl-empty__title {
    color: var(--st-ink);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sl-empty__text {
    max-width: 46ch;
    margin-top: 8px !important;
    color: var(--st-muted);
    font-size: 15px;
    overflow-wrap: anywhere;
}

.sl-empty__text strong {
    color: var(--st-ink);
    font-weight: 600;
}

.sl-empty__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

/* ---------- Custom-solution band (the one dark block) ---------- */

.sl-band {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    overflow: hidden;
    isolation: isolate;
    padding: 48px 56px;
    border-radius: var(--st-radius);
    background: var(--st-ink);
    color: #fff;
}

.sl-band::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -10%;
    z-index: -1;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: var(--st-gradient);
    opacity: 0.28;
    filter: blur(90px);
}

.sl-band__title {
    max-width: 26ch;
    text-wrap: balance;
    color: #fff;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.sl-band__text {
    max-width: 52ch;
    margin-top: 12px !important;
    color: rgba(255, 255, 255, 0.72);
    font-size: 16px;
}

.sl-btn-light {
    flex: none;
    background: #fff;
    color: var(--st-ink);
}

.sl-btn-light:hover {
    background: var(--st-bg-tint);
    color: var(--st-ink);
}

.sl-btn-light .sl-icon {
    transition: transform 0.3s var(--st-ease);
}

.sl-btn-light:hover .sl-icon {
    transform: translateX(3px);
}

.sl-btn-light:focus-visible {
    outline-color: #fff;
}

/* ---------- FAQ ---------- */

.sl-faq {
    padding-bottom: 32px;
}

.sl-faq__grid {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: 48px;
    align-items: start;
}

.sl-faq__text {
    margin-top: 12px !important;
    color: var(--st-muted);
}

.sl-faq__text a {
    color: var(--st-violet);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1199.98px) {
    .sl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sl-toolbar__bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .sl-tools {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .sl-search__input {
        width: 100%;
    }
}

@media (max-width: 991.98px) {
    .sl-hero__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .sl-trust {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sl-trust__item + .sl-trust__item {
        border-top: 0;
        border-left: 1px solid var(--st-line);
        border-radius: 0;
    }

    .sl-trust__item {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        font-size: 14px;
    }

    .sl-faq__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .sl-band {
        flex-direction: column;
        align-items: flex-start;
        padding: 40px;
    }
}

@media (max-width: 767.98px) {
    .sl-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .sl-trust {
        grid-template-columns: minmax(0, 1fr);
    }

    .sl-trust__item {
        flex-direction: row;
        align-items: center;
    }

    .sl-trust__item + .sl-trust__item {
        border-left: 0;
        border-top: 1px solid var(--st-line);
    }
}

@media (max-width: 575.98px) {
    .sl-page {
        --sl-header-offset: 74px;
    }

    .sl-hero {
        padding: 32px 0 28px;
    }

    .sl-hero__title {
        font-size: clamp(36px, 11vw, 44px);
    }

    .sl-hero__lead {
        font-size: 16px;
    }

    .sl-hero__actions .st-btn {
        flex: 1 1 auto;
    }

    .sl-trust {
        padding: 6px;
    }

    .sl-trust__item {
        padding: 10px;
        font-size: 14px;
    }

    .sl-trust__icon {
        width: 36px;
        height: 36px;
    }

    .sl-toolbar .st-container {
        padding: 0 12px;
    }

    .sl-toolbar__bar {
        padding: 6px;
        border-radius: 18px;
    }

    .sl-search__kbd {
        display: none;
    }

    .sl-search__input {
        padding-right: 14px;
        font-size: 16px; /* stops iOS zoom on focus */
    }

    .sl-sort__select {
        font-size: 15px;
        padding-right: 34px;
    }

    .sl-catalog {
        padding: 0 0 56px;
    }

    .sl-catalog > .sl-toolbar + .st-container {
        padding-top: 24px;
    }

    .sl-catalog__head {
        margin-bottom: 16px;
    }

    .sl-band {
        padding: 32px 24px;
    }

    .sl-band .st-btn {
        width: 100%;
    }
}

/* `.st-body a { color: inherit }` outranks the button colour classes, so
   link-buttons restate their label colour here. */
.sl-page a.st-btn--primary,
.sl-page a.st-btn--primary:hover {
    color: #fff;
}

.sl-page a.st-btn--ghost {
    color: var(--st-ink);
}

.sl-page a.sl-btn-light,
.sl-page a.sl-btn-light:hover {
    color: var(--st-ink);
}

/* Card price: amount + was on the first line, savings + cadence below. */
.sl-card .st-price {
    row-gap: 6px;
}

.sl-card .st-price__amount {
    font-size: 22px;
}

.sl-card .st-price .st-badge--save {
    order: 3;
    height: 22px;
    padding: 0 8px;
    font-size: 11.5px;
}

.sl-card .st-price__cadence {
    order: 4;
    flex-basis: auto;
}

.sl-card .st-price::after {
    content: '';
    order: 2;
    flex-basis: 100%;
    height: 0;
}

/* Fade the chip row edge when it overflows (set from JS). */
.sl-chips.is-overflowing {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
}

@media (min-width: 1200px) {
    .sl-search__input {
        width: 172px;
    }

    .sl-chips {
        gap: 0;
    }

    .sl-chips .st-chip {
        padding: 0 13px;
    }
}
