/* --- VARIABLES & RESET --- */
:root {
    --bg-color: #fafafa;         /* Putih gading, tidak sakit mata */
    --card-bg: #ffffff;
    --text-main: #1a1a1a;        /* Hitam tidak pekat (lebih elegan) */
    --text-muted: #888888;
    --accent: #000000;
    --border-color: #eaeaea;
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
    --radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased; /* Font lebih tajam di Mac/iOS */
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
    line-height: 1.6;
}

/* --- TYPOGRAPHY --- */
h1 {
    font-weight: 300; /* Font tipis = Mewah */
    font-size: 2.5rem;
    letter-spacing: 0.2em; /* Spasi antar huruf lebar */
    margin-bottom: 50px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 15px;
    color: var(--text-main);
}

/* Garis kecil di bawah judul */
h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background-color: var(--accent);
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* --- FORM (ADMIN) --- */
.form-group {
    background: var(--card-bg);
    padding: 30px;
    margin-bottom: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.form-group:hover {
    box-shadow: var(--shadow-hover);
}

label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

input[type="text"],
input[type="number"],
input[type="url"],
input[type="file"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    color: var(--text-main);
    background-color: #fcfcfc;
    transition: all 0.3s ease;
    outline: none;
}

input:focus {
    border-color: var(--accent);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(0,0,0,0.03); /* Efek glow halus */
}

input[type="file"] {
    padding: 10px;
    font-size: 0.9rem;
}

/* --- BUTTONS --- */
button {
    background-color: var(--accent);
    color: #fff;
    padding: 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

button:hover {
    background-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* --- PRODUCT GRID --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
}

/* --- CARD STYLE --- */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,0.02);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efek mantul halus */
    position: relative;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card-img {
    width: 100%;
    height: 250px; /* Sedikit lebih tinggi */
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
    transition: transform 0.5s ease;
}

/* Efek zoom gambar saat hover */
.card:hover .card-img {
    transform: scale(1.05);
}

.card-info {
    padding: 25px;
    text-align: center;
    background: white;
    z-index: 1;
    position: relative;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
    line-height: 1.4;
}

.card-price {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-weight: 400;
}

/* Tombol Beli di dalam Card */
.btn-buy {
    display: inline-block;
    padding: 10px 25px;
    background: white;
    color: var(--accent);
    border: 1px solid var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.card:hover .btn-buy {
    background: var(--accent);
    color: white;
}

/* --- NAVIGATION LINK --- */
.nav-link {
    margin-top: 50px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 1px;
    border-bottom: 1px solid transparent;
    transition: all 0.3s;
    text-transform: uppercase;
}

.nav-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
    h1 { font-size: 1.8rem; letter-spacing: 2px; }
    .product-grid { grid-template-columns: 1fr;
    /* --- TAMBAHAN UNTUK TABEL ADMIN --- */
.table-container {
    overflow-x: auto; /* Agar bisa digeser di HP */
    margin-top: 40px;
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.admin-table th, .admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.admin-table th {
    background-color: #f8f9fa;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-sub);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

/* Tombol Aksi (Edit & Hapus) */
.btn-action {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-decoration: none;
    margin-right: 5px;
    color: white;
}

.btn-edit {
    background-color: #f1c40f; /* Kuning */
}

.btn-delete {
    background-color: #e74c3c; /* Merah */
}

.img-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    background: #eee;
}