/* ==========================================================
   HOMEPAGE COLLECTION + SELECTION CARDS
   ========================================================== */
.sl-home-collections .sl-section-header {
    margin-bottom: 24px;
}

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

.sl-collection-card,
.sl-selection-related-card,
.sl-discovery-card.sl-discovery-card--selection {
    position: relative;
    display: flex;
    flex-direction: column;
    aspect-ratio: 4 / 5;
    min-height: 0;
    background: linear-gradient(180deg, #f7f1e9 0%, #f0e7db 100%);
    border: 1px solid rgba(66,58,50,0.08);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--sl-shadow-card);
}

.sl-collection-card-media,
.sl-selection-related-card__media,
.sl-discovery-card--selection .sl-discovery-card-media {
    position: relative;
    display: block;
    flex: 0 0 56%;
    min-height: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(255,255,255,0.78), transparent 18%),
        linear-gradient(135deg, #f6efe6 0%, #eee2d4 52%, #e7d8c8 100%);
    overflow: hidden;
}

.sl-collection-card.has-image .sl-collection-card-media::before,
.sl-selection-related-card.has-image .sl-selection-related-card__media::before,
.sl-discovery-card--selection.has-image .sl-discovery-card-media::before {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.34);
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0));
    pointer-events: none;
    z-index: 1;
}

.sl-collection-card.has-image .sl-collection-card-media::after,
.sl-selection-related-card.has-image .sl-selection-related-card__media::after,
.sl-discovery-card--selection.has-image .sl-discovery-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(30,28,26,0.04) 0%, rgba(30,28,26,0.16) 100%),
        radial-gradient(circle at top left, rgba(255,245,232,0.18), transparent 34%);
    pointer-events: none;
}

.sl-collection-card.no-image .sl-collection-card-media,
.sl-selection-related-card.no-image .sl-selection-related-card__media,
.sl-discovery-card--selection.no-image .sl-discovery-card-media {
    background:
        radial-gradient(circle at 18% 20%, rgba(255,255,255,0.82), transparent 18%),
        radial-gradient(circle at 80% 16%, rgba(212,196,178,0.82), transparent 22%),
        linear-gradient(135deg, #f8f3ec 0%, #efe4d7 52%, #e9dccd 100%);
}

.sl-collection-card-image,
.sl-collection-card-media img,
.sl-selection-related-card__image,
.sl-selection-related-card__media img,
.sl-discovery-card--selection .sl-discovery-card-image,
.sl-discovery-card--selection .sl-discovery-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sl-collection-card-art {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    isolation: isolate;
}

.sl-collection-card-art::before,
.sl-collection-card-art::after {
    content: "";
    position: absolute;
    display: block;
    border-radius: 999px;
    pointer-events: none;
}

.sl-collection-card-art::before {
    width: 52%;
    height: 52%;
    left: -10%;
    top: -8%;
    background: radial-gradient(circle at 58% 58%, rgba(255,255,255,0.22), rgba(169,184,169,0.22) 45%, rgba(169,184,169,0) 70%);
    filter: blur(6px);
    opacity: 0.9;
}

.sl-collection-card-art::after {
    width: 34%;
    height: 34%;
    right: 10%;
    bottom: 12%;
    background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.22), rgba(204,182,160,0.26) 58%, rgba(204,182,160,0) 70%);
    filter: blur(4px);
    opacity: 0.72;
}

.sl-collection-card-art__shape,
.sl-collection-card-art__line {
    position: absolute;
    display: block;
}

.sl-collection-card-art__shape--primary {
    inset: 22px 24px auto 24px;
    height: calc(100% - 70px);
    border-radius: 26px;
    border: 1px solid rgba(118,133,119,0.14);
    background:
        linear-gradient(145deg, rgba(255,255,255,0.72) 0%, rgba(255,255,255,0.12) 100%),
        linear-gradient(135deg, rgba(245,239,230,0.98) 0%, rgba(233,224,211,0.96) 54%, rgba(223,210,193,0.96) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.72),
        0 12px 28px rgba(116,103,89,0.08);
}

.sl-collection-card-art__shape--primary::before,
.sl-collection-card-art__shape--primary::after {
    content: "";
    position: absolute;
    display: block;
    pointer-events: none;
}

.sl-collection-card-art__shape--primary::before {
    inset: 16% -10% auto 18%;
    height: 40%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.44), rgba(255,255,255,0));
    transform: rotate(-18deg);
    opacity: 0.58;
}

.sl-collection-card-art__shape--primary::after {
    width: 44%;
    height: 44%;
    right: 8%;
    bottom: 12%;
    border-radius: 18px 18px 38px 18px;
    border: 1px solid rgba(111,127,112,0.16);
    background: linear-gradient(135deg, rgba(239,246,239,0.42), rgba(255,255,255,0.06));
}

.sl-collection-card-art__shape--secondary {
    width: 44%;
    height: 44%;
    right: -3%;
    top: -5%;
    border-radius: 0 0 0 999px;
    background:
        radial-gradient(circle at 28% 28%, rgba(255,255,255,0.42), rgba(214,196,176,0.78) 56%, rgba(214,196,176,0) 58%),
        linear-gradient(180deg, rgba(168,183,168,0.14), rgba(168,183,168,0));
    opacity: 0.95;
}

.sl-collection-card-art__line {
    left: 36px;
    right: 36px;
    bottom: 30px;
    height: 2px;
    background: linear-gradient(90deg, rgba(111,127,112,0), rgba(111,127,112,0.42), rgba(181,159,137,0.34), rgba(111,127,112,0));
}

.sl-collection-card-body,
.sl-selection-related-card__body,
.sl-discovery-card--selection .sl-discovery-card-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    padding: 22px 22px 24px;
    background: linear-gradient(180deg, rgba(251,248,244,0.98) 0%, rgba(245,239,230,1) 100%);
    border-top: 1px solid rgba(92,82,72,0.06);
}

.sl-collection-card-copy { display: grid; gap: 10px; }

.sl-collection-card-kicker,
.sl-discovery-card--selection .sl-discovery-card-type {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sl-sage);
}

.sl-collection-card-title,
.sl-selection-related-card__title {
    margin: 0;
    font-size: 28px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.sl-discovery-card--selection .sl-discovery-card-title {
    margin: 0;
    font-size: 21px;
    font-weight: 500;
    line-height: 1.2;
}

.sl-collection-card-title a,
.sl-selection-related-card__title a,
.sl-discovery-card--selection .sl-discovery-card-title a {
    color: inherit;
    text-decoration: none;
}

.sl-collection-card-text,
.sl-selection-related-card__text,
.sl-discovery-card--selection .sl-discovery-card-copy {
    margin: 0;
    color: var(--sl-text-muted);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sl-collection-card-link,
.sl-selection-related-card__link,
.sl-discovery-card--selection .sl-discovery-card-link {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--sl-sage);
    transition: color 0.2s ease;
}

.sl-collection-card-link:hover,
.sl-selection-related-card__link:hover,
.sl-discovery-card--selection .sl-discovery-card-link:hover {
    color: var(--sl-sage-dark);
}

/* Collection page */
.sl-page-hero--collection { padding-bottom: 24px; }

.sl-page-hero__inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sl-collection-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sl-collection-page-wrap,
.sl-curated-selection-wrap { padding-bottom: 56px; }

.sl-collection-page-featured-media,
.sl-curated-selection-featured-media {
    margin-bottom: 24px;
    border-radius: 24px;
    overflow: hidden;
    background: var(--sl-cream-deep);
}

.sl-collection-page-featured-image,
.sl-curated-selection-featured-image {
    display: block;
    width: 100%;
    height: auto;
}

.sl-collection-page-intro,
.sl-curated-selection-content {
    background: var(--sl-white);
    border: 1px solid var(--sl-sand);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--sl-shadow-soft);
}

.sl-collection-page-products .sl-section-header { margin-bottom: 24px; }

.sl-collection-empty-state {
    background: var(--sl-white);
    border: 1px solid var(--sl-sand);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
}

.sl-collection-pagination { margin-top: 32px; }

.sl-collection-pagination .page-numbers {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.sl-collection-pagination a,
.sl-collection-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--sl-sand);
    text-decoration: none;
    color: inherit;
    background: var(--sl-white);
    transition: background 0.2s ease, color 0.2s ease;
}

.sl-collection-pagination .current {
    background: var(--sl-charcoal);
    color: var(--sl-white);
    border-color: var(--sl-charcoal);
}

/* Discovery grid */
.sl-discovery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.sl-discovery-card {
    background: var(--sl-white);
    border: 1px solid var(--sl-sand);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--sl-shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sl-discovery-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--sl-shadow-card);
}

.sl-discovery-card-media {
    display: block;
    aspect-ratio: 4 / 5;
    background: var(--sl-cream-deep);
}

.sl-discovery-card-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sl-discovery-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--sl-sage);
    background: linear-gradient(135deg, var(--sl-cream) 0%, var(--sl-cream-deep) 100%);
}

.sl-discovery-card-body {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.sl-discovery-card-type {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--sl-soft-green);
    color: var(--sl-sage-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sl-discovery-card-title {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.25;
}

.sl-discovery-card-title a,
.sl-discovery-card-link {
    color: inherit;
    text-decoration: none;
}

.sl-discovery-card-copy,
.sl-discovery-card-meta {
    margin: 0;
    color: var(--sl-text-muted);
    font-size: 14px;
    line-height: 1.7;
}

.sl-discovery-card-link {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sl-sage);
    transition: color 0.2s ease;
}

.sl-discovery-card-link:hover { color: var(--sl-sage-dark); }

.sl-discovery-card--selection .sl-discovery-card-type {
    min-height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

/* Homepage product loops — absorbed from former front-page-mobile.css */
@media (max-width: 767px) {
    .home .sl-product-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .home .sl-home-best-sellers .sl-product-name,
    .home .sl-home-new-arrivals .sl-product-name {
        min-height: auto;
    }
}

/* ==========================================================
   PHASE 4 HOMEPAGE COLLECTIONS RESPONSIVE CLEANUP
   ========================================================== */
@media (max-width: 1023px) {
    .sl-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .sl-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* ==========================================================
   PREMIUM HOMEPAGE PATCH — SINGLE COLLECTION MODE
   ========================================================== */
.sl-home-collections--single .sl-collection-grid--single {
    grid-template-columns: minmax(0, 1fr);
}

.sl-collection-card--single {
    aspect-ratio: auto;
    min-height: 0;
}

@media (max-width: 767px) {
    .sl-collection-card--single {
        border-radius: 22px;
    }

    .sl-collection-card--single .sl-collection-card-media {
        flex-basis: auto;
        aspect-ratio: 4 / 3;
    }

    .sl-collection-card--single .sl-collection-card-body {
        padding: 18px 18px 20px;
        gap: 12px;
    }

    .sl-collection-card--single .sl-collection-card-title {
        font-size: 22px;
    }

    .sl-collection-card--single .sl-collection-card-text {
        font-size: 14px;
        line-height: 1.7;
    }
}


/* ==========================================================
   PREMIUM HOMEPAGE PATCH — PHASE 2 CURATED BLOCK TIGHTENING
   ========================================================== */
.sl-home-collections--phase2 .sl-section-header {
    margin-bottom: 14px;
}

.sl-home-collections--phase2 .sl-collection-grid--single {
    gap: 0;
}

@media (max-width: 767px) {
    .sl-home-collections--phase2 .sl-section-header {
        margin-bottom: 10px;
    }

    .sl-home-collections--phase2 .sl-collection-card-body {
        padding: 20px 18px 20px;
    }

    .sl-home-collections--phase2 .sl-collection-card-title {
        font-size: 24px;
    }
}


/* ==========================================================
   PREMIUM COLLECTION PAGE REFINEMENT — CURATED + SELECTED ROUTES
   ========================================================== */
.sl-page-hero--collection {
    padding-top: 42px;
    padding-bottom: 20px;
}

.sl-page-hero--collection .sl-page-hero-meta {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sl-sage);
}

.sl-page-hero--collection .sl-page-hero-desc {
    max-width: 60ch;
}

.sl-page-hero--collection .sl-btn-outline {
    min-height: 44px;
}

.sl-collection-page-wrap,
.sl-curated-selection-wrap {
    display: grid;
    gap: 24px;
}

body.page-template-template-curated-selection .sl-curated-selection-content .woocommerce,
body.page-template-template-curated-selection .sl-curated-selection-content .wc-block-grid,
body.page-template-template-product-collection .sl-collection-page-products {
    margin-top: 0;
}

body.page-template-template-curated-selection .sl-curated-selection-content > *:first-child,
body.page-template-template-product-collection .sl-collection-page-intro > *:first-child {
    margin-top: 0 !important;
}

body.page-template-template-curated-selection .sl-curated-selection-content .woocommerce ul.products,
body.page-template-template-product-collection .sl-product-grid {
    margin-top: 18px;
}

body.page-template-template-curated-selection .sl-curated-selection-content .woocommerce .products::before,
body.page-template-template-curated-selection .sl-curated-selection-content .woocommerce .products::after {
    display: none !important;
}

@media (max-width: 767px) {
    .sl-page-hero--collection {
        padding-top: 28px;
        padding-bottom: 14px;
        margin-bottom: 26px;
    }

    .sl-page-hero--collection .sl-page-hero-title {
        font-size: clamp(24px, 9vw, 38px);
        margin-bottom: 0;
    }

    .sl-page-hero--collection .sl-page-hero-desc {
        font-size: 14px;
        line-height: 1.75;
    }

    .sl-collection-page-actions {
        width: 100%;
    }

    .sl-collection-page-actions .sl-btn-outline {
        width: 100%;
        justify-content: center;
    }

    .sl-collection-page-featured-media,
    .sl-curated-selection-featured-media {
        margin-bottom: 0;
        border-radius: 20px;
    }

    .sl-collection-page-intro,
    .sl-curated-selection-content {
        border-radius: 18px;
        padding: 18px 16px;
    }

    .sl-collection-page-products .sl-section-header {
        margin-bottom: 16px;
    }

    body.page-template-template-curated-selection .sl-curated-selection-content .woocommerce ul.products,
    body.page-template-template-product-collection .sl-product-grid {
        margin-top: 14px;
    }
}


/* ==========================================================
   PHASE 4 HOMEPAGE PRODUCT RAILS — STANDARDIZED DISCOVERY
   ========================================================== */
.sl-home-product-rail .sl-home-rail-shell {
    border: 1px solid var(--sl-sand);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(247,243,237,0.92) 100%);
    box-shadow: var(--sl-shadow-soft);
    padding: 24px;
}

.sl-home-product-rail .sl-home-rail-header {
    margin-bottom: 18px;
    gap: 18px;
    align-items: flex-end;
}

.sl-home-rail-copy {
    max-width: 58ch;
}

.sl-home-rail-eyebrow {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sl-sage);
}

.sl-home-rail-subtitle {
    max-width: 48ch;
}

.sl-home-rail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.sl-home-rail-count,
.sl-home-rail-swipe {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sl-home-rail-count {
    color: var(--sl-charcoal);
    background: rgba(116, 134, 116, 0.10);
    border: 1px solid rgba(116, 134, 116, 0.16);
}

.sl-home-rail-swipe {
    color: var(--sl-text-muted);
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(66,58,50,0.08);
}

.sl-home-rail-track {
    position: relative;
    min-width: 0;
}

.sl-home-product-rail .sl-product-grid--homepage-rail {
    gap: 16px;
}

.sl-home-product-rail .sl-product-grid--homepage-rail > .sl-product-card {
    min-width: 0;
}

.sl-home-rail-view-all {
    align-self: flex-start;
}

.sl-home-rail-footer {
    display: none;
    margin-top: 16px;
}

.sl-home-rail-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sl-charcoal);
    text-decoration: none;
}

.sl-home-rail-footer-link:hover {
    color: var(--sl-sage-dark);
}

@media (min-width: 768px) {
    .sl-home-rail-swipe {
        display: none;
    }
}

@media (max-width: 1023px) {
    .sl-home-product-rail .sl-home-rail-shell {
        padding: 22px;
    }

    .sl-home-product-rail .sl-product-grid--homepage-rail {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .sl-home-product-rail .sl-home-rail-shell {
        padding: 18px 16px;
        border-radius: 22px;
    }

    .sl-home-product-rail .sl-home-rail-header {
        margin-bottom: 14px;
        gap: 12px;
        align-items: stretch;
    }

    .sl-home-rail-copy {
        max-width: none;
    }

    .sl-home-rail-eyebrow {
        margin-bottom: 6px;
        font-size: 10px;
    }

    .sl-home-rail-subtitle {
        max-width: none;
    }

    .sl-home-rail-meta {
        gap: 8px;
        margin-top: 9px;
    }

    .sl-home-rail-count,
    .sl-home-rail-swipe {
        min-height: 28px;
        padding: 5px 10px;
        font-size: 10px;
    }

    .sl-home-rail-view-all {
        display: none;
    }

    .sl-home-rail-track {
        margin-inline: -16px;
    }

    .sl-home-rail-track::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 28px;
        pointer-events: none;
        background: linear-gradient(90deg, rgba(247,243,237,0), rgba(247,243,237,0.96));
    }

    .sl-home-product-rail .sl-product-grid--homepage-rail {
        display: flex;
        overflow-x: auto;
        gap: 12px;
        padding: 2px 16px 10px;
        margin: 0;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 16px;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .sl-home-product-rail .sl-product-grid--homepage-rail::-webkit-scrollbar {
        display: none;
    }

    .sl-home-product-rail .sl-product-grid--homepage-rail > .sl-product-card {
        flex: 0 0 min(72vw, 276px);
        max-width: min(72vw, 276px);
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    .sl-home-product-rail .sl-product-grid--homepage-rail > .sl-product-card:last-child {
        margin-right: 4px;
    }

    .sl-home-product-rail .sl-product-grid--homepage-rail > .sl-product-card .sl-product-card-box {
        min-height: 100%;
    }

    .sl-home-rail-footer {
        display: flex;
        margin-top: 14px;
    }
}

/* Central category route chips for New Arrivals / Most Loved collection pages */
.sl-collection-page-category-routes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2px;
}

.sl-collection-page-category-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border: 1px solid rgba(92,122,94,0.2);
    border-radius: 999px;
    background: rgba(255,255,255,0.76);
    color: var(--sl-charcoal);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(40,42,36,0.06);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.sl-collection-page-category-chip:hover,
.sl-collection-page-category-chip:focus-visible,
.sl-collection-page-category-chip.is-current {
    transform: translateY(-1px);
    border-color: rgba(92,122,94,0.38);
    background: var(--sl-soft-green);
    color: var(--sl-sage-dark);
}

@media (max-width: 640px) {
    .sl-collection-page-category-routes {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .sl-collection-page-category-chip {
        flex: 0 0 auto;
        min-height: 34px;
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ==========================================================
   MARKET HOMEPAGE PATCH — RAIL ORDER + BUDGET PICKS
   ========================================================== */
.sl-home-budget-picks .sl-home-rail-shell {
    background:
        radial-gradient(circle at top left, rgba(140,160,139,0.10), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,0.97) 0%, rgba(248,244,238,0.94) 100%);
}

.sl-home-budget-picks .sl-home-rail-count {
    color: var(--sl-sage-dark);
    background: rgba(92,122,94,0.11);
    border-color: rgba(92,122,94,0.18);
}

.sl-home-collections--single .sl-section-header--solo {
    align-items: flex-start;
}

.sl-home-collections--single .sl-section-subtitle {
    margin: 6px 0 0;
    max-width: 42ch;
}

@media (max-width: 767px) {
    .sl-home-product-rail .sl-home-rail-shell {
        padding: 16px 14px;
    }

    .sl-home-rail-track {
        margin-inline: -14px;
    }

    .sl-home-product-rail .sl-product-grid--homepage-rail {
        padding-inline: 14px;
        gap: 10px;
    }

    .sl-home-product-rail .sl-product-grid--homepage-rail > .sl-product-card {
        flex-basis: min(64vw, 248px);
        max-width: min(64vw, 248px);
    }

    .sl-product-card--homepage .sl-product-name {
        min-height: auto;
        -webkit-line-clamp: 2;
    }

    .sl-product-card--homepage .sl-product-card-actions .sl-add-btn,
    .sl-product-card--homepage .sl-product-card-actions .sl-view-btn {
        min-height: 40px;
        padding-block: 10px;
    }
}


/* ==========================================================
   PHASE 2A HOMEPAGE SELECTION PRODUCT RAILS
   ========================================================== */
.sl-home-selection-stack {
    display: grid;
    gap: 18px;
}

.sl-home-selection-block {
    display: grid;
    gap: 12px;
}

.sl-home-selection-count {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 2px 0 0;
    padding: 6px 10px;
    border: 1px solid rgba(92,122,94,0.16);
    border-radius: 999px;
    background: rgba(92,122,94,0.09);
    color: var(--sl-sage-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sl-home-selection-products .sl-home-rail-shell {
    padding: 16px;
    border-radius: 22px;
    background: rgba(255,255,255,0.82);
    box-shadow: none;
}

.sl-home-selection-products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.sl-home-selection-products-title {
    margin: 0;
    color: var(--sl-charcoal);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

@media (max-width: 767px) {
    .sl-home-selection-stack {
        gap: 16px;
    }

    .sl-home-selection-products .sl-home-rail-shell {
        padding: 14px;
        border-radius: 20px;
    }

    .sl-home-selection-products .sl-home-rail-track {
        margin-inline: -14px;
    }

    .sl-home-selection-products .sl-product-grid--homepage-rail {
        padding-inline: 14px;
        gap: 10px;
    }

    .sl-home-selection-products .sl-product-grid--homepage-rail > .sl-product-card {
        flex-basis: min(64vw, 248px);
        max-width: min(64vw, 248px);
    }
}

/* ==========================================================
   PHASE 2B HOMEPAGE SELECTION POLISH
   ========================================================== */
.sl-home-selection-stack,
.sl-home-selection-block,
.sl-home-collections .sl-collection-grid,
.sl-home-collections .sl-collection-card,
.sl-home-collections .sl-collection-card-body,
.sl-home-collections .sl-collection-card-copy {
    min-width: 0;
}

.sl-home-collections .sl-collection-card {
    overflow: hidden;
}

.sl-home-collections .sl-collection-card-title,
.sl-home-collections .sl-collection-card-text,
.sl-home-collections .sl-section-subtitle {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}

.sl-home-collections .sl-collection-card-title a {
    display: inline;
    color: inherit;
}

.sl-home-collections .sl-collection-card.is-compact-selection {
    padding-block: clamp(20px, 5vw, 28px);
    background: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(246,239,229,0.64));
}

.sl-home-collections .sl-collection-card.is-compact-selection .sl-collection-card-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sl-home-collections .sl-collection-card.is-compact-selection .sl-home-selection-count {
    margin-top: 8px;
}

.sl-home-selection-products-title {
    line-height: 1.25;
}

@media (max-width: 767px) {
    .sl-home-collections.sl-section {
        margin-top: 24px;
    }

    .sl-home-collections .sl-section-header--solo {
        margin-bottom: 14px;
    }

    .sl-home-collections .sl-section-subtitle {
        font-size: 17px;
        line-height: 1.55;
    }

    .sl-home-selection-stack {
        gap: 14px;
    }

    .sl-home-selection-block {
        gap: 10px;
    }

    .sl-home-collections .sl-collection-card {
        padding: 30px 28px;
        border-radius: 26px;
    }

    .sl-home-collections .sl-collection-card.is-compact-selection {
        padding: 24px 26px;
        border-radius: 24px;
    }

    .sl-home-collections .sl-collection-card-title {
        font-size: clamp(30px, 8.4vw, 42px);
        line-height: 1.08;
        letter-spacing: -0.03em;
    }

    .sl-home-collections .sl-collection-card-text {
        font-size: 17px;
        line-height: 1.55;
    }

    .sl-home-selection-products .sl-home-rail-shell {
        padding: 14px;
        border-radius: 22px;
    }

    .sl-home-selection-products-header {
        margin-bottom: 10px;
    }

    .sl-home-selection-products .sl-home-rail-footer-link {
        font-size: 11px;
        white-space: nowrap;
    }
}

/* ==========================================================
   PHASE 3G SHOP BY MOOD CLARITY POLISH
   Aligns Shop by Mood closer to Most Loved / New Arrivals clarity
   ========================================================== */
.home .sl-home-collections--phase2 .sl-section-header--solo {
    margin-bottom: 18px;
}

.home .sl-home-collections--phase2 .sl-section-subtitle {
    max-width: 680px;
}

.home .sl-home-collections--phase2 .sl-home-selection-stack {
    gap: 16px;
}

.home .sl-home-collections--phase2 .sl-home-selection-block {
    gap: 12px;
}

.home .sl-home-collections--phase2 .sl-collection-card--single {
    min-height: auto;
}

.home .sl-home-collections--phase2 .sl-collection-card-body {
    align-items: flex-start;
    text-align: left;
}

.home .sl-home-collections--phase2 .sl-collection-card-copy {
    align-items: flex-start;
    text-align: left;
}

.home .sl-home-collections--phase2 .sl-collection-card-title,
.home .sl-home-collections--phase2 .sl-collection-card-title a {
    text-align: left;
}

.home .sl-home-collections--phase2 .sl-collection-card-text {
    max-width: 620px;
    text-align: left;
}

.home .sl-home-collections--phase2 .sl-collection-card-link {
    align-self: flex-start;
}

.home .sl-home-selection-products .sl-home-rail-shell {
    border: 1px solid rgba(214, 203, 190, 0.88);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.94), rgba(250,246,239,0.88));
    box-shadow: 0 18px 42px rgba(38, 34, 29, 0.06);
}

.home .sl-home-selection-products-header {
    align-items: flex-start;
    margin-bottom: 14px;
}

.home .sl-home-selection-products-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.home .sl-home-selection-products-kicker {
    margin: 0;
    color: var(--sl-sage-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1.25;
    text-transform: uppercase;
}

.home .sl-home-selection-products-heading {
    margin: 0;
    color: var(--sl-charcoal);
    font-family: var(--sl-font-serif);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.03em;
}

.home .sl-home-selection-products-subtitle {
    margin: 0;
    max-width: 440px;
    color: rgba(32, 32, 32, 0.66);
    font-size: 15px;
    line-height: 1.55;
}

@media (max-width: 767px) {
    .home .sl-home-collections--phase2 .sl-section-header--solo {
        margin-bottom: 14px;
    }

    .home .sl-home-collections--phase2 .sl-section-title {
        font-size: clamp(36px, 11vw, 46px);
    }

    .home .sl-home-collections--phase2 .sl-section-subtitle {
        font-size: 19px;
        line-height: 1.55;
    }

    .home .sl-home-collections--phase2 .sl-collection-card--single {
        padding: 26px 24px;
        border-radius: 24px;
    }

    .home .sl-home-collections--phase2 .sl-collection-card-kicker {
        font-size: 11px;
        letter-spacing: 0.16em;
    }

    .home .sl-home-collections--phase2 .sl-collection-card-title {
        font-size: clamp(31px, 8.8vw, 39px);
        line-height: 1.08;
        letter-spacing: -0.035em;
    }

    .home .sl-home-collections--phase2 .sl-collection-card-text {
        font-size: 18px;
        line-height: 1.48;
    }

    .home .sl-home-collections--phase2 .sl-home-selection-count {
        margin-top: 4px;
    }

    .home .sl-home-selection-products .sl-home-rail-shell {
        padding: 20px 0 18px;
        border-radius: 24px;
    }

    .home .sl-home-selection-products-header {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0 20px;
        margin-bottom: 14px;
    }

    .home .sl-home-selection-products-header .sl-home-rail-footer-link {
        justify-self: start;
        width: auto;
        min-height: 38px;
        padding: 9px 14px;
        border: 1px solid rgba(92, 122, 94, 0.16);
        border-radius: 999px;
        background: rgba(92, 122, 94, 0.08);
        color: var(--sl-sage-dark);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.09em;
        text-decoration: none;
        text-transform: uppercase;
    }

    .home .sl-home-selection-products-heading {
        font-size: clamp(34px, 9vw, 42px);
    }

    .home .sl-home-selection-products-subtitle {
        font-size: 16px;
        line-height: 1.5;
    }

    .home .sl-home-selection-products .sl-home-rail-track {
        margin-inline: 0;
    }

    .home .sl-home-selection-products .sl-product-grid--homepage-rail {
        padding-inline: 20px;
    }
}

@media (max-width: 420px) {
    .home .sl-home-collections--phase2 .sl-collection-card--single {
        padding: 24px 22px;
    }

    .home .sl-home-selection-products-header {
        padding-inline: 18px;
    }

    .home .sl-home-selection-products .sl-product-grid--homepage-rail {
        padding-inline: 18px;
    }
}
