:root {
  --bg: #f4f2fc;
  --bg2: #e7effb;
  --card: #ffffff;
  --ink: #20264d;
  --text: #20264d;
  --line: #20264d;
  --muted: #5c6480;
  --red: #845EC2;
  --yellow: #0089BA;
  --green: #008F7A;
  --sky: #0081CF;
  --pink: #845EC2;
  --mint: #d5f0ee;
  --price: #845EC2;
  --ok: #008F7A;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 18px;
  position: relative;
  z-index: 1;
}

h1, h2, h3 {
  font-family: 'Fredoka', 'Nunito', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.05;
}

/* NAVBAR */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 3px solid var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.logo {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: .02em;
}

.logo b {
  display: inline-block;
  background: var(--red);
  color: #fff;
  padding: 0 10px;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  transform: rotate(-3deg);
  margin-left: 4px;
  font-weight: 700;
}

nav ul {
  display: flex;
  gap: 22px;
  list-style: none;
  font-size: 14.5px;
  font-weight: 800;
  align-items: center;
}

nav a:hover {
  color: var(--red);
}

.lang, .btn-admin {
  border: 2.5px solid var(--ink);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 5px 13px;
  font: inherit;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}

.lang:active, .btn-admin:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.btn-admin {
  background: var(--yellow);
  color: #fff;
}

@media(max-width: 760px) {
  nav ul {
    display: none;
  }
}

/* HERO SECTION */
.hero {
  padding: 56px 0 66px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #845EC2 0%, #2C73D2 28%, #0081CF 52%, #0089BA 74%, #008F7A 100%);
  border-bottom: 3px solid var(--ink);
}

.hero h1 {
  font-size: clamp(58px, 14vw, 128px);
  color: #fff;
}

.hero h1 span {
  display: inline-block;
  background: #fff;
  color: #2C73D2;
  padding: 0 .14em;
  border: 3px solid var(--ink);
  border-radius: .18em;
  transform: rotate(-2deg);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .28);
}

.hero p {
  max-width: 520px;
  color: #f2eefc;
  font-size: 18.5px;
  font-weight: 700;
  margin: 22px 0 28px;
}

/* KATALOG PRODUK */
section {
  padding: 60px 0;
  border-bottom: 3px solid var(--ink);
}

#produk {
  background: #eaf2fb;
}

.eyebrow {
  display: inline-block;
  background: linear-gradient(135deg, #845EC2, #2C73D2);
  color: #fff;
  padding: 3px 13px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .14em;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.tabs {
  display: flex;
  gap: 9px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.tab {
  background: #fff;
  border: 2.5px solid var(--ink);
  color: var(--ink);
  padding: 8px 18px;
  border-radius: 999px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
}

.tab.on {
  background: linear-gradient(135deg, #845EC2, #2C73D2);
  color: #fff;
}

.pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.prod {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 20px;
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 4px 4px 0 var(--ink);
}

.pimg {
  aspect-ratio: 4/3;
  border-radius: 14px;
  overflow: hidden;
  background: #e9ddf8;
  border: 2.5px solid var(--ink);
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  position: relative;
}

.pimg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.price {
  color: #845EC2;
  font-weight: 900;
}

.stk {
  font-size: 11.5px;
  font-weight: 900;
  padding: 2px 10px;
  border-radius: 999px;
  border: 2px solid var(--ink);
}

.stk.in { background: #cdeee6; color: #0b5c49; }
.stk.low { background: #e9ddf8; color: #4b2a7a; }
.stk.out { background: #ffd9d4; color: #8a2b22; }

.wabtn {
  margin-top: 6px;
  text-align: center;
  background: #008F7A;
  color: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  padding: 7px;
  font-size: 13.5px;
  font-weight: 900;
  box-shadow: 2px 2px 0 var(--ink);
}

.wabtn.sold {
  background: #8a8a8a !important;
  cursor: not-allowed;
}

/* MODAL ADMIN */
dialog#adminModal {
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 8px 8px 0 var(--ink);
  background: #fff;
  padding: 24px;
  width: min(94vw, 700px);
  max-height: 90vh;
  overflow: auto;
  margin: auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.input-std {
  padding: 8px;
  border: 2px solid var(--ink);
  border-radius: 8px;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  background: var(--bg2);
  padding: 16px;
  border-radius: 14px;
  border: 2px solid var(--ink);
}

.admin-form input, .admin-form select {
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font: inherit;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.admin-table th, .admin-table td {
  border: 2px solid var(--ink);
  padding: 8px;
  text-align: left;
  font-size: 13px;
}

.admin-table th {
  background: var(--yellow);
  color: #fff;
}

.btn-sm {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  font-weight: bold;
}

.btn-del { background: #ffb4ab; color: #7f1d1d; }
.btn-edit { background: #bfe6ff; color: #20264d; }
.btn-save { background: var(--ok); color: #fff; padding: 10px; }

footer {
  padding: 28px 0 36px;
  text-align: center;
  background: var(--ink);
  color: #ffe9b8;
  font-size: 13.5px;
  font-weight: 700;
}