:root {
    --primary-color: #ff7a00; /* Orange dari Logo */
    --secondary-color: #37474f; /* Dark Grey dari Logo */
    --accent-color: #ff9100;
    --bg-color: #fcfcfc;
    --card-bg: #ffffff;
    --text-main: #263238;
    --text-muted: #78909c;
    --border-radius: 12px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 20px rgba(0,0,0,0.08);
}

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    max-width: 1200px; /* Diperlebar untuk mendukung 4 kolom */
    margin: 0 auto;
    padding: 20px;
}

/* Header Styling */
header {
    text-align: center;
    padding: 30px 0 10px; /* Diperkecil agar lebih rapat */
}

.brand-logo-img {
    max-width: 250px;
    height: auto;
    margin-bottom: 5px; /* Diperkecil */
}

header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 15px; /* Lebih rapat */
}

/* Category Navigation */
.category-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px; /* Diperkecil dari 40px */
}

.category-link {
    padding: 8px 16px;
    background: white;
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    border: 1px solid #eee;
}

.category-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.category-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Product Card Styling */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 Kolom di Desktop */
    gap: 24px;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.image-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
}

.product-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--secondary-color);
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.price-tag {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 16px;
    display: block;
}

.btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 122, 0, 0.2);
}

.btn-checkout:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 122, 0, 0.3);
}

/* Admin Dashboard Styling */
.admin-container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.admin-header h1 {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    gap: 10px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
    background: rgba(255, 122, 0, 0.05);
}

/* Admin Card & Forms */
section {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

section h2 {
    font-size: 1.25rem;
    margin-bottom: 25px;
    color: var(--secondary-color);
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--secondary-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #f8fafc;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.1);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2378909c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    padding-right: 45px;
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary { 
    background: var(--primary-color); 
    color: white; 
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 122, 0, 0.3);
}

.btn-secondary { 
    background: #f1f5f9; 
    color: var(--text-muted); 
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: var(--secondary-color);
}

.btn-danger { 
    background: #fff5f5; 
    color: #e53e3e; 
}

.btn-danger:hover {
    background: #fee2e2;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Admin Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th {
    text-align: left;
    padding: 15px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #f1f5f9;
}

td {
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

tr:hover td {
    background: #fcfcfc;
}

/* Redirect Page */
.redirect-box {
    text-align: center;
    margin-top: 120px;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: var(--primary-color);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
footer {
    text-align: center;
    padding: 60px 0 40px;
}

.footer-logo {
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 8px;
    display: block;
}

.footer-logo span { color: var(--primary-color); }

@media (max-width: 992px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .product-grid { 
        grid-template-columns: repeat(2, 1fr); /* 2 Kolom di Mobile/Tablet */
        gap: 15px;
    }
    .container { padding: 10px; }
    .brand-logo-img { max-width: 180px; }
}
