:root {
  --ink: #2c2926;
  --muted: #7a736b;
  --green: #3f7d62;
  --green-deep: #2f5e4a;
  --cream: #f6f3ee;
  --paper: #fffcf8;
  --line: #e7e1d8;
  --amber: #c9842a;
  --tag: #fff1c9;
  --danger: #9b2c2c;
  --shadow: 0 16px 40px rgba(70, 48, 16, 0.08);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #f6f3ee;
}

button, input, textarea { font-family: inherit; }

button { cursor: pointer; }

:focus-visible {
  outline: 3px solid #efb14a;
  outline-offset: 2px;
}

.awning {
  height: 4px;
  background: #d7ebe1;
}

.sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(80, 60, 20, 0.08);
}

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.top {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #e7f3ec;
  color: var(--green-deep);
  font-weight: 800;
  font-size: 24px;
}

.brand strong { display: block; font-size: 20px; }
.brand small { color: var(--muted); }

.search input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 14px;
}

.nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.pill, .nav a, .userchip {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 13px;
}

.nav a.active, .chips button.on {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.userchip { background: #e7f5ec; border-color: #b7dfc8; }

main { padding: 22px 0 40px; }

h1, h2, h3, p { margin-top: 0; }

h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.45; margin-bottom: 10px; font-weight: 700; }
h2 { font-size: 28px; margin-bottom: 8px; }
h3 { font-size: 16px; margin: 0; }

.lead { font-size: 17px; line-height: 2; max-width: 46ch; color: #3d3832; }

.kicker { color: var(--green); font-weight: 800; margin-bottom: 6px; }

.arrive {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
  margin: 4px 2px 16px;
  color: var(--muted);
  font-size: 14px;
}

.arrive p { margin: 0; color: var(--green); font-weight: 800; }

.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr;
  gap: 28px;
  align-items: center;
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 28px 26px;
  box-shadow: 0 24px 60px rgba(70, 48, 16, 0.06);
}

.fine {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}

.fine li {
  background: #f7f3ec;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #4d463e;
}

.poster-kicker {
  margin: 0;
  color: var(--green);
  font-weight: 800;
}

.hero-actions, .row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.poster {
  background:
    linear-gradient(180deg, rgba(255, 241, 201, 0.7), rgba(255, 252, 248, 0) 46%),
    var(--paper);
  color: var(--ink);
  border: 1px solid #efe4c8;
  border-radius: 28px;
  padding: 22px;
  min-height: 280px;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.poster h2 { font-size: 26px; font-weight: 700; }
.poster p { line-height: 1.8; color: var(--muted); }

.crystal {
  width: 120px;
  height: 150px;
  margin: 8px auto 12px;
  position: relative;
}

.stick {
  position: absolute;
  left: 54px;
  top: 8px;
  width: 8px;
  height: 132px;
  border-radius: 99px;
  background: linear-gradient(#f6e7cf, #b47a3e);
  transform: rotate(12deg);
}

.rock {
  position: absolute;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(255, 214, 102, 0.55));
  clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%);
  filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.12));
}

.poster .r1 { width: 78px; height: 58px; left: 18px; top: 58px; }
.poster .r2 { width: 46px; height: 36px; left: 62px; top: 38px; opacity: 0.85; }

.steps, .trust {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
  margin: 18px 0 0;
}

.steps { grid-template-columns: repeat(3, 1fr); }
.trust { grid-template-columns: repeat(4, 1fr); }

.steps li, .trust li, .cardbox {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
}

.steps b { display: block; color: var(--green); margin-bottom: 4px; }
.steps span, .trust li { font-weight: 700; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 8px; }

.chips button, .filters button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
}

.shelf { margin-top: 8px; }
.shelf-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.aisle { color: var(--green); font-weight: 800; font-size: 13px; }

.rail {
  background: transparent;
  padding: 0;
  margin: 8px 0 28px;
}

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.card {
  background: #fff;
  border-radius: 16px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(80, 50, 10, 0.06);
}

.gem {
  height: 126px;
  border-radius: 14px;
  position: relative;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.75), transparent 36%),
    linear-gradient(160deg, var(--g1), var(--g2));
  overflow: hidden;
}

.tone-white { --g1: #f7fbff; --g2: #d5dee8; }
.tone-saffron { --g1: #ffe7a3; --g2: #e39b12; }
.tone-rose { --g1: #ffd7e4; --g2: #e48aa8; }
.tone-mint { --g1: #e5f6ea; --g2: #8fc9a4; }
.tone-brown { --g1: #f0d2ae; --g2: #a56a3a; }
.tone-amber { --g1: #ffe1b0; --g2: #efb14a; }

.gem .stick { left: 58px; top: 16px; height: 96px; }
.gem .rock { width: 54px; height: 40px; left: 34px; top: 62px; }
.gem .rock.r2 { width: 34px; height: 26px; left: 68px; top: 42px; }

.badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #fff;
  color: #8a5a00;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
}

.buy { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; }

.tag {
  display: inline-block;
  background: var(--tag);
  border: 1px dashed #c9a227;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.amber { background: var(--amber); color: #2a1c04; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: #f8e4e2; color: var(--danger); }
.btn.small, .pill.small { padding: 7px 10px; font-size: 13px; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.stepper {
  display: inline-flex;
  align-items: center;
  background: var(--cream);
  border-radius: 999px;
}

.stepper button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 18px;
}

.stepper b { min-width: 16px; text-align: center; }

.low { color: var(--danger); font-size: 12px; font-weight: 800; }

.page-head { margin-bottom: 16px; }
.page-head p { color: #3d3832; line-height: 1.8; }

.split, .admin { display: grid; gap: 16px; }
.split { grid-template-columns: 1.45fr 0.8fr; align-items: start; }
.admin { grid-template-columns: 250px 1fr; align-items: start; }

.cart-line, .order li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line:last-child, .order li:last-child { border-bottom: 0; }

.stack { display: grid; gap: 10px; }
label { font-weight: 700; font-size: 13px; display: grid; gap: 6px; }

input[type="text"], input[type="password"], input[type="tel"], textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
}

textarea { min-height: 84px; resize: vertical; }

.total { display: flex; justify-content: space-between; font-size: 18px; margin: 8px 0; }
.error { color: var(--danger); font-weight: 800; }

.auth-card { max-width: 460px; margin: 12px auto; }
.demo { background: #fff7e4; border-radius: 16px; padding: 12px; margin-top: 12px; line-height: 1.9; }
.demo b { unicode-bidi: isolate; }

.stats { display: grid; gap: 10px; }
.stat b { display: block; font-size: 28px; color: var(--green); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.order { margin-bottom: 12px; }
.order h3 { font-size: 18px; }

.track { display: flex; gap: 6px; list-style: none; padding: 0; margin: 12px 0; }
.track li {
  flex: 1;
  text-align: center;
  font-size: 12px;
  padding-top: 8px;
  border-top: 3px solid #e4dccb;
  color: #8a8176;
}
.track li.on { border-color: var(--green); color: var(--green); font-weight: 800; }
.track li.now { border-color: var(--amber); color: #8a5a00; }

.pill-status {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  background: #fff3d2;
  color: #8a5a00;
}
.pill-status.delivered { background: #e5f6ea; color: var(--green); }
.pill-status.cancelled { background: #f8e4e2; color: var(--danger); }
.pill-status.shipping { background: #e7f1ff; color: #1d4e89; }

.empty { text-align: center; padding: 28px 16px; }
.confirm { background: #fff7e4; border-radius: 12px; padding: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

footer { border-top: 1px solid var(--line); padding: 22px 0 28px; background: rgba(255, 253, 248, 0.7); }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; }
.foot p { margin: 0 0 6px; color: #3d3832; line-height: 1.7; }

#toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 50;
  max-width: calc(100% - 32px);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  .top, .hero, .split, .admin, .grid, .foot { grid-template-columns: 1fr; }
  .hero { padding: 20px 16px; border-radius: 24px; }
  .steps { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr 1fr; }
  .nav { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .trust { grid-template-columns: 1fr; }
}
