.tf-category-products {
    --tf-cp-gap: 1.25rem;
    --tf-cp-panel-radius: 20px;
    --tf-cp-title-size: clamp(1.5rem, 2.4vw, 2.25rem);
    padding: clamp(2rem, 5vw, 4rem) 0;
}

.flat-spacing > .tf-category-products {
    padding-top: 0;
    padding-bottom: 0;
}

.tf-category-products__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-bottom: clamp(1.25rem, 3vw, 2rem);
    flex-wrap: nowrap;
    width: 100%;
}

.tf-category-products__titles {
    min-width: 0;
    flex: 1 1 auto;
}

.tf-category-products__title {
    margin: 0;
    font-family: var(--tf-typography-headingFontFamily, var(--tf-typography-fontFamily, "Instrument Serif", Georgia, serif));
    font-size: var(--tf-cp-title-size);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--tf-title-color, inherit);
}

.tf-category-products__subtitle {
    margin-top: 0.5rem;
    max-width: 38rem;
}

.tf-category-products__subtitle-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: color-mix(in srgb, currentColor 62%, transparent);
}

.tf-category-products__more {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
    gap: 0.45rem;
    padding: 0.55rem 0.9rem 0;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
    color: inherit;
    text-decoration: none;
    font-size: var(--tf-more-link-text-font-size, 0.875rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.tf-category-products--category_product_1 .tf-category-products__more,
.tf-category-products--category_product_2 .tf-category-products__more {
    border: 0;
}

.tf-category-products__more-label {
    color: inherit;
    font: inherit;
}

.tf-category-products__more i {
    font-size: 1em;
    color: inherit;
    transition: transform 0.2s ease;
}

.tf-category-products__more:hover {
    transform: translateY(-1px);
    filter: brightness(0.97);
}

.tf-category-products__more:hover i {
    transform: translateX(3px);
}

/* Grid — grows downward */
.tf-category-products--grow-down .tf-products,
.tf-category-products--category_product_1 .tf-products,
.tf-category-products--layout_grid .tf-products {
    width: 100%;
}

/* Carousel — grows sideways */
.tf-category-products--grow-side .tf-category-products__swiper,
.tf-category-products--category_product_2 .tf-category-products__swiper,
.tf-category-products--layout_carousel .tf-category-products__swiper {
    overflow: visible;
}

.tf-category-products--grow-side .swiper-slide,
.tf-category-products--category_product_2 .swiper-slide,
.tf-category-products--layout_carousel .swiper-slide {
    height: auto;
}

/* Spotlight — full-bleed on desktop */
.tf-category-products__fullbleed {
    width: 100%;
    max-width: 100%;
    padding-left: clamp(1rem, 2.4vw, 2.5rem);
    padding-right: clamp(1rem, 2.4vw, 2.5rem);
}

.tf-category-products--spotlight .tf-category-products__spotlight,
.tf-category-products__spotlight {
    display: grid;
    grid-template-columns: minmax(220px, 26%) minmax(0, 1fr);
    gap: clamp(1.25rem, 2.4vw, 2rem);
    align-items: stretch;
    min-height: 0;
}

.tf-category-products__panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: var(--tf-cp-panel-radius);
    background:
        radial-gradient(120% 90% at 12% 18%, color-mix(in srgb, #ffffff 18%, transparent), transparent 55%),
        linear-gradient(155deg, #1c1917 0%, #3f3a34 48%, #1f1b18 100%);
    color: #f8f4ef;
    width: 100%;
    height: auto;
    align-self: stretch;
}

.tf-category-products__panel.has-image {
    background-color: #1c1917;
    background-image: var(--tf-cp-panel-image);
    background-size: cover;
    background-position: center;
}

.tf-category-products__panel-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(18, 16, 14, 0.08) 0%, rgba(18, 16, 14, 0.82) 100%),
        linear-gradient(90deg, rgba(18, 16, 14, 0.22), transparent 55%);
    z-index: 0;
    pointer-events: none;
}

.tf-category-products__panel-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.85rem;
    height: 100%;
    padding: clamp(1.25rem, 2.5vw, 2rem);
}

.tf-category-products__title--panel {
    color: #fff;
    font-size: clamp(1.5rem, 2.6vw, 2.35rem);
}

.tf-category-products__panel .tf-category-products__subtitle-text {
    color: rgba(255, 255, 255, 0.78);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tf-category-products__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    align-self: flex-start;
    margin-top: 0.35rem;
    padding: 0.7rem 1.15rem;
    border-radius: 999px;
    background: #fff;
    color: #1c1917;
    text-decoration: none;
    font-size: var(--tf-more-link-text-font-size, 0.875rem);
    font-weight: 650;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.tf-category-products__cta span {
    color: inherit;
    font: inherit;
}

.tf-category-products__cta i {
    font-size: 1em;
    color: inherit;
    transition: transform 0.2s ease;
}

.tf-category-products__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
    filter: brightness(0.98);
}

.tf-category-products__cta:hover i {
    transform: translateX(3px);
}

.tf-category-products__panel-products {
    position: relative;
    min-width: 0;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-self: stretch;
    padding-top: 0;
}

.tf-category-products__panel-products .tf-btn-swiper-main,
.tf-category-products__panel-products .tf-products,
.tf-category-products__panel-products .tf-category-products__carousel {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 0.85rem;
    row-gap: 0.75rem;
    align-items: start;
    overflow: visible;
}

.tf-category-products__panel-products .tf-swiper {
    grid-column: 1 / -1;
    grid-row: 1;
    overflow: hidden;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0 !important;
    padding: 0 !important;
}

.tf-category-products__panel-products .tf-swiper:not(.swiper-initialized) > .swiper-wrapper {
    display: flex;
}

.tf-category-products__panel-products .tf-swiper:not(.swiper-initialized) > .swiper-wrapper > .swiper-slide {
    flex-shrink: 0;
    box-sizing: border-box;
    width: calc((100% - var(--tf-cp-slide-gap, 16px)) / 2);
}

@media (min-width: 575px) {
    .tf-category-products__panel-products .tf-swiper:not(.swiper-initialized) > .swiper-wrapper > .swiper-slide {
        width: calc((100% - var(--tf-cp-slide-gap, 16px)) / 2);
    }
}

@media (min-width: 768px) {
    .tf-category-products__panel-products .tf-swiper:not(.swiper-initialized) > .swiper-wrapper > .swiper-slide {
        width: calc((100% - 2 * var(--tf-cp-slide-gap, 16px)) / 3);
    }
}

@media (min-width: 1200px) {
    .tf-category-products__panel-products .tf-swiper:not(.swiper-initialized) > .swiper-wrapper > .swiper-slide {
        width: calc((100% - (var(--tf-cp-cols, 4) - 1) * var(--tf-cp-slide-gap, 16px)) / var(--tf-cp-cols, 4));
    }
}

.tf-category-products__panel-products .swiper-wrapper {
    align-items: stretch;
    height: auto;
}

.tf-category-products__panel-products .swiper-slide {
    height: auto;
    display: flex;
    align-items: flex-start;
    box-sizing: border-box;
}

.tf-category-products__panel-products .swiper-slide > * {
    width: 100%;
    min-width: 0;
    height: auto;
}

/* Keep product cards at their native card-style size; only the panel follows. */
@media (min-width: 768px) {
    .tf-category-products__panel-products .card-product,
    .tf-category-products__panel-products [data-tf-product] {
        width: 100%;
        height: auto;
    }
}

.tf-category-products__panel-products .sw-scrollbar-default {
    grid-column: 1;
    grid-row: 2;
    margin: 0 !important;
    width: 100%;
    align-self: center;
}

.tf-category-products__panel-products .sw-main-nav {
    grid-column: 2;
    grid-row: 2;
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    margin: 0 !important;
    pointer-events: auto;
    z-index: 2;
}

.tf-category-products__panel-products .sw-main-nav .btn-nav_circle {
    flex: 0 0 auto;
}

/* Desktop — arrows only, no progress bar */
@media (min-width: 992px) {
    .tf-category-products__panel-products .sw-scrollbar-default {
        display: none !important;
    }

    .tf-category-products__panel-products .sw-main-nav {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}

html[data-device="desktop"] .tf-category-products__panel-products .sw-scrollbar-default,
body[data-device="desktop"] .tf-category-products__panel-products .sw-scrollbar-default {
    display: none !important;
}

html[data-device="desktop"] .tf-category-products__panel-products .sw-main-nav,
body[data-device="desktop"] .tf-category-products__panel-products .sw-main-nav {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}

/* Hide nav when all products fit one page (Swiper lock or sparse) */
.tf-category-products__panel-products .sw-main-nav:has(.swiper-button-lock),
.tf-category-products__panel-products:has(.tf-swiper--sparse) .sw-main-nav,
.tf-category-products__panel-products:has(.tf-swiper--overflow-locked) .sw-main-nav,
.tf-category-products__panel-products:has(.is-nav-locked) .sw-main-nav,
.tf-category-products__panel-products.is-nav-locked .sw-main-nav,
.tf-btn-swiper-main.is-nav-locked > .sw-main-nav {
    display: none !important;
}

.tf-category-products__panel-products .nav-prev-swiper.swiper-button-lock,
.tf-category-products__panel-products .nav-next-swiper.swiper-button-lock {
    display: none !important;
}

@media (max-width: 1399px) {
    .tf-category-products__spotlight {
        grid-template-columns: minmax(200px, 28%) minmax(0, 1fr);
    }
}

@media (max-width: 1199px) {
    .tf-category-products__spotlight {
        grid-template-columns: minmax(180px, 30%) minmax(0, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 991px) {
    .tf-category-products__spotlight {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        align-items: stretch;
    }

    .tf-category-products__panel {
        aspect-ratio: 16 / 10;
        min-height: 240px;
        height: auto;
    }

    .tf-category-products__panel-products {
        height: auto;
        align-self: stretch;
    }

    .tf-category-products__panel-products .sw-main-nav {
        display: none !important;
    }
}

/*
 * Mobile — hide banner panel and restore showcase-style product cards
 * (storefront media + Theme Studio data-device preview).
 */
@media (max-width: 767.98px) {
    .tf-category-products__spotlight {
        grid-template-columns: 1fr;
    }

    .tf-category-products__panel {
        display: none !important;
    }

    .tf-category-products__panel-products .tf-btn-swiper-main,
    .tf-category-products__panel-products .tf-products,
    .tf-category-products__panel-products .tf-category-products__carousel {
        display: block;
        height: auto;
        min-height: 0;
        grid-template-columns: unset;
        grid-template-rows: unset;
        column-gap: unset;
        row-gap: unset;
        overflow: visible;
    }

    .tf-category-products__panel-products .tf-swiper {
        grid-column: unset;
        grid-row: unset;
        height: auto;
        overflow: visible;
    }

    .tf-category-products__panel-products .swiper-wrapper {
        align-items: stretch;
        height: auto;
    }

    .tf-category-products__panel-products .swiper-slide {
        height: auto;
    }

    .tf-category-products__panel-products .swiper-slide > * {
        height: auto;
    }

    .tf-category-products__panel-products .card-product,
    .tf-category-products__panel-products [data-tf-product] {
        height: auto;
    }

    /* Let the theme card aspect ratio win (portrait / square), not the panel stretch */
    .tf-category-products__panel-products .card-product_wrapper,
    .tf-category-products__panel-products .card-product .card-product_wrapper {
        flex: 0 0 auto;
        aspect-ratio: 0.8285714286;
        height: auto;
    }

    .tf-category-products__panel-products .card-product_wrapper.square,
    .tf-category-products__panel-products .card-product .card-product_wrapper.square {
        aspect-ratio: 1 / 1;
    }

    .tf-category-products__panel-products .card-product_wrapper .product-img,
    .tf-category-products__panel-products .card-product .product-img {
        height: 100%;
    }

    /* Match style 2 card meta: start-aligned, reserved name height */
    .tf-category-products__panel-products .card-product_info,
    .tf-category-products__panel-products .card-product .card-product_info {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        place-content: start;
        text-align: start;
        gap: 6px;
        padding-top: 12px;
        width: 100%;
    }

    .tf-category-products__panel-products .card-product_info .product-info__rate,
    .tf-category-products__panel-products .card-product .product-info__rate {
        justify-content: flex-start;
    }

    .tf-category-products__panel-products .card-product_info .name-product,
    .tf-category-products__panel-products .card-product .name-product {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: calc(1.25em * 2);
        max-width: 100%;
        line-height: 1.25;
        text-align: start;
    }

    .tf-category-products__panel-products .card-product_info .price-wrap,
    .tf-category-products__panel-products .card-product .price-wrap,
    .tf-category-products__panel-products .card-product_info .content-price.price-wrap {
        display: inline-flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
        max-width: 100%;
    }

    .tf-category-products__panel-products .card-product_info .br-line,
    .tf-category-products__panel-products .card-product .br-line {
        width: 100%;
    }

    .tf-category-products__panel-products .sw-scrollbar-default {
        grid-column: unset;
        grid-row: unset;
        width: 100%;
        margin-top: 16px !important;
    }

    .tf-category-products__panel-products .sw-main-nav {
        display: none !important;
    }
}

html[data-device="mobile"] .tf-category-products__spotlight,
body[data-device="mobile"] .tf-category-products__spotlight {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: stretch;
}

html[data-device="mobile"] .tf-category-products__panel,
body[data-device="mobile"] .tf-category-products__panel {
    display: none !important;
}

html[data-device="mobile"] .tf-category-products__panel-products,
body[data-device="mobile"] .tf-category-products__panel-products {
    height: auto;
    align-self: stretch;
}

html[data-device="mobile"] .tf-category-products__panel-products .tf-btn-swiper-main,
html[data-device="mobile"] .tf-category-products__panel-products .tf-products,
html[data-device="mobile"] .tf-category-products__panel-products .tf-category-products__carousel,
body[data-device="mobile"] .tf-category-products__panel-products .tf-btn-swiper-main,
body[data-device="mobile"] .tf-category-products__panel-products .tf-products,
body[data-device="mobile"] .tf-category-products__panel-products .tf-category-products__carousel {
    display: block;
    height: auto;
    min-height: 0;
    grid-template-columns: unset;
    grid-template-rows: unset;
    column-gap: unset;
    row-gap: unset;
    overflow: visible;
}

html[data-device="mobile"] .tf-category-products__panel-products .tf-swiper,
body[data-device="mobile"] .tf-category-products__panel-products .tf-swiper {
    grid-column: unset;
    grid-row: unset;
    height: auto;
    overflow: visible;
}

html[data-device="mobile"] .tf-category-products__panel-products .swiper-wrapper,
body[data-device="mobile"] .tf-category-products__panel-products .swiper-wrapper {
    align-items: stretch;
    height: auto;
}

html[data-device="mobile"] .tf-category-products__panel-products .swiper-slide,
body[data-device="mobile"] .tf-category-products__panel-products .swiper-slide {
    height: auto;
}

html[data-device="mobile"] .tf-category-products__panel-products .swiper-slide > *,
body[data-device="mobile"] .tf-category-products__panel-products .swiper-slide > * {
    height: auto;
}

html[data-device="mobile"] .tf-category-products__panel-products .card-product,
html[data-device="mobile"] .tf-category-products__panel-products [data-tf-product],
body[data-device="mobile"] .tf-category-products__panel-products .card-product,
body[data-device="mobile"] .tf-category-products__panel-products [data-tf-product] {
    height: auto;
}

html[data-device="mobile"] .tf-category-products__panel-products .card-product_wrapper,
html[data-device="mobile"] .tf-category-products__panel-products .card-product .card-product_wrapper,
body[data-device="mobile"] .tf-category-products__panel-products .card-product_wrapper,
body[data-device="mobile"] .tf-category-products__panel-products .card-product .card-product_wrapper {
    flex: 0 0 auto;
    aspect-ratio: 0.8285714286;
    height: auto;
}

html[data-device="mobile"] .tf-category-products__panel-products .card-product_wrapper.square,
html[data-device="mobile"] .tf-category-products__panel-products .card-product .card-product_wrapper.square,
body[data-device="mobile"] .tf-category-products__panel-products .card-product_wrapper.square,
body[data-device="mobile"] .tf-category-products__panel-products .card-product .card-product_wrapper.square {
    aspect-ratio: 1 / 1;
}

html[data-device="mobile"] .tf-category-products__panel-products .card-product_info,
html[data-device="mobile"] .tf-category-products__panel-products .card-product .card-product_info,
body[data-device="mobile"] .tf-category-products__panel-products .card-product_info,
body[data-device="mobile"] .tf-category-products__panel-products .card-product .card-product_info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    place-content: start;
    text-align: start;
    gap: 6px;
    padding-top: 12px;
    width: 100%;
}

html[data-device="mobile"] .tf-category-products__panel-products .card-product_info .product-info__rate,
html[data-device="mobile"] .tf-category-products__panel-products .card-product .product-info__rate,
body[data-device="mobile"] .tf-category-products__panel-products .card-product_info .product-info__rate,
body[data-device="mobile"] .tf-category-products__panel-products .card-product .product-info__rate {
    justify-content: flex-start;
}

html[data-device="mobile"] .tf-category-products__panel-products .card-product_info .name-product,
html[data-device="mobile"] .tf-category-products__panel-products .card-product .name-product,
body[data-device="mobile"] .tf-category-products__panel-products .card-product_info .name-product,
body[data-device="mobile"] .tf-category-products__panel-products .card-product .name-product {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.25em * 2);
    max-width: 100%;
    line-height: 1.25;
    text-align: start;
}

html[data-device="mobile"] .tf-category-products__panel-products .card-product_info .price-wrap,
html[data-device="mobile"] .tf-category-products__panel-products .card-product .price-wrap,
html[data-device="mobile"] .tf-category-products__panel-products .card-product_info .content-price.price-wrap,
body[data-device="mobile"] .tf-category-products__panel-products .card-product_info .price-wrap,
body[data-device="mobile"] .tf-category-products__panel-products .card-product .price-wrap,
body[data-device="mobile"] .tf-category-products__panel-products .card-product_info .content-price.price-wrap {
    display: inline-flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}

html[data-device="mobile"] .tf-category-products__panel-products .sw-scrollbar-default,
body[data-device="mobile"] .tf-category-products__panel-products .sw-scrollbar-default {
    grid-column: unset;
    grid-row: unset;
    width: 100%;
    margin-top: 16px !important;
}

html[data-device="mobile"] .tf-category-products__panel-products .sw-main-nav,
body[data-device="mobile"] .tf-category-products__panel-products .sw-main-nav,
html[data-device="tablet"] .tf-category-products__panel-products .sw-main-nav,
body[data-device="tablet"] .tf-category-products__panel-products .sw-main-nav {
    display: none !important;
}

@media (max-width: 575px) {
    .tf-category-products__head {
        align-items: flex-end;
    }

    .tf-category-products__more {
        flex-shrink: 0;
    }
}
