.react-products-page {
    background: var(--theme-background);
    color: var(--theme-text);
    font-family: var(--theme-font-family);
}

.react-products-page * {
    box-sizing: border-box;
}

.rtp-title {
    min-height: 190px;
    display: flex;
    align-items: center;
    background-color: var(--theme-box-background);
    background-position: center;
    background-size: cover;
}

.rtp-title-inner,
.rtp-container {
    width: min(100% - 30px, 1320px);
    margin: 0 auto;
}

.rtp-heading {
    margin: 0;
    font-size: clamp(24px, 4vw, 44px);
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: 0;
}

.rtp-section {
    padding: 34px 0;
}

.rtp-subtitle-row,
.rtp-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.rtp-subtitle {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.rtp-child-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.rtp-child {
    position: relative;
    display: block;
    min-height: 150px;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
    background: var(--theme-box-background);
}

.rtp-child img {
    display: block;
    width: 100%;
    height: 175px;
    object-fit: cover;
}

.rtp-child span {
    position: absolute;
    inset: auto 10px 10px;
    display: inline-flex;
    width: calc(100% - 20px);
    justify-content: center;
    padding: 8px 10px;
    background: rgba(0, 0, 0, .58);
    font-size: 14px;
    line-height: 1.25;
    text-align: center;
}

.rtp-sort {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.rtp-sort select {
    min-height: 38px;
    padding: 7px 34px 7px 12px;
    border: 1px solid color-mix(in srgb, var(--theme-text), transparent 78%);
    background: var(--theme-background);
    color: var(--theme-text);
    font: inherit;
}

#react-spa-root .rtp-layout-buttons {
    display: inline-flex;
    gap: 15px;
    align-items: center;
}

#react-spa-root .rtp-layout-button,
#react-spa-root .rtp-layout-button.active,
#react-spa-root .rtp-layout-button:hover {
    appearance: none;
    width: auto !important;
    height: 24px !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--theme-button-background) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    cursor: pointer;
    box-shadow: none !important;
    min-height: 0 !important;
    transition: opacity .2s ease;
}

#react-spa-root .rtp-layout-button {
    opacity: .35;
}

#react-spa-root .rtp-layout-icon {
    display: grid;
    grid-template-columns: repeat(var(--cols), 4px);
    grid-template-rows: repeat(2, 4px);
    gap: 5px;
}

#react-spa-root .rtp-layout-icon i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    display: block;
}

#react-spa-root .rtp-layout-button:hover,
#react-spa-root .rtp-layout-button.active {
    opacity: 1;
}

.rtp-grid {
    display: grid;
    gap: 18px 14px;
}

.rtp-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rtp-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rtp-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rtp-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rtp-grid.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.rtp-product {
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.rtp-product-media {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--theme-box-background);
    aspect-ratio: 5 / 7;
}

.rtp-product-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rtp-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    background: var(--theme-button-background);
    color: var(--theme-button-text);
    font-size: 12px;
}

.rtp-product-info {
    padding: 12px 4px 0;
    text-align: center;
}

.rtp-product-title {
    display: block;
    min-height: 40px;
    color: inherit;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.35;
}

.rtp-price-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    font-size: 14px;
}

.rtp-old-price {
    opacity: .58;
    text-decoration: line-through;
}

.rtp-product-actions {
    margin-top: 12px;
}

.rtp-product-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 180px);
    min-height: 38px;
    padding: 9px 14px;
    border: 1px solid var(--theme-button-background);
    background: var(--theme-button-background);
    color: var(--theme-button-text);
    font: inherit;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.rtp-product-button:disabled {
    cursor: not-allowed;
    opacity: .52;
}

.rtp-empty {
    padding: 60px 0;
    text-align: center;
}

.rtp-pager {
    margin-top: 34px;
}

.rtp-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 34px;
}

.rtp-pagination button {
    min-width: 38px;
    min-height: 38px;
    border: 1px solid color-mix(in srgb, var(--theme-text), transparent 78%);
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.rtp-pagination button.active {
    border-color: var(--theme-button-background);
    background: var(--theme-button-background);
    color: var(--theme-button-text);
}

@media (max-width: 1199px) {
    .rtp-grid.cols-5,
    .rtp-grid.cols-6 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .rtp-child-grid,
    .rtp-grid.cols-3,
    .rtp-grid.cols-4,
    .rtp-grid.cols-5,
    .rtp-grid.cols-6 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rtp-toolbar,
    .rtp-subtitle-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 575px) {
    .rtp-title-inner,
    .rtp-container {
        width: min(100% - 20px, 1320px);
    }

    .rtp-section {
        padding: 26px 0;
    }

    .rtp-grid {
        gap: 14px 10px;
    }

    .rtp-product-title {
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    #react-spa-root .rtp-layout-buttons {
        display: none !important;
    }
}

/* Keep Safari's native arrow spacing from adding to the sort control padding. */
.fashion-storefront .rtp-sort{position:relative}
.fashion-storefront .rtp-sort select{-webkit-appearance:none;appearance:none;padding-inline:12px 32px;background-image:none;max-width:100%;box-sizing:border-box}
.fashion-storefront .rtp-sort::after{content:"";position:absolute;inset-inline-end:12px;top:calc(50% - 5px);width:7px;height:7px;border-inline-end:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);pointer-events:none}
