/* ============================================
   PRODUCT DETAIL PAGE WITH TAB SYSTEM
============================================ */

#product-detail {
    display: none;
    min-height: 100vh;
    padding: 20px;
    padding-bottom: 200px;
}

#product-detail.active {
    display: block;
}

/* ============================================
   IMAGE GALLERY - RESPONSIVE SYSTEM
============================================ */

/* Mobile: Horizontal Slider (Default) */
.image-gallery {
    max-width: 600px;
    margin: 40px auto 30px auto;
    position: relative;
}

/* Mobile: Swipeable Gallery */
.gallery-container {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.gallery-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.gallery-image {
    width: 100%;
    display: inline-block;
    scroll-snap-align: center;
    margin-right: 10px;
    transition: opacity 0.3s ease;
}

.gallery-image:last-child {
    margin-right: 0;
}

/* Desktop: Grid Layout with Main + Thumbnails */
@media (min-width: 769px) {
    .image-gallery {
        max-width: 1200px;
        display: grid;
        grid-template-columns: 1fr 150px;
        gap: 20px;
        margin: 60px auto 40px auto;
    }
    
    /* Main Image Area */
    .gallery-main {
        position: relative;
        width: 100%;
        
        /* FIX: Batasi tinggi maksimal 75% layar agar muat tanpa scroll */
        height: 75vh; 
        max-height: 800px; 
        
        overflow: hidden;
        background: var(--concrete-grey);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .gallery-main img {
        width: 100%;
        height: 100%;
        object-fit: contain; /* Gambar utuh terlihat semua */
        background: #1a1a1a; /* Background filler jika rasio beda */
    }
    
    .gallery-main:hover img {
        transform: scale(1.05);
    }
    
    /* Thumbnail Grid */
    .gallery-thumbnails {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .gallery-thumbnail {
        width: 100%;
        aspect-ratio: 3/4;
        overflow: hidden;
        background: var(--concrete-grey);
        cursor: pointer;
        border: 2px solid transparent;
        transition: all 0.3s ease;
        opacity: 0.5;
    }
    
    .gallery-thumbnail.active {
        border-color: var(--signal-white);
        opacity: 1;
    }
    
    .gallery-thumbnail:hover {
        opacity: 1;
        border-color: rgba(240, 240, 240, 0.5);
    }
    
    .gallery-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* Hide mobile slider on desktop */
    .gallery-container {
        display: none;
    }
}

/* Tablet: Smaller Grid */
@media (min-width: 769px) {
    .image-gallery {
        max-width: 1200px;
        display: grid;
        /* UPDATE: Kolom thumbnail diperbesar dari 120px jadi 160px */
        grid-template-columns: 1fr 160px; 
        gap: 30px;
        margin: 40px auto;
        align-items: start;
    }
    
    /* Main Image Area */
    .gallery-main {
        position: relative;
        width: 100%;
        
        height: 75vh; 
        max-height: 800px; 
        
        overflow: hidden;
        /* UPDATE: Background jadi transparan (bukan abu-abu lagi) */
        background: transparent; 
        
        display: flex;
        align-items: center;
        justify-content: center;
        
        /* Optional: Tambahkan border tipis agar rapi jika gambar PNG transparan */
        /* border: 1px solid rgba(0,0,0,0.05); */
    }
    
    .gallery-main img {
        width: 100%;
        height: 100%;
        object-fit: contain; 
        /* Hapus background filler gelap */
        background: transparent; 
    }
    
    /* UPDATE: Thumbnail juga transparan backgroundnya */
    .gallery-thumbnail {
        width: 100%;
        aspect-ratio: 3/4;
        overflow: hidden;
        background: transparent; /* Update here */
        cursor: pointer;
        border: 1px solid transparent; /* Ganti border jadi 1px biar halus */
        transition: all 0.3s ease;
        opacity: 0.6; /* Sedikit lebih jelas defaultnya */
    }
    
    .gallery-thumbnail.active {
        border-color: var(--void-black); /* Border hitam saat aktif */
        opacity: 1;
    }
}

/* Mobile: Keep Original Slider */
@media (max-width: 768px) {
    .gallery-main,
    .gallery-thumbnails {
        display: none;
    }
    
    .gallery-container {
        display: block;
    }
}

/* ============================================
   PRODUCT INFO
============================================ */

.product-info {
    max-width: 600px;
    margin: 0 auto;
}

.product-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.product-manifesto {
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    font-style: italic;
    opacity: 0.9;
}

/* Desktop: Side-by-side Layout */
@media (min-width: 769px) {
    .product-info {
        max-width: 1200px;
    }
    
    .product-title {
        font-size: 2.5rem;
        margin-bottom: 25px;
    }
    
    .product-manifesto {
        font-size: 1.1rem;
        margin-bottom: 40px;
    }
}

/* ============================================
   TAB SYSTEM
============================================ */

.product-command-center {
    background: var(--concrete-grey);
    margin-bottom: 30px;
}

.tab-navigation {
    display: flex;
    border-bottom: 1px solid rgba(240, 240, 240, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 18px 10px;
    background: transparent;
    color: var(--signal-white);
    border: none;
    font-family: 'Courier New', 'Consolas', monospace;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    opacity: 0.8;
}

.tab-btn.active {
    opacity: 1;
    background: rgba(240, 240, 240, 0.05);
    border-bottom-color: var(--signal-white);
}

.tab-content {
    padding: 25px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

/* ============================================
   TECH SPECS TAB
============================================ */
.tech-specs h3 {
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 0.15em;
    margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif;
}

.tech-specs ul {
    list-style: none;
}

.tech-specs li {
    font-family: 'Courier New', 'Consolas', monospace;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 10px;
    padding-left: 15px;
    position: relative;
}

.tech-specs li::before {
    content: '▸';
    position: absolute;
    left: 0;
}

/* ============================================
   SIZE GUIDE TAB
============================================ */
.size-guide-tab {
    font-family: 'Courier New', 'Consolas', monospace;
}

.size-guide-tab h4 {
    font-weight: 900;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
}

.size-guide-tab table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.size-guide-tab th,
.size-guide-tab td {
    padding: 12px 8px;
    text-align: center;
    border: 1px solid rgba(240, 240, 240, 0.1);
    font-size: 0.85rem;
}

.size-guide-tab th {
    font-weight: 900;
    letter-spacing: 0.1em;
    background: var(--void-black);
}

.size-guide-instructions {
    margin-top: 20px;
    font-size: 0.8rem;
    opacity: 0.8;
    line-height: 1.6;
}

/* ============================================
   SHIPPING TAB
============================================ */
.shipping-info {
    font-family: 'Courier New', 'Consolas', monospace;
}

.shipping-option {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(240, 240, 240, 0.1);
}

.shipping-option:last-child {
    border-bottom: none;
}

.shipping-option h4 {
    font-weight: 900;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.shipping-option p {
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.5;
}

.size-reference {
    font-family: 'Courier New', 'Consolas', monospace;
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 30px;
    opacity: 0.8;
}

/* ============================================
   STICKY BUY BUTTON
============================================ */

.sticky-buy {
    position: fixed;
    z-index: 990;
    background: var(--void-black);
    left: 0;
    width: 100%;
    bottom: 54px;
    padding: 15px 20px;
    border-top: 1px solid rgba(240, 240, 240, 0.1);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.8);
}

.btn-secure {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: block;
    padding: 15px;
    background: var(--signal-white);
    color: var(--void-black);
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 0.95rem;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secure:hover {
    background: var(--void-black);
    color: var(--signal-white);
    border: 2px solid var(--signal-white);
}

.btn-secure.added {
    background: var(--void-black);
    color: var(--alert-red);
    border: 2px solid var(--alert-red);
}

@media (min-width: 768px) {
    .sticky-buy {
        width: 480px;
        left: 50%;
        transform: translateX(-50%);
        bottom: 95px; 
        padding: 0;
        border: none;
        background: transparent;
        box-shadow: none;
    }

    .btn-secure {
        border: 1px solid var(--signal-white);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }
}

@media (max-width: 480px) {
    .sticky-buy {
        bottom: 48px;
        padding: 12px 15px;
    }
    
    .btn-secure {
        font-size: 0.85rem;
        padding: 14px;
    }
}

/* Untuk HP Kecil */
@media (max-width: 375px) {
    .sticky-buy {
        bottom: 43px;
        padding: 10px 15px;
    }

    .btn-secure {
        font-size: 0.8rem;
        padding: 12px;
        letter-spacing: 0.15em;
    }
}

/* ============================================
   NEW ELEMENTS: PRICE & SIZE SELECTOR
============================================ */

/* 1. Harga di bawah Manifesto */
.product-price-large {
    font-family: 'Space Mono', monospace; /* Font teknikal */
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--signal-white);
    margin-top: 20px;
    margin-bottom: 20px;
    letter-spacing: -0.05em;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(240, 240, 240, 0.1);
}

/* 2. Container Size */
.size-selector-container {
    margin-bottom: 30px;
}

.size-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: #737373;
    margin-bottom: 10px;
    display: block;
}

.size-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 3. Tombol Size Industrial */
.size-btn {
    width: 50px;
    height: 50px;
    background: transparent;
    border: 1px solid rgba(240, 240, 240, 0.3);
    color: var(--signal-white);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.size-btn:hover {
    border-color: var(--signal-white);
}

/* State Aktif (Saat Dipilih) */
.size-btn.selected {
    background: var(--signal-white);
    color: var(--void-black);
    border-color: var(--signal-white);
    font-weight: 900;
}

/* ============================================
   SIZE GUIDE TABLE STYLING (FIXED COLORS)
============================================ */
.size-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-tech);
    font-size: 0.85rem;
    margin-top: 15px;
    text-align: left;
}

.size-table th {
    padding: 15px 10px;
    font-weight: 700;
    color: #FFFFFF; /* FIX: Langsung pakai warna Putih */
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.size-table td {
    padding: 12px 10px;
    color: rgba(255, 255, 255, 0.8); /* FIX: Putih agak transparan (pengganti secondary) */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.size-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.size-table td:first-child {
    font-weight: 700;
    color: #FFFFFF; /* FIX: Putih terang untuk Size */
}