* {
    box-sizing: border-box;
}

/* RESET */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f5f5;
}

/* HEADER (STICKY) */
header {
    position: sticky;
    top: 0;
    background: white;
    padding: 15px 20px; /* 🔥 kiri kanan sama */
    z-index: 100;
    border-bottom: 1px solid #eee;
}

#search {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    outline: none;
}

/* GRID */
#product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    padding: 20px;
}

/* CARD */
.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
}

/* IMAGE + ZOOM */
.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover img {
    transform: scale(1.08);
}

/* CONTENT */
.card-content {
    padding: 10px;
}

/* ID */
.product-id {
    font-size: 12px;
    color: gray;
    margin-bottom: 5px;
}

/* NAMA PRODUK */
.product-name {
    font-weight: bold;
    margin-bottom: 10px;

    /* 🔥 biar rapi kalau panjang */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* BUTTON */
.buttons {
    display: flex;
    gap: 5px;
}

.buttons a {
    flex: 1;
    text-align: center;
    padding: 8px;
    text-decoration: none;
    color: white;
    border-radius: 6px;
    font-size: 12px;
    transition: opacity 0.2s;
}

.buttons a:hover {
    opacity: 0.85;
}

.shopee {
    background: #ee4d2d;
}

.tiktok {
    background: #000;
}

/* 🔥 MOBILE FIX (INI YANG TADI PENTING) */
@media (max-width: 768px) {
    #product-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 10px;
        gap: 10px;
    }

    .card img {
        height: 140px;
    }
}