@import url('https://fonts.googleapis.com/css2?family=Unica+One&family=Tenor+Sans&display=swap');

.shop-page { padding: 100px 0 80px; background: #fff; }
.shop-header { text-align: center; margin-bottom: 48px; }
.shop-title {
    font-family: 'Unica One', cursive;
    font-size: 2.8rem;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: #000;
    margin: 0;
}
.shop-subtitle {
    font-family: 'Tenor Sans', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 1.2px;
    color: #666;
    margin-top: 8px;
}

/* FILTERS */
.shop-filters {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    margin-bottom: 32px; 
    flex-wrap: wrap; 
    gap: 16px;
    padding: 0 5vw;
}
.search-box {
    position: relative; 
    flex: 1; 
    max-width: 380px;
}

.search-box input {
    width: 100%; 
    padding: 12px 40px 12px 16px;
    border: 1.4px solid #ddd; 
    border-radius: 8px;
    font-size: 0.9rem; 
    background: #fafafa;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none; 
    border-color: #000; 
    background: #fff;
}

.search-box i { 
    position: absolute; 
    right: 14px; 
    top: 14px; 
    color: #999; }

/* SORT */
.sort-select {
    padding: 10px 16px; 
    border: 1.4px solid #ddd; 
    border-radius: 8px;
    background: #fff; 
    font-size: 0.85rem; 
    cursor: pointer;
}

/* CATEGORY TABS */
.category-tabs {
    display: flex; 
    flex-wrap: wrap; 
    gap: 12px; 
    justify-content: center;
    margin-bottom: 40px; 
    padding-bottom: 20px; 
    border-bottom: 1px solid #eee;
    font-family: 'Unica One', cursive; 
}

.tab {
    padding: 10px 20px; 
    background: transparent; 
    color: #999;
    font-size: 0.8rem; 
    font-weight: 500; 
    text-transform: uppercase;
    letter-spacing: 1.8px; 
    text-decoration: none; 
    border-radius: 30px;
    transition: all 0.3s ease; 
    position: relative;
}

.tab:hover { 
    color: #000; 
}

.tab.active {
    background: #000; 
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* PRODUCT GRID */
.product-grid {
    display: grid; 
    gap: 28px; 
    grid-template-columns: repeat(2, 1fr);
}

/* @media (min-width: 576px) { 
    .product-grid { grid-template-columns: repeat(2, 1fr); } 
}
*/

@media (min-width: 992px) { 
    .product-grid { grid-template-columns: repeat(3, 1fr); } 
}

@media (min-width: 1400px) { 
    .product-grid { grid-template-columns: repeat(4, 1fr); } 
}

/* PRODUCT CARD */
.product-card {
    background: #fff; 
    border-radius: 16px; 
    overflow: hidden;
    box-shadow: 0 4px 16px rgb(255, 255, 255); 
    transition: all 0.4s ease;
    position: relative; 
    height: 100%; 
    display: flex; 
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.img-wrapper {
    position: relative; 
    padding-bottom: 100%; 
    overflow: hidden; 
    background: #f8f8f8;
}

.img-wrapper img {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    object-fit: cover; 
    transition: transform 0.5s ease;
}

.product-card:hover .img-wrapper img { 
    transform: scale(1.06); 
}

.category-tag {
    position: absolute; 
    bottom: 12px; 
    left: 12px;
    background: rgba(0,0,0,0.8); 
    color: #fff; 
    padding: 4px 10px;
    font-size: 0.7rem; 
    text-transform: uppercase; 
    border-radius: 4px;
}

/* QUICK ACTIONS */
.quick-actions {
    position: absolute; 
    top: 12px; 
    right: 12px; 
    display: flex; 
    flex-direction: column; 
    gap: 8px;
    opacity: 0; 
    transition: opacity 0.3s ease;
}

.product-card:hover .quick-actions { 
    opacity: 1;
}
.action-btn {
    width: 36px; 
    height: 36px; 
    background: #fff; 
    border: 1.4px solid #ddd;
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 1rem; 
    color: #666; 
    cursor: pointer; 
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.action-btn:hover { 
    background: #000; 
    color: #fff; 
    border-color: #000; 
    transform: scale(1.1); 
}

.action-btn.active { 
    background: #000; 
    color: #fff; 
}

/* INFO */
.product-info {
    padding: 18px; 
    text-align: left; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column;
    justify-content: space-between;
}

.product-info h3 {
    font-family: 'Unica One', cursive; 
    font-size: 1rem; 
    letter-spacing: 1.2px;
    text-transform: uppercase; 
    margin: 0 0 8px; 
    color: #000;
}

.price { 
    font-family: 'Unica One', cursive; 
    font-size: 0.85rem; 
    font-weight: 100; 
    margin: 4px 0; 
}

.price del { 
    font-size: 0.85rem; 
    color: #999; 
}

.price strong { 
    color: #000; 
    font-size: 0.85rem; 
    font-weight: 100; 
    margin: 4px 0; 
}
.discount { 
    background: #000; 
    color: #fff; 
    font-size: 0.8rem; 
    border-radius: 2px; 
  
}

/* SOLD OUT BADGE */
.sold-out-badge {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 8px 20px; /* Ukuran default desktop */
    font-size: 0.85rem; /* Ukuran default desktop */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 6px;
    z-index: 10;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

/* SOLD OUT CARD */
.product-card.sold-out {
    opacity: 0.7; /* Membuat produk sold out terlihat sedikit redup */
}
/* Menghilangkan hover effect pada card sold out (opsional) */
.product-card.sold-out:hover {
    transform: none; 
    box-shadow: 0 4px 16px rgb(255, 255, 255);
}
.product-card.sold-out .img-wrapper img {
    filter: grayscale(10%); /* Gambar sedikit abu-abu */
}
.product-card.sold-out:hover .img-wrapper img {
    transform: scale(1); /* Hapus efek zoom */
}

/* ==================================== */
/* MEDIA QUERY UNTUK MOBILE (Layar Kecil) */
/* ==================================== */
@media (max-width: 575px) {
    .shop-page { 
        padding: 60px 0 40px; /* Kurangi padding atas/bawah halaman */
    }
    .shop-header {
        margin-bottom: 24px; /* Kurangi margin header */
    }
    .shop-title {
        font-size: 2rem; /* Perkecil judul utama */
        letter-spacing: 2px;
    }
    .shop-subtitle {
        font-size: 0.8rem; /* Perkecil subjudul */
    }

    /* **2. PERKECIL FILTER DAN INPUT PENCARIAN** */
    .shop-filters {
        /* Filter akan otomatis menumpuk karena flex-wrap: wrap, kita hanya perlu perkecil elemennya */
        margin-bottom: 20px;
    }
    .search-box {
        max-width: 100%; /* Pastikan pencarian mengambil lebar penuh jika menumpuk */
    }
    .search-box input {
        padding: 10px 36px 10px 12px; /* Perkecil padding input */
        font-size: 0.85rem;
    }
    .search-box i {
        top: 10px; right: 10px; /* Sesuaikan posisi ikon search */
    }
    .sort-select {
        padding: 8px 12px; /* Perkecil padding select sort */
        font-size: 0.8rem;
    }
    .category-tabs {
        gap: 8px; /* Kurangi jarak antar tab */
        margin-bottom: 24px;
        padding-bottom: 15px;
    }
    .tab {
        padding: 8px 16px; /* Perkecil padding tab */
        font-size: 0.75rem; /* Perkecil font tab */
        flex-shrink: 0; /* Pastikan tab tidak menyusut */
    }

    /* Mengurangi ukuran font untuk nama produk */
    .product-info h3 {
        font-size: 0.85rem; /* Dari 1rem menjadi 0.85rem */
        margin-bottom: 4px; /* Sedikit kurangi margin */
    }

    /* Mengurangi ukuran font untuk harga */
    .price {
        font-size: 0.7rem; /* Dari 0.95rem menjadi 0.8rem */
        margin: 1px 0;
    }

    /* Mengurangi ukuran font untuk harga diskon (strong) */
    .price strong {
        font-size: 0.7rem; /* Dari 1.05rem menjadi 0.9rem */
    }

    /* Mengurangi ukuran font untuk badge diskon */
    .discount {
        font-size: 0.5rem; /* Dari 0.7rem menjadi 0.6rem */
    }

    /* Mengurangi padding card agar lebih compact */
    .product-info {
        padding: 12px;
    }
    
    /* **REVISI DI SINI:** Sembunyikan KONTEN Quick Actions secara keseluruhan di mobile */
    .quick-actions {
        display: none !important; /* Gunakan !important untuk memastikan override opacity: 0 pada hover card */
    }

    /* 1. KARTU: Sedikit lebih transparan agar badge lebih menonjol */
    .product-card.sold-out {
        opacity: 0.7; /* Dikurangi menjadi 0.7 (lebih redup) agar kontras badge lebih kuat */
    }
    .product-card.sold-out .img-wrapper img {
        filter: grayscale(20%); /* Sedikit lebih abu-abu */
    }
    
    /* 2. BADGE: Font dan Padding yang lebih halus */
    .sold-out-badge {
        /* Mengatur ulang ukuran badge agar proporsional di mobile (2 per baris) */
        font-size: 0.5rem; 
        padding: 2px 5px;  
        letter-spacing: 1px;
        /* Tambahkan efek backdrop-filter agar lebih menonjol di atas gambar */
        backdrop-filter: blur(2px); 
    }
}

/* ADD TO CART */
.btn-add-cart {
    margin-top: 12px; padding: 10px; background: #000; color: #fff;
    border: none; border-radius: 8px; font-size: 0.8rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: 1.2px; cursor: pointer;
    transition: all 0.3s ease; opacity: 0; transform: translateY(10px);
}
.product-card:hover .btn-add-cart { opacity: 1; transform: translateY(0); }
.btn-add-cart:hover { background: #333; }

/* LOAD MORE */
.load-more { text-align: center; margin: 48px 0; }
#loadMoreBtn {
    padding: 14px 36px; background: transparent; color: #000;
    border: 1.8px solid #000; border-radius: 30px; font-size: 0.85rem;
    font-weight: 500; text-transform: uppercase; letter-spacing: 1.5px;
    cursor: pointer; transition: all 0.3s ease;
}
#loadMoreBtn:hover { background: #000; color: #fff; }

/* MODAL */
.modal {
    display: none; position: fixed; z-index: 9999; left: 0; top: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
    align-items: center; justify-content: center; padding: 20px;
}
.modal-content {
    background: #fff; max-width: 800px; width: 100%; border-radius: 16px;
    overflow: hidden; position: relative; max-height: 90vh; overflow-y: auto;
}
.close { position: absolute; top: 16px; right: 20px; font-size: 1.8rem; cursor: pointer; color: #999; }
.qv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.qv-img img { width: 100%; height: 100%; object-fit: cover; }
.qv-info { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.qv-info h3 { font-size: 1.8rem; margin: 0 0 8px; }
.qv-category { color: #666; font-size: 0.9rem; margin-bottom: 12px; }
.qv-price { font-size: 1.3rem; margin: 16px 0; }
.btn-view-full { margin-top: 16px; color: #000; text-decoration: underline; font-size: 0.9rem; }

/* TOAST */
.toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: #000; color: #fff; padding: 12px 24px; border-radius: 8px;
    font-size: 0.85rem; z-index: 10000; opacity: 0; transition: all 0.4s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-10px); }

/* NO RESULTS */
.no-results { grid-column: 1 / -1; text-align: center; padding: 80px 20px; }
.no-results img { width: 100px; opacity: 0.5; margin-bottom: 20px; }
.btn-reset { margin-top: 16px; color: #000; text-decoration: underline; }

/* MODAL */
.modal {
    display: none;
    position: fixed; z-index: 9999; left: 0; top: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    align-items: center; justify-content: center; padding: 20px;
}
.modal-content {
    background: #fff; max-width: 900px; width: 100%; border-radius: 16px;
    overflow: hidden; position: relative; max-height: 90vh; overflow-y: auto;
}
.close { position: absolute; top: 16px; right: 20px; font-size: 2rem; cursor: pointer; color: #999; z-index: 11; }
.qv-grid { display: grid; grid-template-columns: 1fr 1fr; }
.qv-img { position: relative; }
.qv-img img { width: 100%; height: 100%; object-fit: cover; }
.qv-info { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.qv-info h3 { font-size: 1.9rem; margin: 0 0 8px; }
.qv-price { font-size: 1.35rem; margin: 16px 0; }
.btn-view-full { margin-top: 16px; color: #000; text-decoration: underline; font-size: 0.9rem; }

/* TOAST */
.toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: #000; color: #fff; padding: 14px 28px; border-radius: 8px;
    font-size: 0.85rem; font-weight: 500; z-index: 10000;
    opacity: 0; transition: all 0.4s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-10px); }

/* CART BADGE - ANIMASI HALUS */
.cart-count {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    background: #000;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}