/* ===============================
   GRID KATEGORI (MAIN PRODUCTS)
   =============================== */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
    padding: 10px;
}

/* Card kategori */
.category-card {
    background: #ffffff;
    padding: 25px 10px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid #e9e9e9;
    transition: 0.25s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.category-card img {
    width: 70px;
    height: 70px;
    margin-bottom: 12px;
}

.category-card p {
    margin-top: 10px;
    font-size: 1rem;
    font-weight: 600;
}

/* ===============================
   GRID PRODUK (SETELAH PILIH CATEGORY)
   =============================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 1px solid #e9e9e9;
    transition: 0.25s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.product-card img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 12px;
}

.product-card h6 {
    font-weight: 600;
    margin-bottom: 6px;
}

.product-card .price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #4CAF50;
}


.title-center {
    text-align: center;
    width: 100%;
    margin: 0 auto;
}

.title-underline {
    width: 60px;
    height: 4px;
    background: #4CAF50;
    margin: 10px auto 0 auto;
    border-radius: 4px;
}

.product-card {
    display: block;
    background: #fff;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: 0.2s;
    text-decoration: none;
    color: #333;
}

.product-card:hover {
    transform: translateY(-4px);
}

.product-image img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    border-radius: 10px;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    margin: 8px 0 4px;
}

.product-price {
    font-size: 16px;
    color: #009963;
    font-weight: 700;
}


/* === FIX AGAR GRID PRODUK SEJAJAR === */

/* Tinggi gambar dibuat konsisten */
.product-image {
    width: 100%;
    height: 200px; /* kamu bisa naikkan jadi 220/240 kalau mau */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* atau contain jika ingin full gambar terlihat */
}

/* Nama produk biar tingginya seragam */
.product-name {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin-top: 12px;
    min-height: 38px; /* FIX UTAMA */
    display: block;
    line-height: 1.2;
}

/* Harga tetap */
.product-price {
    margin-top: 6px;
    color: #009963;
    font-size: 17px;
    font-weight: 700;
}

/* Card biar tinggi sama */
.product-card {
    height: 100%;
    padding: 15px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    transition: 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.product-card:hover {
    transform: translateY(-4px);
}

.product-list {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.product-detail {
    max-width: 1280px;
    margin: 60px auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.product-image-box {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.product-image-box img {
    width: 100%;
    border-radius: 12px;
}

.product-info-box h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.product-price {
    font-size: 28px;
    font-weight: 800;
    color: #009933;
    margin-bottom: 25px;
}

.qty-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.qty-box input {
    width: 60px;
    height: 38px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 18px;
}

.qty-btn {
    padding: 8px 12px;
    background: #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    border: 1px solid #ccc;
}

.btn-cart {
    background: #ffad00;
    color: #fff;
    font-size: 18px;
    border: none;
    padding: 12px 26px;
    border-radius: 10px;
    margin-right: 12px;
}

.btn-buy {
    background: #009933;
    color: #fff;
    font-size: 18px;
    border: none;
    padding: 12px 26px;
    border-radius: 10px;
}


/* ========== ANIMASI MUNCUL SATU-PER-SATU (STAGGER) ========== */

.stagger-container {
    display: contents;
}

.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    animation: staggerFadeUp 0.6s ease-out forwards;
}

@keyframes staggerFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Delay otomatis berdasarkan urutan */
.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(6) { animation-delay: 0.3s; }
.stagger-item:nth-child(7) { animation-delay: 0.35s; }
.stagger-item:nth-child(8) { animation-delay: 0.4s; }
.stagger-item:nth-child(9) { animation-delay: 0.45s; }
.stagger-item:nth-child(10) { animation-delay: 0.5s; }

/* Tambahan hover premium */
.product-card {
    display: block;
    transition: .25s ease;
    border-radius: 14px;
    border: 1px solid #eee;
    background: #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

.product-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 12px 26px rgba(0,0,0,0.1);
}

.product-image img {
    transition: .35s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.07);
}

/* ========== CARD ACTIONS OVERLAY (Wishlist & Cart Buttons) ========== */

.card-actions-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .card-actions-overlay {
    opacity: 1;
}

/* Style untuk button wishlist dan cart */
.card-actions-overlay button {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.card-actions-overlay button:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-actions-overlay button i {
    font-size: 14px;
}

/* Ensure action overlay is visible */
.product-image {
    position: relative;
}

