/* =========================================
   1. CORE VARIABLES & RESET
   ========================================= */
:root {
  --brand: #03ac0e;
  --brand2: #00B14F;
  --bg: #f3fff5;
  --text: #1f2937;
  --muted: #6b7280;
  --card: #ffffff;
  --line: rgba(17, 24, 39, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, Helvetica, sans-serif; color: var(--text); background: var(--bg); line-height: 1.45; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

/* =========================================
   2. LAYOUT & UTILITIES
   ========================================= */
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Topbar & Header */
.topbar { background: linear-gradient(90deg, var(--brand), #1BC47D); color: white; }
.topbar__inner { display: flex; align-items: center; gap: 12px; padding: 18px 0 !important; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .2px; }
.brand__logo { width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.22); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.brand__logo svg { width: 22px; height: 22px; fill: white; }

/* Search & Buttons */
.search { flex: 1; display: flex; gap: 10px; align-items: center; }
.search input { flex: 1; border: 0; border-radius: 999px; padding: 13px 14px !important; outline: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.loginBtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.14); color: white; font-weight: 900; }
.loginBtn:hover { background: rgba(255,255,255,.20); }

/* Navigation */
.nav { background: white; border-bottom: 1px solid var(--line); }
.nav__inner { display: flex; gap: 10px; padding: 10px 0; overflow: auto; }
.nav__inner::-webkit-scrollbar { height: 8px; }
.nav__inner::-webkit-scrollbar-thumb { background: rgba(0,0,0,.12); border-radius: 999px; }
.nav__link { padding: 10px 12px; border-radius: 999px; color: var(--text) !important; font-weight: 800 !important; background: transparent; border: 1px solid transparent; white-space: nowrap; }
.nav__link:hover { background: #eaffee; color: var(--text) !important; }
.nav__link--active { background: #eaffee; border-color: #bff5c6; color: var(--text) !important; font-weight: 900 !important; }

/* =========================================
   3. COMPONENTS (Cards, Hero, Buttons)
   ========================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: white; font-weight: 800; cursor: pointer; transition: filter .12s ease, transform .12s ease; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: white; border-color: transparent; box-shadow: 0 10px 18px rgba(3,172,14,.22); }
.btn--primary:hover { filter: brightness(.97); }
.btn--ghost { background: white; }
.btn--ghost:hover { background: #eaffee; }

/* Hero Section */
.hero { padding: 18px 0 8px; }
.hero__grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media(min-width: 920px) { .hero__grid { grid-template-columns: 1.3fr .7fr; } }
.heroCard { background: linear-gradient(135deg, rgba(3,172,14,.10), rgba(0,191,166,.10)); border: 1px solid rgba(3,172,14,.20); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.heroCard h1 { margin: 0; font-size: 28px; line-height: 1.15; letter-spacing: -.2px; }
.heroCard p { margin: 0; color: var(--muted); }

/* Product Cards */
.section { padding: 18px 0; }
.section h2 { margin: 0 0 10px 0; font-size: 20px; }
.grid { display: grid; gap: 12px; }
@media(min-width: 760px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media(max-width: 759px) { .grid { grid-template-columns: repeat(2, 1fr); } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.05); transition: transform .12s ease, box-shadow .12s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,.10); }
.card__img { position: relative; background: #fff; aspect-ratio: 1/1; }
.card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge { position: absolute; top: 10px; left: 10px; padding: 6px 8px; border-radius: 999px; background: rgba(0,0,0,.72); color: white; font-size: 12px; font-weight: 800; }
.off { position: absolute; top: 10px; right: 10px; padding: 6px 8px; border-radius: 999px; background: var(--brand2); color: white; font-size: 12px; font-weight: 900; }
.card__body { padding: 12px; }
.card__title { margin: 0 0 8px 0; font-size: 13px; line-height: 1.25; height: 34px; overflow: hidden; }
.card__price { display: flex; gap: 8px; align-items: baseline; }
.price { font-weight: 900; }
.old { color: var(--muted); text-decoration: line-through; font-size: 12px; }
.card__actions { display: grid; gap: 8px; margin-top: 10px; }

/* Footer */
.footer { padding: 20px 0 30px; color: var(--muted); font-size: 13px; }
.kv { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.kv .mini { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; flex: 1; min-width: 220px; }
.kv .mini b { display: block; margin-bottom: 4px; }

/* =========================================
   4. NEW: PRODUCT DETAIL PAGE (produk.html)
   ========================================= */
.detail-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}
@media(min-width: 760px) {
    .detail-grid {
        grid-template-columns: 1fr 1.2fr; /* Image smaller, text wider */
        align-items: start;
    }
}

.detail-img {
    background: white;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.detail-img img {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.detail-info h1 {
    font-size: 2rem;
    margin: 0 0 10px 0;
    line-height: 1.2;
    color: var(--brand); /* Use brand color for title */
}

.detail-price {
    font-size: 1.75rem;
    color: var(--text);
    font-weight: 900;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.detail-price .old {
    font-size: 1.1rem;
    color: var(--muted);
    font-weight: normal;
}

.description {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Make the Buy button on detail page huge and noticeable */
.detail-actions .btn--primary {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
}