/* ============================================================
   Açaí Premium — cardápio digital
   ============================================================ */

:root {
  --purple-950: #2a0745;
  --purple-900: #3b0764;
  --purple-800: #4c1d95;
  --purple-700: #5b21b6;
  --purple-600: #7c3aed;
  --purple-500: #8b5cf6;
  --purple-100: #ede9fe;
  --purple-50: #f6f2ff;
  --yellow: #facc15;
  --yellow-soft: #fef3c7;
  --ink: #221333;
  --muted: #6f6180;
  --line: #e9e2f2;
  --bg: #fbf8ff;
  --card: #ffffff;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --radius: 18px;
  --header-h: 64px;
  --wrap: 1080px;
  --shadow-sm: 0 1px 2px rgba(42, 7, 69, 0.05), 0 4px 14px rgba(42, 7, 69, 0.05);
  --shadow-md: 0 10px 30px rgba(42, 7, 69, 0.12);
  --shadow-lg: 0 24px 60px rgba(42, 7, 69, 0.25);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 110px;
}

body.lock {
  overflow: hidden;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 16px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(233, 226, 242, 0.8);
}

.topbar__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.brand__logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: none;
  background: var(--purple-900);
}

.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  /* Espaço para o halo da bolinha de status não ser cortado pelo overflow. */
  padding-left: 4px;
  line-height: 1.2;
}

.brand__text strong {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  min-width: 0;
  max-width: 100%;
}

.brand__status #storeStatusText {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
  flex: none;
}

.dot.closed {
  background: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: var(--purple-700);
  color: #fff;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13.5px;
  box-shadow: 0 6px 16px rgba(91, 33, 182, 0.25);
  transition: transform 0.15s, background 0.15s;
}

.cart-btn:hover {
  background: var(--purple-800);
}

.cart-btn:active {
  transform: scale(0.97);
}

.cart-btn svg {
  width: 19px;
  height: 19px;
}

.cart-btn__count {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--yellow);
  color: #3b2a00;
  font-size: 11.5px;
  font-weight: 800;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  margin-top: 14px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 92% 6%, rgba(250, 204, 21, 0.18), transparent 52%),
    radial-gradient(90% 90% at 0% 100%, rgba(124, 58, 237, 0.5), transparent 62%),
    linear-gradient(135deg, var(--purple-800), var(--purple-950));
  color: #fff;
  min-height: 190px;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}

.hero__media {
  display: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 22px;
  max-width: 560px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.pill .dot {
  box-shadow: none;
}

.hero h1 {
  margin-top: 12px;
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.8px;
  font-weight: 800;
  text-wrap: balance;
}

.hero p {
  margin-top: 8px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.82);
  max-width: 460px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Toolbar ---------- */

.toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: linear-gradient(var(--bg) 82%, rgba(251, 248, 255, 0));
  padding: 12px 0 10px;
  margin-top: 4px;
}

.toolbar__inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
}

.search svg {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 46px;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 0 14px 0 42px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}

.search input:focus {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.14);
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  /* Espaço para a sombra do chip ativo não ser cortada pelo scroll horizontal. */
  padding: 6px 10px 16px;
  margin: -6px -10px -16px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: 0.15s;
}

.chip:hover {
  border-color: var(--purple-300, #c4b5fd);
}

.chip.active {
  background: var(--purple-700);
  border-color: var(--purple-700);
  color: #fff;
  box-shadow: 0 3px 8px rgba(91, 33, 182, 0.24);
}

/* ---------- Menu ---------- */

.section {
  margin-top: 22px;
}

.section__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.section__head h2 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.section__head span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.card:hover,
.card:focus-visible {
  border-color: #d8c9f0;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  outline: none;
}

.card__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.card__emoji {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 19px;
  background: var(--purple-50);
  border: 1px solid #efe7fd;
}

.card__name {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.1px;
}

.card__desc {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 2px;
}

.price {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--purple-800);
}

.add {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 0;
  background: var(--purple-700);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  transition: background 0.15s, transform 0.15s;
}

.add:hover {
  background: var(--purple-800);
}

.add:active {
  transform: scale(0.94);
}

.add svg {
  width: 17px;
  height: 17px;
}

.empty {
  text-align: center;
  padding: 46px 10px;
  color: var(--muted);
  font-size: 14px;
}

.empty strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  margin-bottom: 4px;
}

.loading {
  text-align: center;
  padding: 50px 0;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Cart bar ---------- */

.cartbar {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translate(-50%, 140%);
  width: calc(100% - 24px);
  max-width: 520px;
  z-index: 60;
  border: 0;
  background: var(--purple-700);
  color: #fff;
  border-radius: 16px;
  height: 58px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 16px 34px rgba(42, 7, 69, 0.32);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s;
  opacity: 0;
  pointer-events: none;
}

.cartbar.show {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.cartbar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 700;
}

.cartbar__count {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 800;
}

.cartbar__total {
  font-size: 15px;
  font-weight: 800;
}

.cartbar__go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

/* ---------- Overlay / panels ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(28, 7, 46, 0.52);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: fixed;
  z-index: 90;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 24px 24px 0 0;
  max-height: 91dvh;
  display: flex;
  flex-direction: column;
  transform: translateY(102%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s;
  box-shadow: var(--shadow-lg);
  visibility: hidden;
}

.sheet.show {
  transform: translateY(0);
  visibility: visible;
}

.sheet__content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 91dvh;
}

.sheet__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.sheet__head h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.sheet__head p {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted);
}

.sheet__body {
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  -webkit-overflow-scrolling: touch;
}

.sheet__foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fff;
}

.sheet__foot .btn {
  flex: 1;
}

.icon-btn {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: background 0.15s;
}

.icon-btn:hover {
  background: var(--purple-50);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ---------- Product sheet ---------- */

.group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.group__head h3 {
  font-size: 14px;
  font-weight: 800;
}

.group__hint {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 8px;
}

.group__count {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--purple-50);
  color: var(--purple-700);
  border: 1px solid #e6dbfa;
}

.group__count.full {
  background: var(--yellow-soft);
  color: #7c5a00;
  border-color: #fde68a;
}

.opts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 6px 8px 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  user-select: none;
  transition: 0.15s;
}

.opt:hover {
  border-color: #d8c9f0;
}

.opt.is-selected {
  border-color: var(--purple-500);
  background: var(--purple-50);
  color: var(--purple-900);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.opt__label {
  min-width: 0;
  line-height: 1.25;
}

.opt__label small {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.opt.is-selected .opt__label small {
  color: var(--purple-700);
}

.opt__stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}

.opt__btn {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--purple-700);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.15s;
}

.opt__btn:hover {
  border-color: var(--purple-500);
  background: var(--purple-50);
}

.opt__btn--add {
  background: var(--purple-600);
  border-color: var(--purple-600);
  color: #fff;
}

.opt__btn--add:hover {
  background: var(--purple-700);
  border-color: var(--purple-700);
}

.opt__qty {
  display: none;
  min-width: 16px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 800;
}

.opt__dec {
  display: none;
}

.opt.is-selected .opt__qty {
  display: inline-block;
}

.opt.is-selected .opt__dec {
  display: grid;
}

@media (max-width: 540px) {
  .opts {
    grid-template-columns: 1fr;
  }
}

.note-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.note-field label {
  font-size: 13px;
  font-weight: 700;
}

.note-field textarea {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  resize: none;
  min-height: 66px;
  font-size: 13.5px;
  outline: none;
}

.note-field textarea:focus {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  height: 48px;
  overflow: hidden;
  flex: none;
}

.qty button {
  width: 40px;
  height: 100%;
  border: 0;
  background: #fff;
  font-size: 19px;
  font-weight: 600;
  color: var(--purple-700);
  line-height: 1;
}

.qty button:hover {
  background: var(--purple-50);
}

.qty span {
  min-width: 26px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
}

/* ---------- Drawer ---------- */

.drawer {
  position: fixed;
  z-index: 90;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(430px, 100%);
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: var(--shadow-lg);
  visibility: hidden;
}

.drawer.show {
  transform: none;
  visibility: visible;
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.drawer__head h2 {
  font-size: 17px;
  font-weight: 800;
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px;
}

.drawer__empty {
  text-align: center;
  padding: 50px 10px;
  color: var(--muted);
  font-size: 14px;
}

.drawer__foot {
  border-top: 1px solid var(--line);
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ci {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.ci:last-child {
  border-bottom: 0;
}

.ci__main {
  flex: 1;
  min-width: 0;
}

.ci__title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
}

.ci__title span {
  color: var(--purple-700);
}

.ci__opts {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.ci__note {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
  font-style: italic;
}

.ci__side {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.ci__price {
  font-size: 13px;
  font-weight: 800;
  color: var(--purple-800);
  white-space: nowrap;
}

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  height: 30px;
  overflow: hidden;
}

.stepper button {
  width: 29px;
  height: 100%;
  border: 0;
  background: #fff;
  color: var(--purple-700);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.stepper button:hover {
  background: var(--purple-50);
}

.stepper span {
  min-width: 22px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.ci__remove {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-decoration: underline;
  padding: 0;
}

.ci__remove:hover {
  color: var(--red);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 20px;
  border-radius: 14px;
  border: 0;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.1px;
  transition: 0.15s;
  text-align: center;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn--primary {
  background: var(--purple-700);
  color: #fff;
  box-shadow: 0 10px 24px rgba(91, 33, 182, 0.28);
}

.btn--primary:hover {
  background: var(--purple-800);
}

.btn--primary:disabled {
  background: #e6ddf5;
  color: #6f6180;
  box-shadow: none;
  cursor: not-allowed;
}

.btn--whats {
  background: #25d366;
  color: #063b1c;
}

.btn--whats:hover {
  background: #1fbe5b;
}

.btn--ghost {
  background: #fff;
  border: 1.5px solid var(--line);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--purple-50);
}

.btn--block {
  width: 100%;
}

/* ---------- Checkout ---------- */

.checkout {
  padding-top: 14px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  color: var(--purple-700);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 0;
  margin-bottom: 6px;
}

.checkout h1 {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.checkout__sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  max-width: 520px;
}

.checkout__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 16px;
  align-items: start;
}

.panel-card {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

.notice {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--yellow-soft);
  border: 1px solid #fde68a;
  color: #6b4e00;
  font-size: 12.5px;
  font-weight: 600;
}

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--purple-50);
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 16px;
}

.seg button {
  border: 0;
  background: transparent;
  height: 42px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  transition: 0.15s;
}

.seg button.active {
  background: #fff;
  color: var(--purple-800);
  box-shadow: var(--shadow-sm);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 13px;
}

.field:last-child {
  margin-bottom: 0;
}

.field > label,
.field > .label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.field > label span,
.field > .label span {
  color: var(--red);
}

.input {
  width: 100%;
  height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0 13px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}

textarea.input {
  height: auto;
  min-height: 72px;
  padding: 11px 13px;
  resize: vertical;
}

select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236f6180' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 38px;
}

.input:focus {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.input.invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.field .error-msg {
  font-size: 11.5px;
  color: var(--red);
  font-weight: 600;
}

.field .hint {
  font-size: 11.5px;
  color: var(--muted);
}

.row {
  display: flex;
  gap: 10px;
}

.row .field {
  flex: 1;
}

.row .field--num {
  flex: 0 0 104px;
}

.pay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pay {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s;
}

.pay input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pay__mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #cfc2e3;
  flex: none;
  display: grid;
  place-items: center;
}

.pay__mark::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  transform: scale(0);
  transition: transform 0.15s;
}

.pay:has(input:checked),
.pay.is-checked {
  border-color: var(--purple-500);
  background: var(--purple-50);
}

.pay:has(input:checked) .pay__mark,
.pay.is-checked .pay__mark {
  border-color: var(--purple-700);
  background: var(--purple-700);
}

.pay:has(input:checked) .pay__mark::after,
.pay.is-checked .pay__mark::after {
  transform: scale(1);
}

.form-errors {
  display: none;
  margin-bottom: 14px;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--red-soft);
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 12.5px;
  font-weight: 600;
}

.form-errors.show {
  display: block;
}

.form-errors ul {
  margin: 0;
  padding-left: 18px;
}

/* ---------- Summary ---------- */

.summary h2 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 10px;
}

.summary__items {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 12px;
}

.summary__item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
}

.summary__item span:first-child {
  color: var(--muted);
}

.summary__item strong {
  font-weight: 700;
  white-space: nowrap;
}

.totals {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.totals > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.totals > div span:last-child {
  font-weight: 700;
  color: var(--ink);
}

.totals__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 9px;
  margin-top: 3px;
  border-top: 1px solid var(--line);
  font-size: 16px !important;
  color: var(--ink) !important;
  font-weight: 800;
}

.totals__total span:last-child {
  color: var(--purple-800) !important;
  font-size: 18px;
  font-weight: 800;
}

.summary__hint {
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--muted);
}

.summary .btn {
  margin-top: 14px;
}

.summary__note {
  margin-top: 9px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

/* ---------- Success ---------- */

.success {
  padding-top: 34px;
  max-width: 560px;
}

.success__card {
  text-align: center;
  padding: 30px 20px;
}

.success__icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
  font-size: 30px;
  font-weight: 800;
}

.success h1 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.success p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.success__code {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--purple-50);
  border: 1px solid #e6dbfa;
  font-size: 13px;
  color: var(--purple-800);
}

.success__code strong {
  font-size: 15px;
  letter-spacing: 1px;
}

.success__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  z-index: 120;
  background: #2a0745;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 11px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: 0.22s;
  max-width: calc(100% - 32px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 38px;
  padding: 20px 0 6px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
}

.site-footer strong {
  color: var(--ink);
}

.footer__kind {
  display: inline-block;
  margin: 7px 0 5px;
  color: var(--purple-700);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.55;
}

/* ---------- Order page ---------- */

.order-page {
  padding-top: 18px;
  max-width: 700px;
}

.order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.order-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.order-brand strong {
  font-size: 15px;
  font-weight: 800;
  display: block;
  line-height: 1.2;
}

.order-brand span {
  font-size: 11.5px;
  color: var(--muted);
}

.order-card {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 12px;
}

.order-card h2 {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
}

.order-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.order-code {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.order-code strong {
  display: block;
  font-size: 23px;
  letter-spacing: 1.5px;
  color: var(--purple-800);
  line-height: 1.15;
}

.order-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--yellow-soft);
  border: 1px solid #fde68a;
  color: #6b4e00;
  font-size: 11px;
  font-weight: 700;
}

.order-date {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.order-item {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.order-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.order-item__qty {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--purple-50);
  color: var(--purple-800);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

.order-item__main {
  flex: 1;
  min-width: 0;
}

.order-item__name {
  font-size: 13.5px;
  font-weight: 700;
}

.order-item__opts {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.order-item__note {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
  font-style: italic;
}

.order-item__price {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.order-totals {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.order-info {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.order-info__row {
  display: flex;
  gap: 8px;
  font-size: 13px;
}

.order-info__row dt {
  flex: 0 0 88px;
  color: var(--muted);
  font-size: 12px;
}

.order-info__row dd {
  margin: 0;
  font-weight: 600;
  word-break: break-word;
}

.order-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.order-note {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 14px;
}

.order-invalid {
  text-align: center;
  padding: 50px 20px;
}

.order-invalid h1 {
  font-size: 20px;
  font-weight: 800;
}

.order-invalid p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- Responsive ---------- */

@media (min-width: 560px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }

  .success__actions {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  .success__actions .btn {
    flex: 0 1 auto;
  }
}

@media (min-width: 720px) {
  :root {
    --header-h: 70px;
  }

  .brand__logo {
    width: 46px;
    height: 46px;
  }

  .brand__text strong {
    font-size: 16.5px;
  }

  .hero {
    min-height: 230px;
  }

  .hero__content {
    padding: 30px;
    max-width: 58%;
  }

  .hero__media {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 52%;
    z-index: 0;
    background-image: url("../assets/hero.webp");
    background-size: cover;
    background-position: 42% 50%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 22%);
  }

  .hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      90deg,
      var(--purple-950) 0%,
      rgba(42, 7, 69, 0.72) 22%,
      rgba(42, 7, 69, 0.15) 55%,
      rgba(42, 7, 69, 0) 100%
    );
  }

  .toolbar__inner {
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }

  .search {
    flex: 0 0 280px;
  }

  .chips {
    flex: 1;
  }

  .sheet {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    width: min(580px, 92vw);
    max-height: 86vh;
    border-radius: 22px;
    transform: translate(-50%, -46%) scale(0.98);
    opacity: 0;
    visibility: hidden;
  }

  .sheet.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
  }

  .sheet__content {
    max-height: 86vh;
  }

  .grid {
    gap: 12px;
  }
}

@media (min-width: 900px) {
  body {
    padding-bottom: 40px;
  }

  .checkout__grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
  }

  .summary {
    position: sticky;
    top: calc(var(--header-h) + 16px);
  }
}

@media (min-width: 1040px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Print ---------- */

@media print {
  body {
    background: #fff;
    padding: 0;
  }

  .topbar,
  .order-actions,
  .order-note,
  .site-footer,
  .order-status {
    display: none !important;
  }

  .wrap {
    max-width: none;
    padding: 0;
  }

  .order-card {
    border: 0;
    border-bottom: 1px solid #ddd;
    border-radius: 0;
    padding: 12px 0;
    margin: 0;
  }

  .order-page {
    padding: 0;
  }
}
