/* Product Detail Specific Styles */
.product-detail-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.product-detail {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.product-gallery {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* Jarak antar elemen gallery */
}

/* Gambar Utama */
.main-image-container {
    width: 100%;
    height: 400px; /* Tinggi tetap untuk kontrol ukuran */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.main-image {
    width: auto;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block; /* Selalu tampilkan, karena hanya satu gambar aktif */
}

.image-fallback {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    text-align: center;
    color: #9ca3af;
    background-color: rgba(243, 244, 246, 0.5);
    border: 1px dashed #d1d5db;
    border-radius: var(--border-radius);
    padding: 20px;
    box-sizing: border-box;
}

.image-fallback i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #6b7280;
}

.image-fallback p {
    margin: 0;
    font-size: 0.9rem;
}

/* Thumbnail Container */
.thumbnail-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center; /* Pusatkan thumbnail jika jumlahnya sedikit */
    width: 100%;
}

.thumbnail {
    width: 120px; /* Lebar tetap untuk thumbnail */
    height: 80px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.thumbnail:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

.thumbnail.active {
    border-color: var(--primary);
}

/* Overlay fallback untuk thumbnail */
.thumbnail-fallback-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(243, 244, 246, 0.8);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #9ca3af;
    font-size: 0.7rem;
    text-align: center;
    padding: 5px;
    box-sizing: border-box;
    display: none;
}

.thumbnail.fallback .thumbnail-fallback-overlay {
    display: flex;
}

.thumbnail-fallback-overlay i {
    font-size: 1rem;
    margin-bottom: 3px;
    color: #6b7280;
}

/* Info Produk */
.product-info h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

.product-description {
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.product-meta {
    margin-bottom: 30px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--gray);
}

.meta-item i {
    color: var(--primary);
    width: 20px;
}

/* Tombol Aksi */
.product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* Responsive Design for Product Detail */
@media (max-width: 968px) {
    .product-detail-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px;
    }
    
    .product-info h1 {
        font-size: 2rem;
    }

    .main-image-container {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .product-detail-container {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    .product-detail-content {
        padding: 20px;
    }
    
    .product-info h1 {
        font-size: 1.8rem;
    }

    .main-image-container {
        height: 300px;
    }
    
    .thumbnail {
        width: 100px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .product-detail-content {
        padding: 15px;
    }
    
    .product-info h1 {
        font-size: 1.5rem;
    }

    .main-image-container {
        height: 250px;
    }
    
    .thumbnail {
        width: 80px;
        height: 50px;
    }
    
    .marketplace-link {
        padding: 12px 15px;
    }
}

/* Marketplace Links Section (Tidak berubah) */
.marketplace-links {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.marketplace-links h3 {
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.marketplace-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.marketplace-link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(30, 30, 30, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.marketplace-link-card:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    background: rgba(40, 40, 40, 0.8);
}

.marketplace-link-card i:first-child {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.marketplace-link-card[href*="shopee"] i:first-child {
    background: rgba(255, 87, 34, 0.15);
    color: #ff5722;
}

.marketplace-link-card[href*="tokopedia"] i:first-child {
    background: rgba(0, 173, 108, 0.15);
    color: #00ad6c;
}

.marketplace-link-card[href*="bukalapak"] i:first-child {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.marketplace-link-card[href*="lazada"] i:first-child {
    background: rgba(255, 64, 129, 0.15);
    color: #ff4081;
}

.marketplace-link-card[href*="blibli"] i:first-child {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.marketplace-link-content h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.marketplace-link-content p {
    font-size: 0.875rem;
    color: #a0a0a0;
    margin: 0;
}

.marketplace-link-card .fa-external-link-alt {
    margin-left: auto;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.marketplace-link-card:hover .fa-external-link-alt {
    opacity: 1;
}

/* Footer (Tidak berubah) */
.main-footer {
    background: var(--dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.main-footer p {
    margin: 0;
    font-size: 0.9rem;
}