/* ============================================
   THE ARCHIVE WITH LIVE STOCK SYSTEM
============================================ */

#archive {
    display: none;
    min-height: 100vh;
    padding: 20px;
    padding-bottom: 100px;
}

#archive.active {
    display: block;
}

.archive-header {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 0.15em;
    margin: 40px 0 30px 0;
    text-align: center;
}

.product-stream {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 10px; /* Padding kiri-kanan dikit */
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    grid-template-columns: repeat(2, 1fr); /* 2 Kolom Kiri-Kanan */
    gap: 15px 10px; /* Jarak vertikal 15px, horizontal 10px */
}

.product-card {
    width: calc(50% - 15px);
    margin-bottom: 0;
    position: relative;
}

.product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--concrete-grey);
    cursor: pointer;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.product-image-detail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-image-container.xray-active .product-image {
    opacity: 0;
}

.product-image-container.xray-active .product-image-detail {
    opacity: 1;
}

.xray-icon {
    position: absolute;
    width: 25px;
    height: 25px;
    font-size: 0.7rem;
    top: 8px;
    right: 8px;
    border: 1px solid var(--signal-white); /* Border lebih tipis biar elegan */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(5,5,5,0.8); /* Background lebih gelap */
    z-index: 20; /* Z-Index tinggi agar ada di atas gambar */
    
    /* PENTING: Ubah dari 'none' ke 'auto' agar bisa diklik */
    pointer-events: auto; 
    cursor: pointer;
    transition: all 0.2s ease;
}

.xray-icon:hover {
    background: var(--signal-white);
    color: var(--void-black);
}

.xray-icon:active {
    transform: scale(0.9);
}

/* Data Bar with Monospace Typography */
.data-bar {
    margin-top: 10px;
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
    font-weight: 500;
    font-size: 0.65rem; /* Font lebih kecil (sebelumnya 0.85rem) */
    letter-spacing: 0.05em;
    line-height: 1.4;
}

.data-bar div {
    margin-bottom: 2px;
}

/* Live Stock Status System */
.stock-indicator {
    padding: 2px 6px;
    font-size: 0.6rem;
    border-width: 1px;
}

/* Stock Status Colors */
.stock-available {
    color: #00FF41;
    border-color: #00FF41;
    background: rgba(0, 255, 65, 0.1);
}

.stock-critical {
    color: #FFD700;
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    animation: pulse-warning 2s ease-in-out infinite;
}

.stock-low {
    color: var(--alert-red);
    border-color: var(--alert-red);
    background: rgba(255, 0, 0, 0.1);
    animation: pulse-danger 1.5s ease-in-out infinite;
}

.stock-sold-out {
    color: #666;
    border-color: #666;
    background: rgba(102, 102, 102, 0.1);
    text-decoration: line-through;
    opacity: 0.5;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes pulse-danger {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

/* Price in monospace */
.price-tag {
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
}

/* Sold out overlay on product image */
.product-card.sold-out .product-image-container::after {
    content: 'SOLD OUT';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: 0.2em;
    color: var(--alert-red);
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    z-index: 10;
}

.product-card.sold-out .product-image {
    filter: grayscale(100%) brightness(0.5);
}
