
/* ─── CSS COLUMNS MASONRY (seperti Pinterest) ─── */
.product-grid {
    flex: 1;                  /* isi ruang sisa di bawah header/search/kategori/trx */
    overflow-y: auto;         /* biar bisa scroll */    
    column-count: 2;
    column-gap: 12px;
    padding: 10px;
}


.product-card {
    break-inside: avoid;
    margin-bottom: 12px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.product-img {
    min-height: 100px;   /* tinggi minimal */
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    
}

.product-img img {
    width: 100%;
    height: auto;
    display: block;
}

.product-info { 
    padding: 10px 12px 12px; 
}

.product-name { 
    font-size: 13px; 
    font-weight: 600; 
    color: #1e293b; 
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price { 
    font-size: 14px; 
    font-weight: 800; 
    color: #E2572C; 
    margin-top: 4px;
    margin-bottom: 3px;
}

.product-sold {  
    font-size: 10px; 
    color: #94a3b8; 
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.produk-icon {
  min-height: 200px;   /* tinggi minimal */
  display: flex;       /* agar ikon bisa rata tengah */
  align-items: center; /* vertikal tengah */
  justify-content: center; /* horizontal tengah */
  font-size: 64px;     /* ukuran ikon lebih besar */
}


/* Responsive columns */
@media (min-width: 640px) {
    .product-grid {
        column-count: 3;
        column-gap: 15px;
    }
    .product-card {
        margin-bottom: 15px;
    }
}

@media (min-width: 1024px) {
    .product-grid {
        column-count: 4;
        column-gap: 18px;
    }
}

@media (min-width: 1280px) {
    .product-grid {
        column-count: 5;
        column-gap: 20px;
    }
}

/* Stat Grid */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px 12px;
}

.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.stat-label { 
    font-size: 10px; 
    color: #94a3b8; 
    font-weight: 500; 
}

.stat-value {  
    font-size: 20px; 
    font-weight: 800; 
    color: #1e293b; 
    margin-top: 3px; 
}

.stat-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 10px;
    background: #dcfce7;
    color: #16a34a;
    padding: 2px 7px;
    border-radius: 20px;
    font-weight: 600;
}

/* Scrollbar styling */
#kategori_produk::-webkit-scrollbar {
    display: none;
}

/* Loading state */
.product-card.loading {
    opacity: 0.6;
    pointer-events: none;
}




/* ── Bundle Badge ───────────────────────────────────────── */
.bundle-badge {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(124,58,237,.4);
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}

/* ── Harga coret untuk bundling ─────────────────────────── */
.product-price-original {
    font-size: 11px;
    color: #9ca3af;
    text-decoration: line-through;
    line-height: 1.2;
    margin-bottom: 1px;
}

/* ── Daftar isi bundle ───────────────────────────────────── */
.bundle-items-list {
    margin: 6px 0 4px;
    padding: 6px 8px;
    background: #f5f3ff;
    border: 1px solid #ede9fe;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bundle-item-row {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: 11px;
    color: #5b21b6;
    line-height: 1.4;
}

/* ── Subtle highlight untuk card bundle ─────────────────── */
.is-bundle-card {
    border: 1.5px solid #ede9fe !important;
    background: linear-gradient(160deg, #faf5ff 0%, #fff 60%) !important;
}




/* ── Bundle items di cart modal ─────────────────────────── */
.cart-bundle-items {
    margin: 6px 0 4px;
    padding: 6px 8px;
    background: #f5f3ff;
    border: 1px solid #ede9fe;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.cart-bundle-item-row {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: 11px;
    color: #5b21b6;
    line-height: 1.5;
}













.variant-item{
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:8px;
    padding:12px;
    margin-bottom:10px;
    display:flex;
    gap:10px;
    align-items:center;
}

.variant-item input{
    flex:1;
}

.btn-remove-variant{
    background:#ef4444;
    color:white;
    border:none;
    border-radius:6px;
    padding:8px 12px;
    cursor:pointer;
}





.bundle-items-pill {
  display: flex;
  flex-wrap: wrap;   /* biar kalau banyak, turun ke baris berikutnya */
  gap: 6px;          /* jarak antar pill */
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  background-color: #a081e7; /* ungu */
  color: #fff;
  border-radius: 999px;      /* bikin bulat seperti pill */
  font-size: 9px;
  line-height: 1.4;
}
