.rchs-categories,
.rchs-bestsellers {
    background: #FAF8F5;
    color: #51483E;
    padding: 52px 0;
}

.rchs-categories {
    background: #F1ECE6;
}

.rchs-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 28px;
}

.rchs-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 500;
    line-height: 1.1;
    color: #51483E;
    margin: 0;
}

.rchs-categories .rchs-title {
    text-align: center;
    margin-bottom: 30px;
}

.rchs-category-track {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.rchs-category {
    display: block;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.rchs-category-image {
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 8px;
    background: #E5DED4;
}

.rchs-category-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rchs-category:hover img {
    transform: scale(1.04);
}

.rchs-category-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 25px;
}

.rchs-category-name {
    display: block;
    text-align: center;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 25px;
    margin-top: 12px;
}

/* Bestseller carousel */
.rchs-bestsellers-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.rchs-view-all {
    color: #884D57;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.rchs-view-all:hover {
    text-decoration: underline;
}

.rchs-slider-shell {
    position: relative;
}

.rchs-product-track.rc-archive__grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 18px !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 4px 2px 16px;
    width: 100%;
}

.rchs-product-track::-webkit-scrollbar,
.rchs-category-track::-webkit-scrollbar {
    display: none;
}

.rchs-product-track > .rc-card {
    flex: 0 0 calc((100% - 54px) / 4);
    width: auto;
    min-width: 0;
    scroll-snap-align: start;
}

.rchs-arrow {
    position: absolute;
    z-index: 2;
    top: 37%;
    width: 40px;
    height: 40px;
    border: 1px solid #DDD5CC;
    border-radius: 50%;
    background: #FAF8F5;
    color: #51483E;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rchs-prev { left: -16px; }
.rchs-next { right: -16px; }

.rchs-arrow:disabled {
    opacity: .35;
    cursor: default;
}

@media (max-width: 767px) {
    .rchs-categories,
    .rchs-bestsellers {
        padding: 30px 0;
    }

    .rchs-inner {
        padding: 0 18px;
    }

    .rchs-categories .rchs-title {
        margin-bottom: 20px;
    }

    .rchs-category-track {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 12px;
        scrollbar-width: none;
        padding-bottom: 6px;
    }

    .rchs-category {
        flex: 0 0 39%;
        scroll-snap-align: start;
    }

    .rchs-category-name {
        font-size: 21px;
        margin-top: 8px;
    }

    .rchs-bestsellers-head {
        margin-bottom: 18px;
    }

    .rchs-product-track > .rc-card {
        flex: 0 0 65%;
    }

    .rchs-arrow {
        display: none;
    }
}


/* RCHS_CATEGORY_GRID_V2 */

/* Separate categories visually from the Brands section. */
.rchs-categories {
    background: #FAF8F5 !important;
    padding: 42px 0 48px !important;
}

.rchs-categories .rchs-title {
    text-align: center;
    margin: 0 0 25px !important;
    font-size: clamp(34px, 4vw, 48px);
}

/* Fixed 2 + 3 category mosaic. */
.rchs-categories .rchs-category-track {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 4px !important;
    overflow: visible !important;
    padding: 0 !important;
}

.rchs-categories .rchs-category {
    position: relative;
    display: block;
    grid-column: span 2;
    flex: initial !important;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border-radius: 0 !important;
}

.rchs-categories .rchs-category:nth-child(-n+2) {
    grid-column: span 3;
}

.rchs-categories .rchs-category-image {
    display: block;
    aspect-ratio: auto !important;
    height: 290px;
    border-radius: 0 !important;
    background: #E5DED4;
}

.rchs-categories .rchs-category:nth-child(-n+2)
.rchs-category-image {
    height: 350px;
}

.rchs-categories .rchs-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.rchs-categories .rchs-category-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    margin: 0 !important;
    padding: 35px 8px 15px;
    color: #FFFFFF;
    background: linear-gradient(
        to top,
        rgba(35, 29, 24, .65),
        transparent
    );
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 29px;
    font-weight: 500;
    text-align: center;
    line-height: 1.15;
}

/* Smaller bestseller cards, retaining Royal Core card styling. */
.rchs-bestsellers .rchs-product-track > .rc-card {
    flex: 0 0 calc((100% - 72px) / 5) !important;
    width: calc((100% - 72px) / 5) !important;
    max-width: none;
    min-width: 0;
}

.rchs-bestsellers .rchs-product-track {
    gap: 18px !important;
}

@media (max-width: 767px) {
    .rchs-categories {
        padding: 28px 0 34px !important;
    }

    .rchs-categories .rchs-inner {
        padding: 0 12px !important;
    }

    .rchs-categories .rchs-title {
        margin-bottom: 18px !important;
        font-size: 36px;
    }

    .rchs-categories .rchs-category-track {
        gap: 3px !important;
    }

    .rchs-categories .rchs-category-image {
        height: 160px;
    }

    .rchs-categories .rchs-category:nth-child(-n+2)
    .rchs-category-image {
        height: 225px;
    }

    .rchs-categories .rchs-category-name {
        font-size: 19px;
        padding: 28px 3px 11px;
    }

    .rchs-bestsellers .rchs-product-track {
        gap: 12px !important;
    }

    .rchs-bestsellers .rchs-product-track > .rc-card {
        flex: 0 0 calc((100% - 12px) / 2.15) !important;
        width: calc((100% - 12px) / 2.15) !important;
    }
}

/* Homepage Çok Satanlar — Yeni Gelenler card aesthetic */
.rchs-bestsellers .rchs-product-track {
    align-items: stretch;
    padding: 4px 2px 20px !important;
}

.rchs-bestsellers .rchs-product-track > .rc-card {
    align-self: stretch;
    overflow: hidden;
    border: 1px solid #E9DED2 !important;
    border-radius: 22px !important;
    background: #FFFFFF !important;
    box-shadow: none !important;
    box-sizing: border-box;
}

.rchs-bestsellers .rc-card__media {
    overflow: hidden;
    border-radius: 21px 21px 0 0 !important;
    background: #F7F7F7;
}

.rchs-bestsellers .rc-card__body {
    background: #FFFFFF;
    padding: 15px 14px 18px !important;
}

.rchs-bestsellers .rc-card__name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    color: #51483E;
    font-weight: 500;
    line-height: 1.35;
}

.rchs-bestsellers .rc-card__price {
    color: #51483E;
}

@media (max-width: 767px) {
    .rchs-bestsellers .rchs-product-track > .rc-card {
        border-radius: 16px !important;
    }

    .rchs-bestsellers .rc-card__media {
        border-radius: 15px 15px 0 0 !important;
    }

    .rchs-bestsellers .rc-card__body {
        padding: 11px 9px 14px !important;
    }
}

/* Çok Satanlar — consistent price and swatch alignment */
.rchs-bestsellers .rchs-product-track > .rc-card {
    display: flex;
    flex-direction: column;
}

.rchs-bestsellers .rc-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Reserve equal space for product titles */
.rchs-bestsellers .rc-card__name {
    min-height: 2.7em;
    line-height: 1.35;
    margin-bottom: 8px;
}

/* Display sale and original prices on separate lines */
.rchs-bestsellers .rc-card__price {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 3px;
    width: 100%;
}

.rchs-bestsellers .rc-card__price ins,
.rchs-bestsellers .rc-card__price del {
    display: block !important;
    margin: 0 !important;
    white-space: nowrap;
}

.rchs-bestsellers .rc-card__price ins {
    order: 1;
    text-decoration: none;
}

.rchs-bestsellers .rc-card__price del {
    order: 2;
    opacity: 0.65;
}

/* Keep swatches below price with consistent spacing */
.rchs-bestsellers .rc-card__swatches {
    margin-top: 10px;
}

@media (max-width: 767px) {
    .rchs-bestsellers .rc-card__name {
        min-height: 3.8em;
        font-size: 16px;
    }

    .rchs-bestsellers .rc-card__price {
        gap: 2px;
    }

    .rchs-bestsellers .rc-card__price ins,
    .rchs-bestsellers .rc-card__price del {
        white-space: nowrap;
    }
}

/* Çok Satanlar — final price alignment fix */

/* Equal title height across cards */
.rchs-bestsellers .rc-card__name {
    height: 3.9em !important;
    min-height: 0 !important;
    line-height: 1.3 !important;
    margin: 0 0 8px !important;
    overflow: hidden;
}

/* Consistent price area */
.rchs-bestsellers .rc-card__prices {
    display: block !important;
    width: 100%;
    min-height: 48px;
    margin: 0 !important;
}

.rchs-bestsellers .rc-card__sale {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 3px !important;
    width: 100%;
    line-height: 1.3;
}

/* WooCommerce price HTML */
.rchs-bestsellers .rc-card__sale ins,
.rchs-bestsellers .rc-card__sale del {
    display: block !important;
    width: 100%;
    margin: 0 !important;
    line-height: 1.3;
}

.rchs-bestsellers .rc-card__sale ins {
    order: 1;
    text-decoration: none;
}

.rchs-bestsellers .rc-card__sale del {
    order: 2;
    opacity: 0.65;
}

/* Color options aligned beneath the price */
.rchs-bestsellers .rc-card__swatches {
    margin-top: 10px !important;
}

/* Mobile */
@media (max-width: 767px) {
    .rchs-bestsellers .rc-card__name {
        height: 3.9em !important;
    }

    .rchs-bestsellers .rc-card__prices {
        min-height: 48px;
    }
}

/* Homepage category images — soft rounded corners */
body.home .rchs-categories a {
    border-radius: 10px !important;
    overflow: hidden !important;
}

/* Homepage category tile — fix left white gap on Ayakkabı image */
body.home .rchs-categories a[href*="ayakkabi"] {
    overflow: hidden !important;
}

body.home .rchs-categories a[href*="ayakkabi"] img {
    display: block !important;
    width: calc(100% + 24px) !important;
    max-width: none !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    transform: translateX(-12px) !important;
}

/* Royal Collection — Bestsellers soft section */

body.home .rchs-bestsellers {
    background: #F1ECE6 !important;
    border-radius: 16px !important;
    padding: 36px !important;
    margin-top: 28px !important;
    margin-bottom: 28px !important;
    box-sizing: border-box !important;
}

/* Mobile */
@media (max-width: 767px) {
    body.home .rchs-bestsellers {
        padding: 18px 14px !important;
        border-radius: 12px !important;
        margin-top: 16px !important;
        margin-bottom: 16px !important;
    }
}
