/* ========================================================================== 
   HAIKAL UNITED v1.4.0 — EXPERIENCE LAYER
   Premium catalog, comparison, quote, 360° and responsive enhancements.
   ========================================================================== */

/* 01. Cinematic hero video ------------------------------------------------ */
.experience-hero {
    isolation: isolate;
    min-height: min(900px, 92svh);
}
.experience-hero .hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}
.experience-hero .hero-bg {
    background-image: var(--hero-photo);
    background-position: center;
    background-size: cover;
    animation: huHeroDrift 20s ease-in-out infinite alternate;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(8, 12, 17, .86), rgba(8, 12, 17, .38) 58%, rgba(8, 12, 17, .18)),
        linear-gradient(180deg, rgba(8, 12, 17, .08), rgba(8, 12, 17, .64));
    pointer-events: none;
}
[dir="rtl"] .hero-overlay {
    background:
        linear-gradient(270deg, rgba(8, 12, 17, .86), rgba(8, 12, 17, .38) 58%, rgba(8, 12, 17, .18)),
        linear-gradient(180deg, rgba(8, 12, 17, .08), rgba(8, 12, 17, .64));
}
.hero-scroll-cue {
    position: absolute;
    bottom: 28px;
    left: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(-50%);
    color: rgba(255,255,255,.72);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.hero-scroll-cue span {
    width: 34px;
    height: 1px;
    background: currentColor;
    animation: huCue 1.7s ease-in-out infinite;
}
@keyframes huHeroDrift {
    from { transform: scale(1.01) translate3d(0,0,0); }
    to { transform: scale(1.07) translate3d(-1.2%, -.8%,0); }
}
@keyframes huCue {
    0%,100% { transform: scaleX(.55); opacity: .45; }
    50% { transform: scaleX(1); opacity: 1; }
}

/* 02. Premium scroll reveal ---------------------------------------------- */
.reveal-section {
    opacity: 0;
    transform: translateY(34px);
    transition:
        opacity .9s cubic-bezier(.2,.7,.2,1),
        transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.interactive-card,
.why-card,
.latest-card,
.timeline-item,
.experience-card {
    transition:
        transform .45s cubic-bezier(.2,.7,.2,1),
        box-shadow .45s ease,
        border-color .45s ease,
        background .45s ease;
}
@media (hover:hover) {
    .interactive-card:hover,
    .why-card:hover,
    .experience-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 24px 55px rgba(13,18,25,.12);
    }
    .latest-card:hover {
        transform: translateY(-6px) scale(1.01);
    }
}

/* 03. Why SINOTRUK ------------------------------------------------------- */
.why-sinotruk {
    background: linear-gradient(180deg, #f6f7f8, #ffffff);
    color: #111820;
}
.why-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.why-card {
    min-height: 220px;
    padding: 28px;
    border: 1px solid rgba(17,24,32,.12);
    border-radius: 22px;
    background: rgba(255,255,255,.86);
    box-shadow: 0 10px 30px rgba(13,18,25,.05);
}
.why-card > span {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 30px;
    border-radius: 50%;
    background: #111820;
    color: #fff;
    font-size: 12px;
}
.why-card h3 { margin: 0 0 10px; font-size: 23px; }
.why-card p { margin: 0; color: #65707d; }

/* 04. Truck finder ------------------------------------------------------- */
.truck-finder {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: clamp(36px, 7vw, 96px);
    align-items: center;
    background: #121820;
}
.finder-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 24px;
    background: rgba(255,255,255,.04);
}
.finder-form label,
.advanced-filters label {
    display: grid;
    gap: 7px;
    font-size: 12px;
    color: var(--muted, #9aa5b2);
}
.finder-form select,
.finder-form input,
.advanced-filters select,
.advanced-filters input {
    min-width: 0;
    width: 100%;
    min-height: 48px;
    padding: 0 13px;
    border: 1px solid var(--line, #27303b);
    border-radius: 12px;
    outline: none;
    background: #0d131a;
    color: #fff;
}
.finder-form .btn { grid-column: 1 / -1; }

/* 05. Featured slider ---------------------------------------------------- */
.slider-controls { display: flex; gap: 8px; }
.slider-controls button {
    width: 46px;
    height: 46px;
    border: 1px solid var(--line, #27303b);
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 26px;
    cursor: pointer;
    transition: transform .25s ease, background .25s ease;
}
.slider-controls button:hover { transform: scale(1.06); background: rgba(255,255,255,.06); }
.truck-slider {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(300px, 32%);
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    scroll-behavior: smooth;
    padding: 4px 2px 18px;
}
.truck-slider::-webkit-scrollbar { display: none; }
.truck-slider .slider-card { scroll-snap-align: start; }

/* 06. Latest additions --------------------------------------------------- */
.latest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 16px;
}
.latest-card {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    border: 1px solid var(--line, #27303b);
    border-radius: 22px;
    background: #0d131a;
}
.latest-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(7,10,14,.86));
}
.latest-card img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: contain;
    background: #eef0f2;
    transition: transform .7s cubic-bezier(.2,.7,.2,1);
}
.latest-card:hover img { transform: scale(1.04); }
.latest-card > div {
    position: absolute;
    z-index: 2;
    inset-inline: 22px;
    bottom: 22px;
}
.latest-card span { color: #d4a35d; font-size: 12px; }
.latest-card h3 { margin: 5px 0 0; color: #fff; font-size: 22px; }

/* 07. Timeline ----------------------------------------------------------- */
.timeline-track {
    position: relative;
    max-width: 1000px;
    margin-inline: auto;
}
.timeline-track::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 84px;
    width: 1px;
    background: linear-gradient(180deg, transparent, #d4a35d 15%, #d4a35d 85%, transparent);
}
.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 44px;
    padding: 26px 0;
}
.timeline-item > span {
    color: #d4a35d;
    font-weight: 800;
    letter-spacing: .04em;
}
.timeline-item > div {
    padding: 22px 24px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 18px;
    background: rgba(255,255,255,.035);
}
.timeline-item h3 { margin: 0 0 8px; }
.timeline-item p { margin: 0; color: var(--muted, #9aa5b2); }

/* 08. Catalog advanced filters ------------------------------------------ */
.experience-catalog-hero { min-height: 420px; display: grid; align-content: end; }
.advanced-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 12px;
    padding: 20px;
    margin-bottom: 28px;
    border: 1px solid var(--line, #27303b);
    border-radius: 22px;
    background: rgba(255,255,255,.025);
}
.filter-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
}
.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 18px;
    color: var(--muted, #9aa5b2);
}
.compare-check {
    position: absolute;
    z-index: 4;
    top: 14px;
    inset-inline-start: 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(10,14,19,.85);
    color: #fff;
    font-size: 12px;
    backdrop-filter: blur(12px);
}
.experience-card { position: relative; }
.card-spec-row,
.quick-specs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.card-spec-row span,
.quick-specs span {
    padding: 7px 10px;
    border: 1px solid var(--line, #27303b);
    border-radius: 999px;
    font-size: 12px;
    color: var(--muted, #9aa5b2);
}
.quick-specs { margin: 20px 0; }
.quick-specs span { padding: 10px 13px; }
.quick-specs b { color: var(--text, #fff); }

/* 09. Compare tray / page ------------------------------------------------ */
.compare-tray {
    position: fixed;
    z-index: 80;
    inset-inline: 20px;
    bottom: 20px;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 16px;
    max-width: 900px;
    margin-inline: auto;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 18px;
    background: rgba(12,17,23,.96);
    box-shadow: 0 18px 60px rgba(0,0,0,.32);
    color: #fff;
    backdrop-filter: blur(16px);
}
.compare-tray[hidden] { display: none; }
.compare-tray > div:first-child { display: flex; gap: 8px; }
.compare-tray [data-compare-names] { color: #aeb7c0; font-size: 13px; }
.compare-tray > button { border: 0; background: transparent; color: #fff; font-size: 24px; }
.compare-table-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.compare-table th,.compare-table td { padding: 18px; border: 1px solid var(--line, #27303b); text-align: start; }
.compare-table thead th:not(:first-child) { min-width: 220px; }
.compare-table thead img { width: 100%; height: 160px; object-fit: contain; background: #eef0f2; border-radius: 14px; margin-bottom: 12px; }
.compare-table thead strong,.compare-table thead small { display:block; }
.compact-hero { min-height: 330px; }

/* 10. Product 360°, applications and share ------------------------------ */
.spin-badge {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #d4a35d;
    color: #111820;
    font-size: 12px;
    font-weight: 800;
}
[data-spin-viewer] { cursor: ew-resize; user-select: none; touch-action: pan-y; }
.application-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 14px;
}
.application-grid article {
    min-height: 160px;
    padding: 24px;
    border: 1px solid var(--line, #27303b);
    border-radius: 20px;
    background: rgba(255,255,255,.025);
}
.application-grid span { color: #d4a35d; font-size: 12px; }
.application-grid h3 { margin: 42px 0 0; font-size: 20px; }
.share-row { display:flex; flex-wrap:wrap; gap:8px; margin-top:18px; }
.share-row a,.share-row button {
    border: 1px solid var(--line, #27303b);
    border-radius: 999px;
    background: transparent;
    color: inherit;
    padding: 8px 11px;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

/* 11. QR and quote request ---------------------------------------------- */
.product-tools-section { padding-top: 20px; }
.qr-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 34px;
    align-items: center;
    padding: clamp(24px,4vw,46px);
    border: 1px solid var(--line, #27303b);
    border-radius: 26px;
    background: #fff;
    color: #111820;
}
.qr-card img { width: 180px; height: 180px; padding: 8px; background:#fff; border-radius: 14px; }
.quote-section {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: clamp(32px,6vw,86px);
    align-items: start;
    background: #121820;
}
.quote-form {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
}
.quote-form input,.quote-form textarea {
    width: 100%;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line, #27303b);
    border-radius: 13px;
    background: #0d131a;
    color: #fff;
    font: inherit;
}
.quote-form textarea { grid-column: 1/-1; min-height: 130px; }
.quote-form .btn,.quote-status { grid-column: 1/-1; }
.hp-field { position:absolute!important; left:-9999px!important; opacity:0!important; }
.quote-status.success { color: #8fd7a7; }
.quote-status.error { color: #ff9c9c; }

/* 12. Cinematic CTA ------------------------------------------------------ */
.cinematic-cta {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    align-items: center;
    border-block: 1px solid rgba(255,255,255,.1);
    background:
        radial-gradient(circle at 80% 20%, rgba(212,163,93,.18), transparent 28%),
        linear-gradient(135deg, #0d131a, #151d27);
}
.cinematic-cta h2 { max-width: 720px; }
.cinematic-cta p { max-width: 680px; color: var(--muted, #aeb7c0); }

/* 13. Sticky smart WhatsApp --------------------------------------------- */
.sticky-whatsapp {
    position: fixed;
    z-index: 70;
    inset-inline-end: 18px;
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px 10px 10px;
    border-radius: 999px;
    background: #fff;
    color: #10151b;
    box-shadow: 0 14px 38px rgba(0,0,0,.24);
    transition: transform .3s ease, box-shadow .3s ease;
}
.sticky-whatsapp span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #111820;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}
.sticky-whatsapp b { font-size: 12px; }
.sticky-whatsapp:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(0,0,0,.3); }

/* 14. Media manager video preview --------------------------------------- */
.media-preview video { width: 100%; height: 100%; max-height: 240px; object-fit: contain; background:#000; }

/* 15. Responsive --------------------------------------------------------- */
@media (max-width: 980px) {
    .why-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .truck-finder,.quote-section { grid-template-columns: 1fr; }
    .advanced-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .truck-slider { grid-auto-columns: minmax(300px, 55%); }
    .latest-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .application-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 680px) {
    .experience-hero { min-height: max(780px, 100svh); }
    .experience-hero .hero-video { object-position: 62% center; }
    .hero-overlay {
        background: linear-gradient(180deg, rgba(8,12,17,.35), rgba(8,12,17,.9) 74%);
    }
    [dir="rtl"] .hero-overlay {
        background: linear-gradient(180deg, rgba(8,12,17,.35), rgba(8,12,17,.9) 74%);
    }
    .hero-scroll-cue { bottom: 18px; }
    .why-grid,.latest-grid,.application-grid { grid-template-columns: 1fr; }
    .why-card { min-height: 180px; }
    .finder-form,.advanced-filters,.quote-form { grid-template-columns: 1fr; }
    .advanced-filters { padding: 14px; }
    .filter-actions { flex-direction: column; }
    .catalog-toolbar { align-items:flex-start; flex-direction:column; }
    .truck-slider { grid-auto-columns: 86%; }
    .slider-controls { display:none; }
    .timeline-track::before { inset-inline-start: 18px; }
    .timeline-item { grid-template-columns: 1fr; padding-inline-start: 44px; gap: 8px; }
    .timeline-item::before { content:""; position:absolute; inset-inline-start:12px; top:33px; width:13px; height:13px; border-radius:50%; background:#d4a35d; box-shadow:0 0 0 6px rgba(212,163,93,.16); }
    .qr-card { grid-template-columns: 1fr; text-align:center; }
    .qr-card img { margin-inline:auto; }
    .cinematic-cta { grid-template-columns: 1fr; }
    .compare-tray { grid-template-columns: 1fr auto; inset-inline:10px; bottom:10px; gap:8px; }
    .compare-tray [data-compare-names] { grid-column:1/-1; }
    .compare-tray .btn { width:auto; }
    .sticky-whatsapp { bottom: 12px; inset-inline-end: 12px; }
    .sticky-whatsapp b { display:none; }
    .share-row { overflow-x:auto; flex-wrap:nowrap; padding-bottom:4px; }
    .share-row>* { white-space:nowrap; }
    .product-detail.experience-product-hero { padding-inline: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .reveal-section { opacity:1; transform:none; transition:none; }
    .experience-hero .hero-bg,.hero-scroll-cue span { animation:none; }
    * { scroll-behavior:auto!important; }
}
