/* ==========================================================================
   PRODUCT SECTION STYLESHEET (CSP INDUSTRIAL STREAMLINE)
   - Layout: Non-Card Seamless Zigzag
   - Frame: Perfect Auto-Fit Vertical Door Architecture
   - Responsive: Fluid 2-Column Zigzag for Mobile & Desktop
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. SECTION CONTAINER & WRAPPER
   -------------------------------------------------------------------------- */
.product-section {
    position: relative;
    width: 100%;
    padding: 6.5rem 0;
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.product-section .container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-header {
    margin-bottom: 4.5rem;
    text-align: left;
    max-width: 780px;
}

.section-header .sub-heading {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.section-header .section-title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-main);
    margin-bottom: 0.85rem;
    letter-spacing: -0.5px;
}

.section-header .section-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

/* --------------------------------------------------------------------------
   2. STREAM FLOW & ZIGZAG ARCHITECTURE (DESKTOP)
   -------------------------------------------------------------------------- */
.product-stream {
    display: flex;
    flex-direction: column;
    gap: 6rem;
    width: 100%;
}

.product-item {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 4.5rem;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5.5rem;
    position: relative;
    transition: border-color 0.3s ease;
}

.product-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Pola Zigzag: Balik urutan kolom pada baris genap */
.product-item:nth-child(even) .product-media {
    order: 2;
}

.product-item:nth-child(even) .product-detail {
    order: 1;
}

/* --------------------------------------------------------------------------
   3. PERFECT FIT DOOR MEDIA BOX (ASPECT RATIO 1:2 TRANSPARAN)
   -------------------------------------------------------------------------- */
.product-media {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 2; /* Agar saat zoom gambar tidak tertutup elemen zigzag lain */
}

.door-frame-box {
    position: relative;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 2;
    height: auto;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible; /* Wajib visible agar gambar 1.5x tidak terpotong */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer; /* Indikator bisa di-klik untuk full view */
}

.door-frame-box img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transform-origin: center center;
    /* Default: Shadow hitam soft mengikuti bentuk pintu (Light Mode) */
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.22));
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                filter 0.4s ease;
}

/* Shadow untuk Dark Mode */
[data-bs-theme="dark"] .door-frame-box img {
    filter: drop-shadow(0 10px 26px rgba(255, 255, 255, 0.18));
}

/* Hover: Zoom 1.5x & Shadow Lebih Kuat */
.door-frame-box:hover {
    z-index: 10;
}

.door-frame-box:hover img {
    transform: scale(1.5);
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.35));
}

[data-bs-theme="dark"] .door-frame-box:hover img {
    filter: drop-shadow(0 0 35px rgba(255, 255, 255, 0.32));
}

/* Badge pintu */
.product-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--primary-color);
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Sembunyikan badge sejenak saat gambar di-zoom agar tidak mengganggu detail pintu */
.door-frame-box:hover .product-badge {
    opacity: 0;
}

/* --------------------------------------------------------------------------
   4. PRODUCT DETAIL & TYPOGRAPHY
   -------------------------------------------------------------------------- */
.product-detail {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.product-index {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--border-color);
    line-height: 1;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    user-select: none;
    transition: color 0.3s ease;
}

.product-item:hover .product-index {
    color: var(--text-muted);
}

.product-title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.product-lead {
    font-size: 0.98rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 1.85rem;
}

/* --------------------------------------------------------------------------
   5. SPECIFICATIONS LIST
   -------------------------------------------------------------------------- */
.spec-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-top: 1px dashed var(--border-color);
    margin-bottom: 2.2rem;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.8rem 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.88rem;
    transition: border-color 0.3s ease;
}

.spec-label {
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
}

.spec-val {
    color: var(--text-main);
    font-weight: 600;
    text-align: right;
    margin-left: 1.5rem;
}

/* --------------------------------------------------------------------------
   6. CALL TO ACTION BUTTON
   -------------------------------------------------------------------------- */
.product-action {
    display: flex;
    align-items: center;
}

.btn-product {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.6rem;
    background: transparent;
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    font-family: 'Raleway', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.25s ease,
                color 0.25s ease,
                transform 0.2s ease,
                box-shadow 0.25s ease;
}

.btn-product:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.btn-product:active {
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   7. SCROLL REVEAL ANIMATION HOOK
   -------------------------------------------------------------------------- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   8. RESPONSIVE DESIGN - TABLET BREAKPOINT (MAX 992px)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .product-item {
        grid-template-columns: 280px 1fr;
        gap: 2.5rem;
        padding-bottom: 4.5rem;
    }

    .door-frame-box {
        height: 420px;
    }

    .product-title {
        font-size: 1.6rem;
    }

    .product-lead {
        font-size: 0.92rem;
        margin-bottom: 1.5rem;
    }
}

/* --------------------------------------------------------------------------
   9. RESPONSIVE DESIGN - MOBILE BALANCED ZIGZAG (MAX 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .product-section {
        padding: 4.25rem 0;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    .section-header .section-title {
        font-size: 1.75rem;
    }

    .product-stream {
        gap: 3.75rem;
    }

    /* Tetap 2 Kolom Zigzag Proporsional di Layar Smartphone */
    .product-item {
        grid-template-columns: 4.2fr 5.8fr;
        gap: 1.25rem;
        align-items: center;
        padding-bottom: 3.5rem;
    }

    /* Urutan Kanan-Kiri Zigzag Mobile */
    .product-item:nth-child(even) .product-media {
        order: 2;
    }

    .product-item:nth-child(even) .product-detail {
        order: 1;
    }

    /* Container Frame Pintu Mobile Pas Presisi */
.door-frame-box {
        width: 100%;
        max-width: 180px; /* Batas lebar pas di layar HP */
        height: auto; /* Tetap ikuti aspect-ratio 1 / 2 */
        aspect-ratio: 1 / 2;
    }

    .door-frame-box img {
        object-fit: contain;
    }

    .product-badge {
        font-size: 0.58rem;
        padding: 0.22rem 0.5rem;
        top: 0.5rem;
        left: 0.5rem;
        border-radius: 3px;
        letter-spacing: 0.25px;
    }

    /* Detail & Font Scaled */
    .product-index {
        font-size: 1.55rem;
        margin-bottom: 0.15rem;
    }

    .product-title {
        font-size: 1.12rem;
        line-height: 1.25;
        margin-bottom: 0.45rem;
    }

    .product-lead {
        font-size: 0.8rem;
        line-height: 1.45;
        margin-bottom: 0.85rem;
    }

    /* Spesifikasi List Mobile */
    .spec-list {
        margin-bottom: 1rem;
    }

    .spec-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.35rem 0;
        gap: 0.1rem;
    }

    .spec-label {
        font-size: 0.68rem;
        opacity: 0.8;
    }

    .spec-val {
        text-align: left;
        margin-left: 0;
        font-size: 0.78rem;
        line-height: 1.35;
    }

    /* Tombol Konsultasi Mobile */
    .btn-product {
        width: 100%;
        padding: 0.5rem 0.65rem;
        font-size: 0.75rem;
        border-width: 1.2px;
        text-align: center;
    }
}

/* --------------------------------------------------------------------------
   10. RESPONSIVE DESIGN - SMALL SCREEN PHONES (MAX 420px)
   -------------------------------------------------------------------------- */
@media (max-width: 420px) {
    .product-item {
        grid-template-columns: 4.4fr 5.6fr;
        gap: 0.85rem;
        padding-bottom: 3rem;
    }

    .door-frame-box {
        height: 250px;
    }

    .product-title {
        font-size: 1rem;
    }

    .product-lead {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .spec-row {
        padding: 0.25rem 0;
    }

    .spec-label {
        font-size: 0.64rem;
    }

    .spec-val {
        font-size: 0.73rem;
    }

    .btn-product {
        font-size: 0.7rem;
        padding: 0.45rem 0.5rem;
    }
}

/* ==========================================================================
   11. BUTTONS & HOOK SLIDER COMPONENT
   ========================================================================== */
.product-header-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0.5rem;
}

.product-header-toggle .product-title {
    margin-bottom: 0;
}

.toggle-indicator {
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: transform 0.35s ease;
}

.product-item.is-expanded .toggle-indicator {
    transform: rotate(180deg);
}

.product-lead {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

/* Slider Down Container */
.product-slider-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-8px);
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.4s ease,
                transform 0.4s ease;
}

.product-item.is-expanded .product-slider-content {
    max-height: 800px;
    opacity: 1;
    transform: translateY(0);
}

/* Hook Box 3 Points */
.hook-box {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background-color: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.2rem 1.3rem;
    margin-bottom: 1.6rem;
    box-shadow: var(--iron-shadow-sm);
}

.hook-point {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.hook-icon {
    font-size: 1.15rem;
    line-height: 1.4;
    flex-shrink: 0;
}

.hook-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.hook-label {
    font-size: 0.88rem; /* ~14px ramah orang tua */
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hook-text {
    font-size: 0.95rem; /* ~15px */
    line-height: 1.6;
    color: var(--text-main);
    margin: 0;
}

/* --- STYLING BUTTONS --- */
.product-action-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.btn-product-detail {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.6rem;
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    font-family: 'Raleway', sans-serif;
    font-size: 0.9rem !important; /* ~14.4px */
    font-weight: 700 !important;
    border-radius: 6px;
    text-decoration: none !important;
    box-shadow: var(--iron-shadow-sm);
    border: 1.5px solid var(--primary-color);
    transition: all 0.25s ease;
}

.btn-product-detail:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--iron-shadow-md);
    color: #ffffff !important;
}

[data-bs-theme="dark"] .btn-product-detail {
    color: #07090e !important;
    background-color: var(--primary-color) !important;
}

.btn-product-consult {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.72rem 1.5rem;
    background: transparent !important;
    border: 1.5px solid var(--border-color);
    color: var(--text-main) !important;
    font-family: 'Raleway', sans-serif;
    font-size: 0.9rem !important;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none !important;
    transition: all 0.25s ease;
}

.btn-product-consult:hover {
    border-color: var(--primary-color);
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* ==========================================================================
   12. SMOOTH FULLSCREEN IMAGE MODAL
   ========================================================================== */
.door-lightbox {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    cursor: zoom-out;
    padding: 1.5rem;
}

.door-lightbox.is-active {
    opacity: 1;
    visibility: visible;
}

.door-lightbox img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    transform: scale(0.85);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.5));
}

[data-bs-theme="dark"] .door-lightbox img {
    filter: drop-shadow(0 0 40px rgba(255, 255, 255, 0.2));
}

.door-lightbox.is-active img {
    transform: scale(1);
}

.door-lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

.door-lightbox-close:hover {
    opacity: 1;
}

/* Responsif Layar Kecil / Mobile */
@media (max-width: 768px) {
    /* --- LOGIKA GAMBAR PINTU DI MOBILE --- */
    .door-frame-box {
        max-width: 170px; /* Lebar pas proporsional untuk 2 kolom zigzag HP */
        aspect-ratio: 1 / 2;
        height: auto;
    }

    .door-frame-box img {
        object-fit: contain;
        /* Shadow disesuaikan lebih tipis agar tidak kotor di layar kecil */
        filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18));
    }

    [data-bs-theme="dark"] .door-frame-box img {
        filter: drop-shadow(0 4px 14px rgba(255, 255, 255, 0.14));
    }

    /* Matikan zoom hover di HP agar tidak nabrak/merusak layout zigzag */
    .door-frame-box:hover img {
        transform: none !important;
    }

    .door-frame-box:hover .product-badge {
        opacity: 1 !important; /* Badge tetap terbaca di HP */
    }

    /* Modal Fullscreen saat dibuka di HP */
    .door-lightbox {
        padding: 1rem;
    }

    .door-lightbox img {
        max-width: 95vw;
        max-height: 80vh;
    }

    /* --- KODE LAINNYA TETAP SEPERTI SEBELUMNYA --- */
    .hook-box {
        padding: 1rem;
        gap: 0.75rem;
    }

    .hook-label {
        font-size: 0.85rem;
    }

    .hook-text {
        font-size: 0.88rem;
    }

    .product-action-group {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .btn-product-detail,
    .btn-product-consult {
        width: 100%;
        text-align: center;
    }
}