/* style.css */
:root { 
    --primary: #00bcd4; 
    --pink: #e91e63; 
    --wa: #25D366; 
    --danger: #ff4d4d; 
    --blue-old: #2196F3; 
}

body { 
    margin: 0; 
    font-family: 'Segoe UI', Roboto, sans-serif; 
    background: #f5f6f8; 
    padding-bottom: 250px; 
}

* { box-sizing: border-box; }

.top-nav { position: sticky; top: 0; z-index: 9000; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
header { background: var(--primary); color: #fff; padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; }
.promo-running { background: #f1f1f1; color: #333; font-size: 11px; padding: 10px 0; font-weight: bold; border-bottom: 1px solid #ddd; overflow: hidden; }

#cat-bar { display: flex; gap: 8px; padding: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; background: #fff; }
#cat-bar::-webkit-scrollbar { display: none; }
#cat-bar button { border: 1px solid #ddd; padding: 6px 12px; border-radius: 20px; background: #fff; font-size: 12px; white-space: nowrap; color: #666; cursor: pointer; transition: 0.3s; }

.container { padding: 10px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.card { background: #fff; border-radius: 10px; padding: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); position: relative; display: flex; flex-direction: column; }
.card img { width: 100%; height: 110px; object-fit: contain; border-radius: 5px; background: #fafafa; cursor: zoom-in; }
.product-name { font-size: 12px; font-weight: bold; margin-top: 8px; line-height: 1.2; color: #222; min-height: 30px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price-new { color: var(--pink); font-weight: 800; font-size: 14px; margin-top: 4px; display: block; }

.qty-wrapper { display: flex; align-items: center; background: #f0f0f0; border-radius: 4px; margin-top: 8px; height: 30px; overflow: hidden; }
.qty-wrapper button { width: 35px; height: 100%; border: none; background: var(--primary); color: white; font-weight: bold; font-size: 18px; cursor: pointer; }
.qty-wrapper span { font-size: 13px; font-weight: bold; flex-grow: 1; text-align: center; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.8); display: none; align-items: center; justify-content: center; z-index: 10000; padding: 20px; }
.promo-box { background: white; padding: 25px; border-radius: 20px; text-align: center; max-width: 320px; width: 100%; animation: popUp 0.3s ease-out; }

@keyframes popUp { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

#cart { position: fixed; bottom: 75px; left: 0; right: 0; background: #fff; padding: 12px; border-top: 3px solid var(--primary); display: flex; gap: 10px; z-index: 8000; box-shadow: 0 -5px 15px rgba(0,0,0,0.1); max-height: 220px; }
.cart-left { flex: 1.2; display: flex; flex-direction: column; gap: 5px; }
.cart-left input, .cart-left textarea, .cart-left select { padding: 6px; border: 1px solid #ddd; border-radius: 4px; font-size: 12px; width: 100%; }
.cart-right { flex: 1; border-left: 1px dashed #ddd; padding-left: 10px; display: flex; flex-direction: column; }
#cart-list-render { font-size: 11px; color: #666; max-height: 60px; overflow-y: auto; white-space: pre-line; }
#total { color: var(--pink); font-weight: 800; font-size: 15px; margin-bottom: 5px; }
#btn-wa { background: var(--wa); color: white; border: none; padding: 10px; border-radius: 5px; font-weight: bold; cursor: pointer; }

.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 70px; background: #fff; display: flex; justify-content: space-around; align-items: center; box-shadow: 0 -2px 15px rgba(0,0,0,0.1); z-index: 9500; padding-bottom: env(safe-area-inset-bottom); }
.nav-item { display: flex; flex-direction: column; align-items: center; color: #888; text-decoration: none; font-size: 11px; font-weight: 500; flex: 1; transition: 0.3s; position: relative; }
.nav-item.active { color: var(--primary); }
.nav-item span:first-child { font-size: 22px; margin-bottom: 2px; }

.badge-notif { position: absolute; top: -5px; right: 15px; background: var(--pink); color: white; font-size: 10px; padding: 2px 6px; border-radius: 10px; font-weight: bold; display: none; border: 2px solid #fff; animation: pulse-red 2s infinite; }
@keyframes pulse-red { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(233, 30, 99, 0.7); } 70% { transform: scale(1.2); box-shadow: 0 0 0 5px rgba(233, 30, 99, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(233, 30, 99, 0); } }

.qris-wrapper { position: relative; top: -20px; background: #f5f6f8; padding: 6px; border-radius: 50%; }
.btn-qris { width: 60px; height: 60px; background: linear-gradient(45deg, var(--primary), #00d2ff); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 28px; box-shadow: 0 4px 15px rgba(0,188,212,0.4); border: 4px solid #fff; cursor: pointer; }

#camera-modal { position: fixed; inset: 0; background: #000; z-index: 20000; display: none; }
#video-preview { width: 100%; height: 100%; object-fit: cover; }
.scan-box { width: 250px; height: 250px; border: 2px solid var(--primary); position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 4000px rgba(0,0,0,0.5); }

#btn-install-float { position: fixed; right: 0; top: 40%; background: var(--pink); color: white; border: none; padding: 10px 5px; border-radius: 10px 0 0 10px; font-size: 11px; z-index: 8500; display: none; flex-direction: column; cursor: pointer; }
.hide { display: none !important; }

./* Container kartu produk harus relatif agar tombol bisa menempel */
.card {
    position: relative;
    overflow: hidden; /* Agar efek menyatu lebih rapi */
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    transition: transform 0.2s;
}

/* Desain Tombol Share Profesional */
.btn-share-prod {
    position: absolute;
    top: 10px;
    right: 10px; /* Di pojok kanan atas gambar */
    z-index: 50;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.7); /* Transparan putih */
    backdrop-filter: blur(4px); /* Efek kaca kekinian */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    color: #444;
}

.btn-share-prod:hover {
    background: #fff;
    transform: scale(1.1);
    color: var(--primary);
}

.btn-share-prod svg {
    width: 18px;
    height: 18px;
}

/* Tambahkan sedikit overlay bayangan halus di pojok atas agar icon lebih terlihat */
.card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(to bottom left, rgba(0,0,0,0.05), transparent);
    pointer-events: none;
    z-index: 40;
}

.status-habis { position: absolute; inset: 0; background: rgba(255,255,255,0.7); color: var(--danger); display: flex; align-items: center; justify-content: center; font-weight: 900; z-index: 10; border-radius: 10px; pointer-events: none; }
