/* ==========================================================================
   New design (Carrot, Oct 2026): favourites and sample-list pages (screens 20, 21)
   Kicker + big title, empty states (drawn heart), "Popular this season" cards that slide sideways,
   full-width buttons. Values from the delivered prototype (app.css .flow-head, .flow-empty,
   .sugg-*, .empty-heart, .app-cta-btn). Loaded only for Preview users.
   ========================================================================== */

.s2-favs {
    background: #fff;
    font-family: var(--s2-font);
}

/* ---------- "SAVED / FAVOURITES" ---------- */
.s2-flow-head {
    padding: 22px 16px 14px;
    text-align: center;
}
.s2-flow-head > * {
    animation: s2FadeDown 0.6s var(--s2-ease-out) both;
}
.s2-flow-head .s2-kicker {
    margin: 0 0 4px;
    animation-delay: 0.1s;
}
.s2-flow-title {
    margin: 0;
    font-family: var(--s2-font);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--s2-indigo);
    animation-delay: 0.17s;
}

/* "N saved fabrics / N in sample list" right under the title */
.s2-list-head.s2-list-head-top {
    border-top: 1px solid var(--s2-border);
}

/* ---------- Full-width buttons ---------- */
.s2-btn-block {
    width: 100%;
}
.s2-cta-wrap {
    padding: 22px 16px 24px;
}
.s2-cta-wrap.s2-cta-explore {
    padding: 4px 16px 24px;
    animation: s2LogoRise 0.6s var(--s2-ease-out) 0.9s both;
}
.s2-btn.is-sending {
    opacity: 0.85;
    pointer-events: none;
}

/* A card taken off the favourites fades and shrinks away */
.s2-fav-item {
    min-width: 0;
    transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.55, 0, 0.35, 1);
}
.s2-fav-item.is-removing {
    opacity: 0;
    transform: scale(0.92);
}

/* ---------- Empty state: the heart draws its outline, then beats once ---------- */
.s2-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 32px 8px;
    text-align: center;
}
.s2-empty-heart {
    width: 56px;
    height: 56px;
    margin-bottom: 18px;
    fill: none;
    stroke: var(--s2-indigo);
    stroke-width: 1.2;
    stroke-linejoin: round;
    animation: s2FavPop 0.5s var(--s2-ease-spring) 1.5s both;
}
.s2-empty-heart path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: s2HeartDraw 1.2s var(--s2-ease-in-out) 0.3s forwards;
}
.s2-empty-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--s2-indigo);
    animation: s2LogoRise 0.6s var(--s2-ease-out) 0.25s both;
}
.s2-empty-text {
    margin: 0 0 20px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--s2-text-muted);
    animation: s2LogoRise 0.6s var(--s2-ease-out) 0.32s both;
}

/* ---------- "Popular this season" ---------- */
.s2-sugg {
    margin-top: 12px;
    padding: 18px 0 28px;
    border-top: 1px solid var(--s2-border);
    font-family: var(--s2-font);
}
.s2-sugg-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 4px 16px 12px;
}
.s2-sugg-track {
    display: flex;
    gap: 4px;
    padding: 0 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 16px;
    scrollbar-width: none;
}
.s2-sugg-track::-webkit-scrollbar {
    display: none;
}
.s2-sugg-card {
    flex: 0 0 46%;
    min-width: 0;
    scroll-snap-align: start;
    animation: s2SlideIn 0.6s var(--s2-ease-out) calc(0.45s + var(--d, 0) * 80ms) both;
}
.s2-sugg-media {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--s2-light-gray);
}
.s2-sugg-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.s2-sugg-tag {
    position: absolute;
    left: 0;
    top: 0;
    padding: 4px 7px;
    background: var(--s2-indigo);
    font-size: 10px;
    font-weight: 600;
    line-height: normal;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
}
.s2-sugg-name {
    display: block;
    padding: 8px 2px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 12px;
    font-weight: 600;
    color: var(--s2-indigo);
    text-decoration: none;
}
.s2-sugg-add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 9px 8px;
    border: 1.5px solid var(--s2-indigo);
    border-radius: 0;
    background: #fff;
    font-family: var(--s2-font);
    font-size: 12px;
    font-weight: 600;
    color: var(--s2-indigo);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.25s ease, color 0.25s ease;
}
.s2-sugg-add-plus {
    font-size: 16px;
    line-height: 1;
    transition: transform 0.4s var(--s2-ease-spring);
}
.s2-sugg-add.is-added,
.s2-sugg-add:disabled.is-added {
    background: var(--s2-indigo);
    color: #fff;
    pointer-events: none;
}
.s2-sugg-add.is-added .s2-sugg-add-plus {
    transform: rotate(45deg) scale(0);
}

@keyframes s2FadeDown {
    from { opacity: 0; transform: translateY(-12px); letter-spacing: 0.12em; }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes s2HeartDraw {
    to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .s2-flow-head > *, .s2-empty-heart, .s2-empty-heart path, .s2-empty-title, .s2-empty-text,
    .s2-sugg-card, .s2-cta-wrap.s2-cta-explore { animation: none; }
    .s2-empty-heart path { stroke-dashoffset: 0; }
}
