/* ==========================================================================
   STYLE.CSS FINAL - VERSION 2026.2
   Optimasi: Responsive Grid (2 Kolom Mobile) & Modern UI
   ========================================================================== */

:root {
    --primary: #1e3c72;
    --secondary: #2a5298;
    --dark: #0f2027;
    --accent: #ff4757;
    --success: #2ecc71;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --radius: 16px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.6;
}

/* --- Global Header (For Admin/Sub-pages) --- */
header:not(.main-header) {
    text-align: center;
    padding: 60px 20px 20px;
    color: var(--dark);
}

/* --- Container & Grid --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding-bottom: 60px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    gap: 8px;
}

.btn-primary { background: var(--accent); color: var(--white); }
.btn-shopee { background: #ee4d2d; color: var(--white); width: 100%; }
.btn-admin { background: var(--success); color: var(--white); }
.btn-logout { background: #64748b; color: var(--white); }
.btn-submit { background: var(--primary); color: var(--white); flex: 2; }
.btn-cancel { background: #e2e8f0; color: var(--text-main); flex: 1; text-align: center; }

.btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* --- Form Admin --- */
.form-container {
    max-width: 600px;
    width: 90%;
    margin: 30px auto 60px;
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 700; margin-bottom: 8px; color: var(--primary); }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus { 
    border-color: var(--primary); 
    outline: none; 
    background-color: #f8fafc;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (OPTIMASI TAMPILAN MOBILE)
   ========================================================================== */
@media (max-width: 768px) {
    /* --- KOLEKSI GRID 2 KOLOM --- */
    .product-grid { 
        grid-template-columns: repeat(2, 1fr); /* Tetap mempertahankan 2 kolom sejajar */
        gap: 12px; 
        padding: 0 4px 40px 4px;
    }
    
    /* Menjaga proporsi gambar produk di dalam grid 2 kolom */
    .product-image {
        height: auto !important;
        aspect-ratio: 1 / 1;
    }

    /* Mengurangi padding info produk agar menghemat ruang */
    .product-card .product-info {
        padding: 12px !important;
    }

    /* Tipografi Katalog Mobile */
    .product-card h2 {
        font-size: 0.95rem !important; 
        margin-bottom: 6px !important;
        line-height: 1.3;
        height: 2.6em !important;
    }

    .product-card p {
        font-size: 0.8rem !important; 
        height: 3em !important; 
        margin-bottom: 15px !important;
    }

    /* Penyesuaian Tombol di dalam Kartu */
    .product-card .button-group {
        gap: 6px !important;
        margin-top: auto;
    }

    .btn-detail, .btn-shopee {
        padding: 8px 10px !important;
        font-size: 0.8rem !important;
        border-radius: 8px !important;
        width: 100% !important;
    }
    
    /* --- Form Admin Mobile --- */
    .form-container { 
        padding: 25px; 
    }
    
    .button-group { 
        flex-direction: column; 
    }
}