/* Homepage product category slices. The original featured-product block is replaced only on the home page. */
.hongxin-minimal .hongxin-home-original-featured-products {
    display: none !important;
}

.hongxin-home-product-slices {
    position: relative;
    overflow: hidden;
    padding: clamp(72px, 7vw, 118px) 0;
    background: #f4f7fb;
    border-top: 1px solid #dce5ef;
    border-bottom: 1px solid #dce5ef;
}

.hongxin-home-product-slices::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(11, 30, 61, 0.025) 0 16%, transparent 16% 67%, rgba(0, 197, 220, 0.025) 67% 79%, transparent 79%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.8), transparent 45%);
    pointer-events: none;
}

.hongxin-home-product-slices__inner {
    position: relative;
    z-index: 1;
    width: min(1720px, calc(100% - 96px));
    margin: 0 auto;
}

.hongxin-home-product-slices__header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: clamp(36px, 4vw, 58px);
}

.hongxin-home-product-slices__title {
    margin: 0;
    color: #0b1e3d;
    font-family: "Rajdhani", "DM Sans", Arial, sans-serif;
    font-size: clamp(40px, 4vw, 64px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1;
}

.hongxin-home-product-slices__hint {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6a7a8f;
    font-family: "DM Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hongxin-home-product-slices__hint-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00c5dc;
    box-shadow: 0 0 0 5px rgba(0, 197, 220, 0.12);
}

.hongxin-product-slice-deck {
    display: flex;
    height: clamp(540px, 43vw, 680px);
    gap: 8px;
    overflow: hidden;
}

.hongxin-product-slice {
    --slice-bg: #10294a;
    --slice-accent: #00c5dc;
    position: relative;
    flex: 0 0 clamp(66px, 5.7vw, 102px);
    min-width: 0;
    overflow: hidden;
    color: #ffffff;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 46%),
        var(--slice-bg);
    cursor: pointer;
    outline: none;
    transition: flex-basis 520ms cubic-bezier(0.22, 1, 0.36, 1), flex-grow 520ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease;
}

.hongxin-product-slice::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.28)),
        repeating-linear-gradient(90deg, transparent 0 79px, rgba(255, 255, 255, 0.025) 80px);
    pointer-events: none;
}

.hongxin-product-slice::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--slice-accent);
    transform: scaleY(0.18);
    transform-origin: top;
    transition: transform 420ms ease;
}

.hongxin-product-slice.is-active {
    flex: 1 1 auto;
    box-shadow: 0 24px 54px rgba(11, 30, 61, 0.22);
}

.hongxin-product-slice.is-active::after {
    transform: scaleY(1);
}

.hongxin-product-slice__collapsed {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 28px 0 24px;
    opacity: 1;
    transition: opacity 160ms ease 180ms;
}

.hongxin-product-slice.is-active .hongxin-product-slice__collapsed {
    opacity: 0;
    pointer-events: none;
    transition-delay: 0ms;
}

.hongxin-product-slice__number {
    color: var(--slice-accent);
    font-family: "DM Mono", monospace;
    font-size: 12px;
    letter-spacing: 0.16em;
}

.hongxin-product-slice__vertical-title {
    margin: 0;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: rgba(255, 255, 255, 0.9);
    font-family: "Rajdhani", "DM Sans", Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.035em;
    white-space: nowrap;
}

.hongxin-product-slice__count {
    color: rgba(255, 255, 255, 0.52);
    font-family: "DM Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
}

.hongxin-product-slice__expanded {
    position: absolute;
    z-index: 3;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(260px, 0.82fr) minmax(430px, 1.35fr);
    gap: clamp(30px, 3.2vw, 60px);
    min-width: 760px;
    padding: clamp(38px, 4vw, 66px);
    align-items: center;
    opacity: 0;
    transform: translateX(24px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 360ms ease;
}

.hongxin-product-slice.is-active .hongxin-product-slice__expanded {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    transition-delay: 190ms;
}

.hongxin-product-slice__eyebrow {
    margin: 0 0 18px;
    color: var(--slice-accent);
    font-family: "DM Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hongxin-product-slice__title {
    max-width: 520px;
    margin: 0 0 22px;
    color: #ffffff;
    font-family: "Rajdhani", "DM Sans", Arial, sans-serif;
    font-size: clamp(40px, 4vw, 68px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 0.98;
}

.hongxin-product-slice__description {
    max-width: 530px;
    margin: 0 0 30px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.8;
}

.hongxin-product-slice__browse {
    display: inline-flex;
    min-height: 48px;
    padding: 0 20px;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.hongxin-product-slice__browse:hover {
    border-color: var(--slice-accent);
    background: var(--slice-accent);
    color: #07172f;
}

.hongxin-product-slice__products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    min-width: 0;
}

.hongxin-product-slice-card {
    min-width: 0;
    overflow: hidden;
    background: #ffffff;
    color: #0b1e3d;
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-decoration: none;
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.hongxin-product-slice-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.22);
}

.hongxin-product-slice-card__image {
    display: flex;
    height: clamp(210px, 19vw, 300px);
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 2.5vw, 38px);
    background: #f4f7fb;
    border-bottom: 1px solid #dce5ef;
}

.hongxin-product-slice-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hongxin-product-slice-card__body {
    padding: 20px 20px 22px;
}

.hongxin-product-slice-card__segment {
    margin: 0 0 8px;
    color: #087b9a;
    font-family: "DM Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hongxin-product-slice-card__name {
    margin: 0;
    color: #0b1e3d;
    font-family: "Rajdhani", "DM Sans", Arial, sans-serif;
    font-size: clamp(20px, 1.7vw, 27px);
    font-weight: 700;
    line-height: 1.1;
}

.hongxin-product-slice__empty {
    grid-column: 1 / -1;
    display: flex;
    min-height: 360px;
    padding: 38px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.045);
}

.hongxin-product-slice__empty-index {
    margin-bottom: 18px;
    color: var(--slice-accent);
    font-family: "Rajdhani", "DM Sans", Arial, sans-serif;
    font-size: 72px;
    font-weight: 700;
    line-height: 1;
    opacity: 0.8;
}

.hongxin-product-slice__empty-title {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

.hongxin-product-slice__empty-copy {
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    line-height: 1.6;
}

@media (max-width: 1280px) {
    .hongxin-home-product-slices__inner {
        width: min(1180px, calc(100% - 64px));
    }

    .hongxin-product-slice-deck {
        height: 600px;
    }

    .hongxin-product-slice__expanded {
        grid-template-columns: minmax(230px, 0.7fr) minmax(380px, 1.3fr);
        gap: 32px;
        min-width: 680px;
        padding: 38px;
    }

    .hongxin-product-slice-card__image {
        height: 230px;
    }
}

@media (max-width: 900px) {
    .hongxin-home-product-slices__inner {
        width: min(100% - 40px, 720px);
    }

    .hongxin-home-product-slices__header {
        display: block;
    }

    .hongxin-home-product-slices__hint {
        margin-top: 18px;
    }

    .hongxin-product-slice-deck {
        height: auto;
        flex-direction: column;
        overflow: visible;
    }

    .hongxin-product-slice {
        flex: none;
        width: 100%;
        height: 72px;
        transition: height 480ms cubic-bezier(0.22, 1, 0.36, 1);
    }

    .hongxin-product-slice.is-active {
        height: 610px;
    }

    .hongxin-product-slice::after {
        width: 100%;
        height: 3px;
        transform: scaleX(0.18);
        transform-origin: left;
    }

    .hongxin-product-slice.is-active::after {
        transform: scaleX(1);
    }

    .hongxin-product-slice__collapsed {
        flex-direction: row;
        padding: 0 22px;
    }

    .hongxin-product-slice__vertical-title {
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 19px;
    }

    .hongxin-product-slice__expanded {
        grid-template-columns: 0.8fr 1.2fr;
        min-width: 0;
        padding: 32px;
    }

    .hongxin-product-slice__title {
        font-size: 40px;
    }

    .hongxin-product-slice__products {
        grid-template-columns: 1fr;
    }

    .hongxin-product-slice-card:nth-child(n + 2) {
        display: none;
    }

    .hongxin-product-slice-card__image {
        height: 260px;
    }
}

@media (max-width: 620px) {
    .hongxin-home-product-slices {
        padding: 60px 0;
    }

    .hongxin-product-slice.is-active {
        height: 720px;
    }

    .hongxin-product-slice__expanded {
        display: flex;
        padding: 28px 24px;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: 26px;
    }

    .hongxin-product-slice__title {
        margin-bottom: 14px;
        font-size: 36px;
    }

    .hongxin-product-slice__description {
        margin-bottom: 20px;
        line-height: 1.65;
    }

    .hongxin-product-slice-card__image {
        height: 230px;
    }

    .hongxin-product-slice__empty {
        min-height: 260px;
    }
}

/* Modern horizontal category flow. Existing product data and switching behavior are retained. */
.hongxin-home-product-slices {
    padding: clamp(88px, 6.4vw, 112px) 0;
    background: #ffffff;
}

#hongxin-home-product-slices {
    padding-top: clamp(88px, 6.4vw, 112px) !important;
    padding-bottom: clamp(88px, 6.4vw, 112px) !important;
}

.hongxin-home-product-slices::before {
    opacity: 0.55;
    background: linear-gradient(120deg, rgba(11, 30, 61, 0.018) 0 18%, transparent 18% 72%, rgba(0, 197, 220, 0.025) 72% 84%, transparent 84%);
}

.hongxin-home-product-slices__header {
    margin-bottom: 36px;
}

.hongxin-product-category-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 46px;
    border-top: 1px solid #dce5ef;
    border-bottom: 1px solid #dce5ef;
}

.hongxin-product-category-tab {
    position: relative;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 76px;
    padding: 16px 20px;
    color: #66778e;
    text-align: left;
    border: 0;
    border-right: 1px solid #dce5ef;
    background: transparent;
    cursor: pointer;
    transition: color 180ms ease, background-color 180ms ease;
}

.hongxin-product-category-tab:last-child {
    border-right: 0;
}

.hongxin-product-category-tab::after {
    position: absolute;
    right: 20px;
    bottom: -1px;
    left: 20px;
    height: 3px;
    content: '';
    opacity: 0;
    transform: scaleX(0.35);
    background: #00c5dc;
    transition: opacity 180ms ease, transform 220ms ease;
}

.hongxin-product-category-tab:hover,
.hongxin-product-category-tab:focus-visible,
.hongxin-product-category-tab.is-active {
    color: #0b1e3d;
    outline: none;
    background: #f6f9fc;
}

.hongxin-product-category-tab.is-active::after {
    opacity: 1;
    transform: scaleX(1);
}

.hongxin-product-category-tab__number,
.hongxin-product-category-tab__count {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
}

.hongxin-product-category-tab__number {
    color: #00a8c0;
}

.hongxin-product-category-tab__label {
    overflow: hidden;
    font-family: 'Rajdhani', 'DM Sans', Arial, sans-serif;
    font-size: clamp(16px, 1.2vw, 20px);
    font-weight: 700;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hongxin-product-category-tab__count {
    color: #9aa8b8;
}

.hongxin-product-category-panel {
    display: none;
}

.hongxin-product-category-panel.is-active {
    display: block;
    animation: hongxin-category-panel-in 260ms ease both;
}

@keyframes hongxin-category-panel-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hongxin-product-category-panel__header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 28px;
}

.hongxin-product-category-panel__header p {
    margin: 0 0 7px;
    color: #00a8c0;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.17em;
}

.hongxin-product-category-panel__header h3 {
    margin: 0;
    color: #0b1e3d;
    font-family: 'Rajdhani', 'DM Sans', Arial, sans-serif;
    font-size: clamp(28px, 2.6vw, 42px);
    font-weight: 700;
    line-height: 1;
}

.hongxin-product-category-panel__header a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #0b1e3d;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.hongxin-product-category-panel__header a:hover {
    color: #008ca5;
}

.hongxin-product-category-panel__products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(20px, 2vw, 32px);
}

.hongxin-product-category-panel__products .hongxin-product-slice-card {
    display: grid;
    grid-template-rows: auto 1fr;
    border: 1px solid #dce5ef;
    box-shadow: 0 10px 28px rgba(11, 30, 61, 0.06);
}

.hongxin-product-category-panel__products .hongxin-product-slice-card:hover {
    transform: translateY(-5px);
    border-color: #b8cadb;
    box-shadow: 0 22px 46px rgba(11, 30, 61, 0.13);
}

.hongxin-product-category-panel__products .hongxin-product-slice-card__image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    padding: clamp(30px, 3.6vw, 58px);
    background: #f6f8fb;
}

.hongxin-product-category-panel__products .hongxin-product-slice-card__body {
    padding: 24px 26px 28px;
}

.hongxin-product-category-panel__empty {
    grid-column: 1 / -1;
    display: flex;
    min-height: 300px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #7a899c;
    text-align: center;
    border: 1px dashed #cbd7e3;
    background: #f8fafc;
}

.hongxin-product-category-panel__empty span {
    margin-bottom: 12px;
    color: #c1ccd8;
    font-family: 'Rajdhani', sans-serif;
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
}

.hongxin-product-category-panel__empty p {
    margin: 0;
    font-size: 13px;
}

@media (max-width: 960px) {
    .hongxin-product-category-tabs {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
    }

    .hongxin-product-category-tab {
        flex: 0 0 210px;
    }

    .hongxin-product-category-panel__products .hongxin-product-slice-card:nth-child(n + 2) {
        display: grid;
    }
}

@media (max-width: 620px) {
    .hongxin-home-product-slices {
        padding: 72px 0;
    }

    .hongxin-product-category-tabs {
        margin-bottom: 34px;
    }

    .hongxin-product-category-tab {
        flex-basis: 184px;
        min-height: 68px;
        padding: 13px 16px;
    }

    .hongxin-product-category-panel__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .hongxin-product-category-panel__products {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hongxin-product-category-panel.is-active,
    .hongxin-product-category-tab,
    .hongxin-product-category-tab::after,
    .hongxin-product-slice-card {
        animation: none !important;
        transition: none !important;
    }
}
