:root {
  --green: #3f5e34;
  --green-dark: #2c4224;
  --green-soft: #eef2e9;
  --sand: #f6f1e7;
  --ink: #26261f;
  --muted: #6f6f62;
  --line: #e3ddcf;
  --wa: #25d366;
  --wa-dark: #128c7e;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(40, 50, 30, 0.1);
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

a { color: var(--green-dark); }

.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff;
  padding: 34px 0 30px;
}
.site-header .container { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand h1 { margin: 0; font-size: 1.7rem; letter-spacing: 0.3px; }
.brand .logo { font-size: 2.4rem; line-height: 1; }
.site-header p { margin: 4px 0 0; opacity: 0.9; max-width: 620px; }
.ig-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 9px 15px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.ig-link:hover { background: rgba(255, 255, 255, 0.28); }
.ig-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* Layout */
.layout { display: grid; grid-template-columns: 1fr 340px; gap: 26px; margin: 28px 0 60px; align-items: start; }
@media (max-width: 820px) { .layout { grid-template-columns: 1fr; } }

section.card, aside.summary {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 22px; }

h2.step { font-size: 1.15rem; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.step-num {
  background: var(--green); color: #fff; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0;
}
.step-hint { color: var(--muted); margin: 0 0 16px; font-size: 0.92rem; }

/* Swatches (string colors) */
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch {
  cursor: pointer; border: 2px solid transparent; border-radius: 12px; padding: 8px;
  background: var(--sand); text-align: center; width: 96px; transition: 0.15s;
}
.swatch:hover { border-color: var(--line); }
.swatch.selected { border-color: var(--green); background: var(--green-soft); }
.swatch .dot { width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 6px; border: 1px solid rgba(0,0,0,0.12); background-size: cover; background-position: center; }
.swatch .name { font-size: 0.82rem; font-weight: 600; }

/* Crystal cards */
.crystals { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.crystal {
  cursor: pointer; border: 2px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--sand); transition: 0.15s; display: flex; flex-direction: column;
}
.crystal:hover { transform: translateY(-2px); }
.crystal.selected { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.crystal .thumb { aspect-ratio: 1; background: linear-gradient(135deg, #efe7f7, #e7f0ee); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.crystal .info { padding: 9px 11px; }
.crystal .info b { display: block; font-size: 0.92rem; }
.crystal .info span { font-size: 0.78rem; color: var(--muted); }

/* Quantity */
.qty { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty button { border: 0; background: var(--green-soft); width: 40px; height: 40px; font-size: 1.2rem; cursor: pointer; color: var(--green-dark); }
.qty button:hover { background: #dfe7d6; }
.qty input { width: 54px; height: 40px; border: 0; text-align: center; font-size: 1rem; }

.field { margin-top: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 0.92rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff;
}
.field textarea { resize: vertical; min-height: 70px; }

.btn {
  border: 0; border-radius: 12px; padding: 12px 18px; font: inherit; font-weight: 700; cursor: pointer;
}
.btn-add { background: var(--green); color: #fff; }
.btn-add:hover { background: var(--green-dark); }
.btn-add:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost { background: transparent; border: 1px solid var(--line); }

/* Summary / cart */
aside.summary { position: sticky; top: 20px; }
aside.summary h3 { margin: 0 0 12px; }
.cart-empty { color: var(--muted); font-size: 0.92rem; }
.cart-item { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.cart-item .ci-dot { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.1); flex-shrink: 0; }
.cart-item .ci-main { flex: 1; font-size: 0.9rem; }
.cart-item .ci-main small { color: var(--muted); }
.cart-item .ci-price { font-weight: 700; white-space: nowrap; }
.cart-item .ci-remove { border: 0; background: none; cursor: pointer; color: #b23; font-size: 1.1rem; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 800; margin: 14px 0; }
.btn-wa {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  background: var(--wa); color: #fff; border: 0; border-radius: 12px; padding: 14px; font-size: 1.02rem; font-weight: 800; cursor: pointer; text-decoration: none;
}
.btn-wa:hover { background: var(--wa-dark); }
.btn-wa:disabled { opacity: 0.5; cursor: not-allowed; }
.summary-note { font-size: 0.78rem; color: var(--muted); text-align: center; margin-top: 10px; }

footer { text-align: center; color: var(--muted); padding: 26px 0 40px; font-size: 0.85rem; }
footer a { color: var(--muted); }

/* Admin */
.admin-wrap { max-width: 760px; margin: 30px auto; }
.admin-wrap .card { margin-bottom: 22px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 120px; }
.item-row { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: var(--sand); }
.item-row .thumb-sm { width: 44px; height: 44px; border-radius: 8px; flex-shrink: 0; background-size: cover; background-position: center; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.item-row input[type=text] { flex: 1; }
.item-row .del { background: #fbe9e7; color: #c0392b; border: 0; border-radius: 8px; padding: 8px 12px; cursor: pointer; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--green-dark); color: #fff; padding: 12px 20px; border-radius: 10px; box-shadow: var(--shadow); opacity: 0; transition: 0.3s; pointer-events: none; }
.toast.show { opacity: 1; }
.hidden { display: none !important; }
.login-box { max-width: 380px; margin: 80px auto; }
.tab-link { display: inline-block; margin-bottom: 16px; }
