/* =========================================================
   PRODUK.CSS - MENGIKUTI THEME INDEX.CSS
   Tanpa asumsi, hanya styling untuk tampilan produk
========================================================= */

/* Menggunakan variabel yang sama dengan index.css */
:root {
    --primary-gradient: linear-gradient(135deg, #4158D0 0%, #C850C0 46%, #FFCC70 100%);
    --dark-bg: #0f0f15;
    --card-bg: #1a1a20;
    --glass-border: rgba(255, 255, 255, 0.08);
    --gold: #FFCC70;
    --text-muted: rgba(255, 255, 255, 0.6);
    --text-dim: rgba(255, 255, 255, 0.4);
}

/* Product Grid - 5 kolom seperti di index */
.product-grid {
    display: grid;
    gap: 16px;
    margin: 0 0 24px 0;
}

@media (max-width: 575px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media (min-width: 576px) and (max-width: 991px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (min-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 16px;
    }
}

/* Product Card - Sama persis dengan index.css */
.product-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    border-color: #C850C0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Image Wrapper - Sama dengan index */
.product-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #2a2a30;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.03);
}

/* Wishlist Button - Floating seperti di index */
.btn-wishlist-floating {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-size: 12px;
    backdrop-filter: blur(2px);
    cursor: pointer;
}

.btn-wishlist-floating:hover {
    background: #C850C0;
}

/* Product Info - Padding sama dengan index */
.product-info {
    padding: 8px 6px 10px;
}

/* Kategori - Seperti di index */
.product-category {
    font-size: 9px;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 2px;
    display: block;
}

/* Rating - Sama dengan index */
.product-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 4px;
}

.product-rating i {
    color: var(--gold);
    font-size: 9px;
}

.product-rating span {
    font-size: 9px;
    color: var(--text-muted);
}

/* Nama Produk - Sama dengan index */
.product-title {
    font-size: 12px;
    font-weight: 500;
    color: white;
    line-height: 1.3;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 30px;
}

/* Harga - Style persis seperti gambar */
.price-container {
    margin: 4px 0;
}

.price-old {
    font-size: 10px;
    color: var(--text-dim);
    text-decoration: line-through;
    margin-bottom: 2px;
}

.price-current {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
}

/* Terjual - Seperti di index */
.sold-text {
    font-size: 9px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 4px;
}

/* Tombol Cart - Style gradient seperti di index */
.btn-cart {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 6px 0;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
    cursor: pointer;
    margin-top: 8px;
}

.btn-cart:hover {
    background: var(--primary-gradient);
    border-color: transparent;
}

/* Responsive Mobile - Mengikuti index.css */
@media (max-width: 768px) {
    .product-info {
        padding: 6px 4px 8px;
    }
}

@media (max-width: 480px) {
    .product-info {
        padding: 4px 4px 6px;
    }

    .product-title {
        font-size: 11px;
        min-height: 26px;
    }

    .price-current {
        font-size: 12px;
    }

    .btn-cart {
        font-size: 9px;
        padding: 4px 0;
    }
}

/* =========================================
   TOMBOL FILTER & DROPDOWN URUTKAN
========================================= */

/* Tombol Filter */
[data-bs-target="#filterOffcanvas"] {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    transition: all 0.3s ease;
}

[data-bs-target="#filterOffcanvas"]:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Dropdown Sort (Urutkan) */
#sortBy {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    /* Memaksa teks jadi putih terang */
    transition: all 0.3s ease;
}

#sortBy:hover {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

#sortBy:focus {
    border-color: #C850C0 !important;
    /* Warna ungu sesuai tema gradasi saat diklik */
    box-shadow: 0 0 0 0.25rem rgba(200, 80, 192, 0.25) !important;
}

/* Warna background saat dropdown terbuka (opsi di dalamnya) */
#sortBy option {
    background-color: #1e1e2d;
    /* Warna gelap agar tidak putih menyilaukan */
    color: #ffffff;
}