/* ROHN8 Homepage Pro-Style Living Hero, Semantic Autoplay Carousels & Showroom Trust Showcase */

/* 1. Hero Dual CTA, Trust Pills & Living Animated Product Constellation */
.hero-home {
    background:
        radial-gradient(ellipse 68% 58% at 74% 38%, #1d573836, transparent 70%),
        radial-gradient(ellipse 52% 46% at 18% 76%, #2468402e, transparent 68%),
        var(--deep);
}

.hero-home .hero-grid {
    align-items: start;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 1.16fr);
    min-height: clamp(540px, calc(78svh - var(--header)), 680px);
    gap: clamp(16px, 2.4vw, 32px);
    padding-block-start: clamp(16px, 2vw, 28px);
}

.hero-home .hero-copy {
    position: relative;
    z-index: 20;
    display: grid;
    align-content: start;
    padding-block: clamp(22px, 3vw, 38px) 16px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-block-start: 22px;
}

.hero-home .hero-actions .button {
    margin-block-start: 0;
    padding-inline: 18px;
}

.button-ghost {
    background: #0c1f16c4;
    border-color: #426953;
    color: var(--text);
}

@supports (backdrop-filter: blur(10px)) {
    .button-ghost {
        background: #0c1f1694;
        backdrop-filter: blur(10px);
    }
}

.button-ghost:hover,
.button-ghost:focus-visible {
    border-color: var(--signal);
    color: var(--signal);
    background: #133123dd;
}

.hero-trust-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-block-start: 16px;
}

.hero-trust-pills span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid #2e4c3b;
    background: #091811c4;
    color: #cbe1d1;
    font-size: .76rem;
    font-weight: 650;
}

.hero-trust-pills strong {
    color: var(--signal);
    font-weight: 800;
}

/* Living Left-Lower Animated Product Constellation (fills void below & flanking CTA cleanly) */
.hero-flank-constellation {
    position: relative;
    margin-block-start: 22px;
    padding: 14px 16px 12px;
    border-radius: 16px;
    border: 1px solid #2e4c3b90;
    background:
        radial-gradient(ellipse 85% 90% at 50% 100%, #276e453b, transparent 74%),
        linear-gradient(180deg, #091711b8, #07120de0);
    overflow: hidden;
}

@supports (backdrop-filter: blur(10px)) {
    .hero-flank-constellation {
        backdrop-filter: blur(10px);
    }
}

.hero-flank-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-block-end: 10px;
}

.hero-flank-head span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .7rem;
    font-weight: 780;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--signal);
}

.hero-flank-head span::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--signal);
    box-shadow: 0 0 10px var(--signal);
}

.hero-flank-head small {
    font-size: .72rem;
    color: var(--muted);
}

.hero-flank-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.home-orb-card {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: space-between;
    gap: 6px;
    padding: 10px 6px 8px;
    border-radius: 12px;
    border: 1px solid #2c4a3975;
    background: radial-gradient(circle at 50% 42%, #2b7b4f34, #07120d85 74%);
    text-align: center;
    transition: border-color .24s ease, transform .24s ease, background-color .24s ease;
}

.home-orb-card:hover,
.home-orb-card:focus-visible {
    border-color: #c7f79599;
    background: radial-gradient(circle at 50% 42%, #3a9c654d, #0d2318cc 76%);
    transform: translateY(-3px);
}

.home-orb-media {
    position: relative;
    width: 100%;
    height: 76px;
    display: grid;
    place-items: center;
}

.home-orb-media img {
    max-width: 82px;
    max-height: 74px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px #000b);
    animation: r8-home-orb-bob 5.4s ease-in-out infinite;
    animation-delay: var(--orb-delay, 0s);
}

.home-orb-card strong {
    font-size: .73rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Right-Stage Perimeter Animated Orbs around the 3D SUV + Sign "8" */
.hero-home .scene {
    position: relative;
    padding-block-start: 10px;
}

.hero-home .scene-viewport {
    aspect-ratio: 1.24 / 1;
    max-height: 590px;
}

.scene-stage-orbs {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.stage-orb {
    position: absolute;
    pointer-events: auto;
    display: grid;
    justify-items: center;
    width: var(--orb-w, 108px);
    padding: 4px;
    border-radius: 14px;
    transition: transform .26s ease, filter .26s ease;
    animation: r8-home-orb-float 6.2s ease-in-out infinite;
    animation-delay: var(--orb-delay, 0s);
}

.stage-orb img {
    width: 100%;
    height: auto;
    max-height: var(--orb-h, 102px);
    object-fit: contain;
    filter: drop-shadow(0 12px 22px #000c);
    transition: transform .26s ease;
}

.stage-orb-tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    transform: translateX(-50%) translateY(4px);
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid #59856a88;
    background: #07140ee8;
    color: var(--signal);
    font-size: .68rem;
    font-weight: 750;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    box-shadow: 0 8px 20px #0009;
}

.stage-orb:hover,
.stage-orb:focus-visible {
    z-index: 5;
}

.stage-orb:hover img,
.stage-orb:focus-visible img {
    transform: scale(1.1);
}

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

/* Clean 4-corner perimeter placement outside central SUV & emerald "8" */
.h-stage-dashcam { top: 2%; left: 3%; --orb-w: 112px; --orb-h: 104px; --orb-delay: -0.6s; }
.h-stage-tpms { top: 3%; right: 2%; --orb-w: 108px; --orb-h: 102px; --orb-delay: -2.1s; }
.h-stage-steering { bottom: 6%; left: 2%; --orb-w: 112px; --orb-h: 110px; --orb-delay: -3.5s; }
.h-stage-mount { bottom: 12%; right: 4%; --orb-w: 98px; --orb-h: 104px; --orb-delay: -1.4s; }

.hero.is-orbs-paused .home-orb-media img,
.hero.is-orbs-paused .stage-orb {
    animation-play-state: paused !important;
}

@keyframes r8-home-orb-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes r8-home-orb-float {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -8px, 0); }
}

/* Upgraded Living Showcase Rail Thumbnails */
.hero-home .showcase-thumb {
    width: 68px;
    height: 60px;
    background: radial-gradient(circle at 50% 54%, #35955d52, #07120d26 74%);
}

.hero-home .showcase-thumb img {
    width: 62px;
    height: 58px;
}

/* Collection live count badge on homepage */
.collection-count {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-block-start: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid #355844;
    background: #10251a;
    color: var(--signal);
    font-size: .72rem;
    font-weight: 750;
}

/* 2. Shared Pro Semantic Autoplay Carousel Gallery Box */
.r8-carousel {
    --r8-slide-progress: 0%;
    position: relative;
    display: grid;
    gap: 12px;
    min-width: 0;
}

.r8-carousel-stage {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid #375745;
    background: #08150f;
    aspect-ratio: 16 / 10;
    box-shadow: 0 24px 60px #01080488;
}

.r8-carousel--showroom .r8-carousel-stage {
    aspect-ratio: 16 / 10;
}

/* Subtle left/right edge chevron hints on homepage carousels */
.r8-carousel-edge {
    position: absolute;
    top: 44%;
    transform: translateY(-50%);
    z-index: 4;
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(199, 247, 149, .24);
    background: rgba(6, 18, 12, .5);
    color: rgba(238, 249, 241, .84);
    opacity: .64;
    cursor: pointer;
    transition: opacity .22s ease, border-color .22s ease, background-color .22s ease, color .22s ease, transform .22s ease;
}
.r8-carousel-edge--prev { left: 12px; }
.r8-carousel-edge--next { right: 12px; }
.r8-carousel-edge svg { width: 14px; height: 14px; }
@supports (backdrop-filter: blur(8px)) {
    .r8-carousel-edge { backdrop-filter: blur(8px); }
}
.r8-carousel-stage:hover .r8-carousel-edge,
.r8-carousel-stage:focus-within .r8-carousel-edge { opacity: .94; }
.r8-carousel-edge:hover,
.r8-carousel-edge:focus-visible {
    opacity: 1;
    border-color: var(--signal);
    background: rgba(13, 35, 24, .88);
    color: var(--signal);
    transform: translateY(-50%) scale(1.06);
}
.r8-carousel-edge--next .r8-fa {
    animation: r8-edge-chevron-hint 4.8s ease-in-out infinite;
}
.r8-carousel-stage:hover .r8-carousel-edge--next .r8-fa { animation-play-state: paused; }
@keyframes r8-edge-chevron-hint {
    0%, 72%, 100% { transform: translateX(0); }
    82% { transform: translateX(2.5px); }
    90% { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
    .r8-carousel-edge--next .r8-fa { animation: none; }
}

.r8-carousel-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .55s ease, visibility .55s ease;
}

.r8-carousel-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

.r8-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.035);
    transition: transform 5.6s cubic-bezier(.22, .61, .36, 1);
}

.r8-carousel-slide.is-active img {
    transform: scale(1);
}

.r8-carousel-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #06110c2b 0%, transparent 44%, #05110bc8 72%, #040d09f2 100%);
    pointer-events: none;
}

.r8-carousel-caption {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 3;
    display: grid;
    gap: 6px;
    padding: 20px 22px 18px;
}

.r8-slide-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #75b88777;
    background: #0a2217cc;
    color: var(--signal);
    font-size: .7rem;
    font-weight: 780;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.r8-carousel-caption h3 {
    margin: 0;
    font-size: clamp(1.06rem, 1.55vw, 1.38rem);
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -.02em;
    color: #f4fbf5;
}

.r8-carousel-caption p {
    margin: 0;
    font-size: .85rem;
    line-height: 1.5;
    color: #cfe0d4;
    max-width: 56ch;
}

.r8-slide-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-block-start: 4px;
}

.r8-slide-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 6px 13px;
    border-radius: 999px;
    background: var(--signal);
    color: #13220d;
    font-size: .8rem;
    font-weight: 800;
    transition: background-color .2s ease, transform .2s ease;
}

.r8-slide-cta:hover,
.r8-slide-cta:focus-visible {
    background: #e2ffbc;
    transform: translateY(-1px);
}

.r8-slide-cta svg {
    width: 15px;
    height: 15px;
}

.r8-zoom-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid #638d7488;
    background: #081811cc;
    color: #e9f6ec;
    font-size: .76rem;
    font-weight: 700;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

.r8-zoom-btn:hover,
.r8-zoom-btn:focus-visible {
    border-color: var(--signal);
    color: var(--signal);
    background: #102a1de6;
}

.r8-zoom-btn svg {
    width: 14px;
    height: 14px;
}

/* Top HUD Controls inside Carousel */
.r8-carousel-hud {
    position: absolute;
    inset: 14px 14px auto 14px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    pointer-events: none;
}

.r8-carousel-counter {
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid #59806875;
    background: #07130dd4;
    color: #e6f5e9;
    font-size: .74rem;
    font-weight: 780;
    letter-spacing: .06em;
    font-variant-numeric: tabular-nums;
}

.r8-carousel-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
}

.r8-carousel-ctrl {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #638b7285;
    background: #07140ed4;
    color: #e6f4ea;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

@supports (backdrop-filter: blur(8px)) {
    .r8-carousel-ctrl,
    .r8-carousel-counter {
        backdrop-filter: blur(8px);
    }
}

.r8-carousel-ctrl:hover,
.r8-carousel-ctrl:focus-visible {
    border-color: var(--signal);
    color: var(--signal);
    background: #10291ce8;
}

.r8-carousel-ctrl svg {
    width: 16px;
    height: 16px;
}

/* Slide Selector Tabs with Animated Lime Progress Bar */
.r8-carousel-tabs {
    display: grid;
    grid-template-columns: repeat(var(--tab-count, 5), minmax(0, 1fr));
    gap: 8px;
}

.r8-carousel-tab {
    position: relative;
    display: grid;
    gap: 6px;
    text-align: left;
    padding: 9px 10px 10px;
    border-radius: 10px;
    border: 1px solid #284032;
    background: #091711;
    color: var(--muted);
    transition: border-color .2s ease, background-color .2s ease, color .2s ease;
    overflow: hidden;
}

.r8-carousel-tab:hover,
.r8-carousel-tab:focus-visible {
    border-color: #4d785e;
    color: var(--text);
}

.r8-carousel-tab.is-active {
    border-color: #84c88c99;
    background: #10251a;
    color: var(--text);
}

.r8-carousel-tab span {
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.r8-tab-bar {
    position: relative;
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 999px;
    background: #233a2d;
    overflow: hidden;
}

.r8-tab-bar::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    border-radius: inherit;
    background: var(--signal);
}

.r8-carousel-tab.is-active .r8-tab-bar::after {
    width: var(--r8-slide-progress, 0%);
    transition: width .09s linear;
}

/* 3. Refactored Editorial Section (#cam-nang) */
.editorial-pro {
    padding-block: clamp(58px, 7vw, 104px);
    background:
        radial-gradient(ellipse 65% 55% at 15% 20%, #1c533428, transparent 70%),
        #091610;
    border-block: 1px solid var(--edge);
}

.editorial-pro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr);
    align-items: start;
    gap: clamp(26px, 4.4vw, 64px);
}

.editorial-pro-copy {
    display: grid;
    align-content: start;
    gap: 14px;
}

.editorial-pro-copy h2 {
    font-size: clamp(1.9rem, 3.3vw, 3rem);
    margin: 0;
}

.editorial-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.editorial-stats span {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid #2e4b3a;
    background: #0d2017;
    color: #cde2d3;
    font-size: .76rem;
    font-weight: 700;
}

.editorial-stats strong {
    color: var(--signal);
    margin-inline-end: 4px;
}

.editorial-story-list {
    list-style: none;
    margin: 6px 0 4px;
    padding: 0;
    display: grid;
    gap: 8px;
}

.editorial-story-item a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #284132;
    background: #0c1d15;
    transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.editorial-story-item a:hover,
.editorial-story-item a:focus-visible {
    border-color: #7cc08899;
    background: #12291e;
    transform: translateX(3px);
}

.editorial-story-meta {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.editorial-story-meta small {
    font-size: .7rem;
    font-weight: 750;
    color: var(--signal);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.editorial-story-meta strong {
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
}

.editorial-story-arrow {
    color: var(--signal);
    width: 17px;
    height: 17px;
}

.editorial-pro-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-block-start: 6px;
}

/* 4. Refactored Showroom Section ("Từ màn hình, đến cửa hàng") */
.shop-teaser-pro {
    padding-block: clamp(58px, 7vw, 102px);
    background:
        radial-gradient(ellipse 62% 52% at 85% 24%, #1e593828, transparent 70%),
        var(--deep);
    border-block-end: 1px solid var(--edge);
}

.shop-teaser-pro-grid {
    display: grid;
    grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
    align-items: center;
    gap: clamp(26px, 4.6vw, 68px);
}

.shop-teaser-pro-copy {
    display: grid;
    align-content: start;
    gap: 14px;
}

.shop-teaser-pro-copy h2 {
    font-size: clamp(2rem, 3.6vw, 3.35rem);
    margin: 0;
}

.shop-address-card {
    display: grid;
    gap: 8px;
    padding: 15px 17px;
    border-radius: 14px;
    border: 1px solid #304e3d;
    background: #0a1912;
}

.shop-address-card address {
    font-style: normal;
    font-weight: 750;
    color: var(--text);
    font-size: .96rem;
    display: inline-flex;
    align-items: flex-start;
    gap: 9px;
}

.shop-address-card address svg {
    width: 18px;
    height: 18px;
    color: var(--signal);
    margin-top: 3px;
}

.shop-access-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    color: #cbe3d2;
    padding: 6px 10px;
    border-radius: 8px;
    background: #10271b;
    border: 1px solid #2b4938;
}

.shop-quick-channels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.shop-channel-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid #355744;
    background: #0c1f16;
    color: var(--text);
    font-size: .82rem;
    font-weight: 700;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

.shop-channel-pill svg {
    width: 15px;
    height: 15px;
    color: var(--signal);
}

.shop-channel-pill:hover,
.shop-channel-pill:focus-visible {
    border-color: var(--signal);
    color: var(--signal);
    background: #133022;
}

.shop-teaser-pro-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-block-start: 4px;
}

/* Responsive Breakpoints */
@media (max-width: 1120px) {
    .hero-home .hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .hero-flank-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .h-stage-dashcam,
    .h-stage-tpms,
    .h-stage-steering,
    .h-stage-mount {
        --orb-w: 88px;
        --orb-h: 84px;
    }

    .editorial-pro-grid,
    .shop-teaser-pro-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .shop-teaser-pro-grid .r8-carousel {
        order: -1;
    }
}

@media (max-width: 700px) {
    .hero-home .hero-grid {
        grid-template-columns: minmax(0, 1fr);
        min-height: auto;
        padding-block-start: 0;
    }

    .hero-home .hero-copy {
        padding-block: 26px 8px;
    }

    .hero-actions {
        margin-block-start: 16px;
        gap: 9px;
    }

    .hero-actions .button {
        padding-inline: 14px;
        font-size: .88rem;
    }

    .hero-flank-constellation {
        margin-block-start: 16px;
        padding: 12px;
    }

    .hero-flank-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .home-orb-media {
        height: 62px;
    }

    .home-orb-media img {
        max-width: 66px;
        max-height: 60px;
    }

    .scene-stage-orbs {
        display: none;
    }

    .r8-carousel-stage {
        aspect-ratio: 4 / 3;
    }

    .r8-carousel-caption {
        padding: 14px 14px 12px;
        gap: 4px;
    }

    .r8-carousel-caption h3 {
        font-size: 1rem;
    }

    .r8-carousel-caption p {
        font-size: .78rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .r8-carousel-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .r8-carousel--showroom .r8-carousel-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .r8-carousel-tab {
        padding: 7px 8px;
    }

    .r8-carousel-tab span {
        font-size: .69rem;
    }
}

@media (max-width: 373px) {
    .hero-trust-pills span {
        font-size: .7rem;
        padding: 4px 9px;
    }

    .r8-carousel--showroom .r8-carousel-tabs {
        grid-template-columns: minmax(0, 1fr);
    }
}
