/* =====================================================
   UMKM Desa Kenanga - Stylesheet Marketplace Style
   Terinspirasi Tokopedia/Shopee, warna khas identitas desa
   ===================================================== */

:root {
    --hijau-tua: #1a7a3e;
    --hijau: #22a851;
    --hijau-gelap: #0f5c2b;
    --emas: #f5a623;
    --oranye: #ff6b35;
    --abu-bg: #f5f6f7;
    --abu-teks: #4a4a4a;
    --abu-muda: #8b8b8b;
    --putih: #ffffff;
    --border: #e8e8e8;
    --radius: 8px;
    --radius-lg: 14px;
    --shadow: 0 1px 4px rgba(0,0,0,0.08);
    --shadow-hover: 0 6px 20px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--abu-teks);
    background: var(--abu-bg);
    line-height: 1.5;
    font-size: 14px;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- NAVBAR ---------- */
.navbar {
    background: linear-gradient(90deg, var(--hijau-tua), var(--hijau));
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 24px;
}

.navbar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--putih);
    font-weight: 800;
    font-size: 19px;
    flex-shrink: 0;
}

.navbar .brand span.sub {
    display: block;
    font-weight: 400;
    font-size: 11px;
    color: #d7f0dd;
}

.navbar .logo-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--emas);
    color: var(--hijau-gelap);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.navbar-search {
    flex: 1;
    max-width: 480px;
    display: none;
}

.navbar-search form {
    display: flex;
    background: var(--putih);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}

.navbar-search input {
    flex: 1;
    border: none;
    padding: 10px 18px;
    font-size: 14px;
    outline: none;
}

.navbar-search button {
    background: var(--emas);
    border: none;
    padding: 0 20px;
    color: var(--hijau-gelap);
    font-weight: 700;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.nav-menu a {
    color: #eef9f0;
    padding: 9px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: background .2s;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255,255,255,0.18);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--putih);
    font-size: 26px;
    cursor: pointer;
}

@media (min-width: 900px) {
    .navbar-search { display: block; }
}

/* ---------- HERO / BANNER MARKETPLACE STYLE ---------- */
.hero {
    background: linear-gradient(120deg, var(--hijau-tua) 0%, var(--hijau) 60%, var(--emas) 150%);
    color: var(--putih);
    padding: 46px 0 54px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}

.hero-inner {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero h1 {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 10px;
}

.hero p {
    max-width: 620px;
    margin: 0 auto 22px;
    font-size: 15px;
    color: #eafcee;
}

.hero-search {
    max-width: 560px;
    margin: 0 auto 20px;
    display: flex;
    background: var(--putih);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.hero-search input {
    flex: 1;
    border: none;
    padding: 14px 20px;
    font-size: 15px;
    outline: none;
    color: #333;
}

.hero-search button {
    background: var(--oranye);
    color: var(--putih);
    border: none;
    padding: 0 28px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}

.btn {
    display: inline-block;
    padding: 11px 24px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}

.btn-emas {
    background: var(--emas);
    color: #3b2f05;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.18); }

.btn-outline {
    background: transparent;
    border: 2px solid var(--putih);
    color: var(--putih);
}

/* ---------- CATEGORY ICON ROW (marketplace style) ---------- */
.kategori-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: -34px;
    position: relative;
    z-index: 3;
}

.kategori-icon-card {
    background: var(--putih);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 18px 10px;
    text-align: center;
    transition: transform .15s, box-shadow .15s;
}

.kategori-icon-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.kategori-icon-card .emoji {
    font-size: 28px;
    margin-bottom: 8px;
}

.kategori-icon-card .nama {
    font-size: 13px;
    font-weight: 600;
    color: var(--hijau-gelap);
}

/* ---------- SECTION ---------- */
.section {
    padding: 44px 0;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.section-title h2 {
    font-size: 20px;
    font-weight: 800;
    color: #222;
}

.section-title .lihat-semua {
    color: var(--hijau-tua);
    font-weight: 600;
    font-size: 13px;
}

.section-title-center {
    text-align: center;
    margin-bottom: 30px;
}

.section-title-center h2 {
    font-size: 24px;
    color: var(--hijau-gelap);
    font-weight: 800;
    margin-bottom: 6px;
}

.section-title-center p {
    color: var(--abu-muda);
    max-width: 520px;
    margin: 0 auto;
    font-size: 14px;
}

/* ---------- STATS ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--putih);
    border-radius: var(--radius-lg);
    padding: 20px 14px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-card .angka {
    font-size: 24px;
    font-weight: 800;
    color: var(--hijau-tua);
}

.stat-card .label {
    font-size: 12px;
    color: var(--abu-muda);
    margin-top: 4px;
}

/* ---------- PRODUK GRID - MARKETPLACE CARD ---------- */
.produk-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.produk-card {
    background: var(--putih);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .18s, box-shadow .18s;
    position: relative;
    border: 1px solid var(--border);
}

.produk-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.produk-card .foto-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #eee;
}

.produk-card .foto {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.produk-card:hover .foto { transform: scale(1.05); }

.produk-card .kategori-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(26,122,62,0.92);
    color: var(--putih);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.label-pill {
    display: inline-block;
    background: var(--hijau-tua);
    color: var(--putih);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 14px;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 10px;
}

.produk-card .isi {
    padding: 12px;
}

.produk-card h3 {
    font-size: 13.5px;
    font-weight: 600;
    color: #222;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
    line-height: 1.3;
}

.produk-card .pemilik {
    font-size: 11.5px;
    color: var(--abu-muda);
    margin-bottom: 6px;
}

.produk-card .harga {
    color: var(--oranye);
    font-weight: 800;
    font-size: 15.5px;
    margin-bottom: 10px;
}

.wa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #25d366;
    color: var(--putih);
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 700;
    width: 100%;
}

/* ---------- FILTER KATEGORI ---------- */
.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.filter-bar a {
    padding: 8px 18px;
    border-radius: 20px;
    background: var(--putih);
    border: 1.5px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--abu-teks);
}

.filter-bar a.active,
.filter-bar a:hover {
    background: var(--hijau-tua);
    color: var(--putih);
    border-color: var(--hijau-tua);
}

/* ---------- PROFIL DESA ---------- */
.profil-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: center;
}

.profil-wrap .teks h2 {
    color: var(--hijau-gelap);
    font-size: 23px;
    font-weight: 800;
    margin-bottom: 12px;
}

.profil-wrap .teks p {
    margin-bottom: 12px;
    color: #555;
    font-size: 14px;
    text-align: justify;
}

.info-list li {
    padding: 9px 0;
    border-bottom: 1px dashed var(--border);
    display: flex;
    gap: 8px;
    font-size: 13.5px;
}

.info-list li b { color: var(--hijau-gelap); min-width: 120px; display: inline-block; }

.card-media {
    background: var(--putih);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    height: 300px;
}

.card-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- GALERI ---------- */
.galeri-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.galeri-grid .item {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 1/1;
}

.galeri-grid .item img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- KONTAK ---------- */
.kontak-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
}

.kontak-info .item {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
}

.kontak-info .icon {
    width: 40px;
    height: 40px;
    background: var(--hijau-tua);
    color: var(--putih);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.form-box {
    background: var(--putih);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.form-group { margin-bottom: 15px; }

.form-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--hijau);
}

/* ---------- FOOTER ---------- */
footer {
    background: #0f3d21;
    color: #b9d9c2;
    padding: 36px 0 18px;
    margin-top: 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 28px;
    margin-bottom: 20px;
}

footer h4 { color: var(--putih); margin-bottom: 12px; font-size: 15px; }
footer li { margin-bottom: 7px; font-size: 13px; }
footer li a:hover { color: var(--emas); }
footer p { font-size: 13px; }

.footer-bottom {
    text-align: center;
    font-size: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: #7fa389;
}

/* ---------- ADMIN PANEL (tetap gaya dashboard, tidak perlu marketplace) ---------- */
.admin-body { background: #f0f2f5; font-family: 'Segoe UI', Arial, sans-serif; }
.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.admin-login-box { background: var(--putih); padding: 40px; border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 360px; }
.admin-login-box h2 { text-align: center; color: var(--hijau-tua); margin-bottom: 6px; }
.admin-login-box p.sub { text-align: center; font-size: 13px; color: #999; margin-bottom: 24px; }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 230px; background: var(--hijau-gelap); color: var(--putih); padding: 24px 0; flex-shrink: 0; }
.admin-sidebar .brand { padding: 0 20px 20px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,0.15); margin-bottom: 16px; }
.admin-sidebar a { display: block; padding: 12px 20px; color: #dcebe0; font-size: 14px; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,0.1); color: var(--putih); }
.admin-content { flex: 1; padding: 28px 34px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-card { background: var(--putih); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 22px; }
table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th, table.admin-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); font-size: 14px; }
table.admin-table th { color: #888; font-weight: 600; font-size: 13px; }
.badge-aksi a { display: inline-block; padding: 5px 10px; border-radius: 5px; font-size: 12px; margin-right: 6px; }
.badge-edit { background: #e7f0ff; color: #2563eb; }
.badge-hapus { background: #ffe7e7; color: #dc2626; }
.alert { padding: 12px 16px; border-radius: 7px; margin-bottom: 18px; font-size: 14px; }
.alert-sukses { background: #e6f7ec; color: #1e7d3f; border: 1px solid #b7e6c4; }
.alert-error { background: #fdeaea; color: #c0392b; border: 1px solid #f5c6c6; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
    .nav-menu { display: none; }
    .nav-toggle { display: block; }
    .nav-menu.show {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--hijau-tua);
        padding: 10px;
    }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .produk-grid { grid-template-columns: repeat(2, 1fr); }
    .kategori-row { grid-template-columns: repeat(2, 1fr); }
    .profil-wrap, .kontak-wrap { grid-template-columns: 1fr; }
    .galeri-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; }
}

@media (max-width: 480px) {
    .produk-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .hero h1 { font-size: 22px; }
}