/* ROHN8 Catalog Listing Animated Intensity Hero (/danh-muc-phu-kien) */
/* Overflow curves/waves/particles bleed cleanly past the hero bottom border while main clips X. */
main:has(.r8-cat-hero) {
    overflow-x: clip;
}

.r8-cat-hero {
    position: relative;
    isolation: isolate;
    overflow: visible;
    background: var(--deep);
    padding-block: clamp(24px, 3vw, 42px) clamp(26px, 3.2vw, 44px);
    border-block-end: 1px solid #293e3288;
}

.r8-cat-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.r8-cat-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 54%;
    opacity: .84;
    transform: scale(1.02);
}

.r8-cat-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 56% 64% at 72% 54%, #185e4138 0%, transparent 66%),
        radial-gradient(ellipse 40% 42% at 69% 74%, #38bdf822 0%, transparent 68%),
        linear-gradient(90deg, #07110df7 0%, #07110de8 30%, #07110d78 58%, #07110d2e 100%),
        linear-gradient(180deg, #07110d88 0%, transparent 18%, transparent 74%, #07110df2 100%);
}

/* Overflowing curves, architectural LED arches, lower wave ribbons, and particle canvas */
.r8-cat-overflow-fx {
    position: absolute;
    inset: -12px 0 -86px 0;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
    -webkit-mask-image: linear-gradient(100deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.12) 38%, rgba(0,0,0,0.78) 64%, #000 100%);
    mask-image: linear-gradient(100deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.12) 38%, rgba(0,0,0,0.78) 64%, #000 100%);
}

.r8-cat-arches {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    mix-blend-mode: screen;
    opacity: .48;
}

.r8-cat-arches .r8-cat-comet {
    opacity: 0;
}

.r8-cat-arches.is-live .r8-cat-comet {
    opacity: 1;
}

.r8-cat-webgl,
.r8-cat-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: .96;
}

.r8-cat-webgl {
    mix-blend-mode: screen;
}

/* Hero inner grid */
.r8-cat-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, .78fr) minmax(0, 1.38fr);
    align-items: center;
    gap: clamp(16px, 2.5vw, 36px);
    min-height: clamp(350px, 31vw, 430px);
}

.r8-cat-copy {
    position: relative;
    z-index: 4;
    padding-block: 10px;
}

.r8-cat-copy h1 {
    font-size: clamp(2.3rem, 4.3vw, 4.4rem);
    line-height: 1.08;
    letter-spacing: -.048em;
    margin-block: 12px 14px;
}

.r8-cat-copy h1 span {
    color: var(--signal);
}

.r8-cat-copy > p:not(.kicker) {
    max-inline-size: 38ch;
    font-size: clamp(.95rem, 1.15vw, 1.06rem);
    line-height: 1.65;
}

.r8-cat-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-block-start: 22px;
}

.r8-cat-stat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-block-start: 18px;
}

.r8-cat-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid #35564299;
    background: #0a1a12d4;
    color: #cfe4d3;
    font-size: .76rem;
    font-weight: 650;
    letter-spacing: .01em;
}

.r8-cat-stat-pill strong {
    color: var(--signal);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* Animated Automotive Constellation Stage */
.r8-cat-constellation {
    position: relative;
    width: 100%;
    height: clamp(340px, 30vw, 430px);
    min-width: 0;
    overflow: visible;
}

/* Soft luminous turntable halo beneath the resized SUV */
.r8-cat-stage-glow {
    position: absolute;
    left: 50%;
    bottom: 6%;
    width: 68%;
    height: 36%;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(ellipse at center, #38bdf838 0%, #48d58c2c 38%, transparent 72%);
    border-bottom: 1px solid #c7f79555;
    pointer-events: none;
    z-index: 1;
}

/* Centerpiece resized animated Toyota SUV (~70% compact scale vs homepage hero) */
.r8-cat-suv {
    position: absolute;
    left: 50%;
    top: 56%;
    width: clamp(230px, 24vw, 336px);
    transform: translate(-50%, -50%);
    z-index: 4;
    pointer-events: none;
    will-change: transform;
}

.r8-cat-suv img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 16px 26px #020a06cc) drop-shadow(0 0 22px #38bdf844);
}

/* Orbiting 10-product animated constellation items */
.r8-orb-item {
    position: absolute;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    text-decoration: none;
    will-change: transform;
    transition: filter .22s ease, z-index 0s;
    border-radius: 16px;
}

.r8-orb-item::before {
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    background: radial-gradient(circle, #c7f79522 0%, #38bdf818 46%, transparent 72%);
    opacity: .68;
    transition: opacity .22s ease, transform .22s ease;
    pointer-events: none;
    z-index: -1;
}

.r8-orb-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform .26s cubic-bezier(.2, .8, .2, 1), filter .26s ease;
    filter: drop-shadow(0 10px 18px #020a06cc);
}

.r8-orb-item[data-plane="back"] { z-index: 2; opacity: .88; }
.r8-orb-item[data-plane="mid"] { z-index: 3; opacity: .96; }
.r8-orb-item[data-plane="front"] { z-index: 5; opacity: 1; }

.r8-orb-item:hover,
.r8-orb-item:focus-visible {
    z-index: 14;
    opacity: 1;
}

.r8-orb-item:hover::before,
.r8-orb-item:focus-visible::before {
    opacity: 1;
    transform: scale(1.25);
}

.r8-orb-item:hover img,
.r8-orb-item:focus-visible img {
    transform: scale(1.13) translateY(-4px);
    filter: drop-shadow(0 14px 26px #020a06f0) drop-shadow(0 0 18px #c7f79566);
}

/* Frosted glass product tooltip on hover/focus */
.r8-orb-tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    transform: translateX(-50%) translateY(6px);
    display: grid;
    gap: 1px;
    width: max-content;
    max-width: 215px;
    padding: 7px 11px;
    border-radius: 10px;
    border: 1px solid #c7f79588;
    background: #07140ef0;
    box-shadow: 0 14px 32px #000c;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 20;
    text-align: left;
}

@supports (backdrop-filter: blur(10px)) {
    .r8-orb-tip { background: #07140ed6; backdrop-filter: blur(12px); }
}

.r8-orb-tip small {
    font-size: .64rem;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--signal);
    line-height: 1.2;
}

.r8-orb-tip strong {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.28;
}

.r8-orb-item:hover .r8-orb-tip,
.r8-orb-item:focus-visible .r8-orb-tip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Top-row items flip tooltip downward so it never clips under sticky header */
.r8-orb-item.slot-dashcam .r8-orb-tip,
.r8-orb-item.slot-heli .r8-orb-tip,
.r8-orb-item.slot-umbrella .r8-orb-tip {
    bottom: auto;
    top: calc(100% + 6px);
    transform: translateX(-50%) translateY(-6px);
}
.r8-orb-item.slot-dashcam:hover .r8-orb-tip,
.r8-orb-item.slot-dashcam:focus-visible .r8-orb-tip,
.r8-orb-item.slot-heli:hover .r8-orb-tip,
.r8-orb-item.slot-heli:focus-visible .r8-orb-tip,
.r8-orb-item.slot-umbrella:hover .r8-orb-tip,
.r8-orb-item.slot-umbrella:focus-visible .r8-orb-tip {
    transform: translateX(-50%) translateY(0);
}

/* Curated Desktop 10-Object Spatial Choreography Around the Resized SUV */
/* Top arc (windshield / roof / rain canopy) */
.slot-dashcam      { left: 26%; top: 18%; width: clamp(92px, 8.8vw, 126px); height: clamp(90px, 8.6vw, 124px); }
.slot-heli         { left: 52%; top: 15%; width: clamp(98px, 9.4vw, 134px); height: clamp(74px, 7.2vw, 102px); }
.slot-umbrella     { left: 77%; top: 18%; width: clamp(92px, 8.8vw, 126px); height: clamp(92px, 8.8vw, 126px); }

/* Left wing (cabin decor -> infotainment -> driver steering) */
.slot-tassel       { left: 7%;  top: 40%; width: clamp(64px, 6.2vw, 88px);  height: clamp(106px, 10vw, 146px); }
.slot-carplay      { left: 22%; top: 47%; width: clamp(86px, 8.2vw, 116px); height: clamp(102px, 9.6vw, 136px); }
.slot-steering     { left: 15%; top: 77%; width: clamp(98px, 9.4vw, 132px); height: clamp(102px, 9.8vw, 138px); }

/* Right wing (air-vent mount -> dual charger -> emergency jump starter) */
.slot-mount        { left: 77%; top: 46%; width: clamp(82px, 7.8vw, 112px); height: clamp(90px, 8.6vw, 124px); }
.slot-dual-charger { left: 93%; top: 41%; width: clamp(96px, 9.2vw, 132px); height: clamp(62px, 6vw, 86px); }
.slot-jump         { left: 82%; top: 78%; width: clamp(114px, 11vw, 158px); height: clamp(70px, 6.8vw, 96px); }

/* Front-center-left accent (retractable RGB charger overlapping lower arc slightly) */
.slot-retract      { left: 36%; top: 83%; width: clamp(58px, 5.4vw, 76px);  height: clamp(104px, 9.8vw, 138px); }

/* Discreet circular Pause/Resume control matching homepage hero */
.r8-cat-controls {
    position: absolute;
    inset-inline-end: 0;
    inset-block-end: 2px;
    z-index: 15;
}

/* Listing section sits smoothly above overflow FX tail */
.r8-cat-hero + .catalog-section {
    position: relative;
    z-index: 1;
    padding-block-start: clamp(46px, 5.2vw, 74px);
}

/* Responsive: Narrow Desktop / Tablet */
@media (max-width: 1120px) {
    .r8-cat-hero-grid {
        grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
        min-height: 360px;
    }
    .slot-tassel { left: 4%; }
    .slot-dual-charger { left: 95%; }
}

@media (max-width: 860px) {
    .r8-cat-hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        min-height: auto;
    }
    .r8-cat-copy { padding-block: 4px 0; }
    .r8-cat-constellation {
        height: 300px;
        margin-inline: auto;
        width: min(100%, 560px);
    }
    .r8-cat-suv { width: clamp(200px, 46vw, 270px); top: 58%; }
    .r8-cat-overflow-fx {
        inset: -8px 0 -48px 0;
        -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.04) 0%, rgba(0,0,0,0.1) 46%, rgba(0,0,0,0.7) 100%);
        mask-image: linear-gradient(180deg, rgba(0,0,0,0.04) 0%, rgba(0,0,0,0.1) 46%, rgba(0,0,0,0.7) 100%);
    }
}

@media (max-width: 640px) {
    .r8-cat-hero { padding-block: 20px 18px; }
    .r8-cat-copy h1 { font-size: clamp(2rem, 8.8vw, 3rem); margin-block: 10px 10px; }
    .r8-cat-actions { margin-block-start: 16px; }
    .r8-cat-stat-pills { margin-block-start: 12px; gap: 6px; }
    .r8-cat-constellation { height: 248px; width: 100%; }
    .r8-cat-suv { width: clamp(168px, 48vw, 224px); top: 56%; }

    /* Keep mobile constellation crisp, uncrowded & focused on 6 hero products */
    .r8-orb-item[data-mobile="0"] { display: none; }
    .slot-dashcam  { left: 19%; top: 18%; width: 74px; height: 74px; }
    .slot-heli     { left: 52%; top: 14%; width: 82px; height: 62px; }
    .slot-mount    { left: 84%; top: 20%; width: 70px; height: 78px; }
    .slot-carplay  { left: 13%; top: 54%; width: 68px; height: 82px; }
    .slot-steering { left: 18%; top: 84%; width: 78px; height: 82px; }
    .slot-jump     { left: 76%; top: 76%; width: 92px; height: 58px; }
    .r8-orb-tip    { display: none; }
}

/* RDP-Safe Reduced Motion: keep subtle life instead of freezing solid */
@media (prefers-reduced-motion: reduce) {
    .r8-cat-hero .r8-rdp-motion,
    .r8-cat-hero .r8-rdp-motion * {
        animation-play-state: running !important;
    }
}
