:root {
  --bg: #f8f9ff;
  --ink: #0f1c2d;
  --muted: #687386;
  --brand: #823daa;
  --brand-dark: #4a007a;
  --brand-container: #6a00ab;
  --brand-soft: #efe4f7;
  --accent: #d49cff;
  --line: #dce3f0;
  --surface: #ffffff;
  --surface-alt: #f2f5fc;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body,
.page,
.page__background {
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

.toolbar,
.toolbar__center,
.toolbar__left,
.toolbar__right {
  background: var(--brand-dark);
  color: #fff;
}

.toolbar-button,
.back-button,
.back-button__icon {
  color: #ffffff !important;
  fill: #ffffff !important;
}

.page-content,
.cart-page,
.checkout-page,
.order-page,
.profile-page {
  padding: 14px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.store-hero {
  min-height: 172px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(100deg, rgba(74, 0, 122, 0.94), rgba(106, 0, 171, 0.5)),
    linear-gradient(135deg, #4b1f11 0%, #b6491d 55%, #f2a65a 100%);
}

.store-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(212, 156, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.store-hero h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
}

.store-hero p {
  max-width: 250px;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.35;
}

.toolbar__right {
  display: flex;
  align-items: center;
}

.toolbar-cart {
  position: relative;
}

.toolbar-cart-count {
  position: absolute;
  top: 5px;
  right: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid var(--brand-dark);
  border-radius: 999px;
  background: #ffffff;
  color: var(--brand-dark);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.search-row {
  margin: 14px 0 12px;
}

.search-box {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px -20px rgba(15, 28, 45, 0.55);
}

.search-box input,
.input-full,
.text-area {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 12px;
  white-space: nowrap;
  font-weight: 700;
}

.category-button.is-active {
  background: var(--brand-container);
  border-color: var(--brand-container);
  color: #fff;
}

.product-list {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.product-card,
.cart-item,
.option-group,
.checkout-user,
.tracking-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px -24px rgba(15, 28, 45, 0.65);
}

.product-card {
  min-height: 118px;
  display: grid;
  grid-template-columns: 1fr 104px;
  gap: 12px;
  padding: 10px;
  text-align: left;
  width: 100%;
}

.product-card h2 {
  margin: 0 0 5px;
  font-size: 17px;
}

.product-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.product-price {
  color: var(--brand);
  font-weight: 850;
}

.product-card img {
  width: 104px;
  height: 96px;
  object-fit: cover;
  border-radius: 7px;
}

.product-detail img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.product-detail-body {
  padding: 14px;
}

.product-detail h1 {
  margin: 0 0 6px;
  font-size: 25px;
}

.product-detail p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.4;
}

.option-group {
  padding: 12px;
  margin: 12px 0;
}

.option-group h3 {
  display: flex;
  justify-content: space-between;
  margin: 0 0 10px;
  font-size: 15px;
}

.option-row {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 8px 0;
}

.option-row:first-of-type {
  border-top: 0;
}

.qty-row {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}

.qty-row button,
.cart-item button {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
}

.qty-row span {
  text-align: center;
  font-weight: 800;
}

.field-label {
  display: block;
  margin: 14px 0 6px;
  color: var(--muted);
  font-weight: 700;
}

.text-area,
.input-full {
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  margin-bottom: 10px;
}

.cart-item h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.cart-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  font-size: 18px;
}

.cart-summary strong {
  color: var(--brand-dark);
}

.checkout-page section {
  margin-bottom: 16px;
}

.checkout-page h2 {
  margin: 0 0 10px;
  font-size: 17px;
}

.payment-options {
  display: grid;
  gap: 8px;
}

.payment-help {
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.45;
  margin: 10px 0 0;
}

.pix-customer-fields {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.payment-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.payment-notice ons-icon {
  flex: 0 0 auto;
  margin-top: 2px;
  font-size: 20px;
}

.payment-notice p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.pix-customer-fields {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.payment-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.payment-notice ons-icon {
  flex: 0 0 auto;
  margin-top: 2px;
  font-size: 20px;
}

.payment-notice p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.payment-options label {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-weight: 700;
}

.payment-options input {
  accent-color: var(--brand-container);
}

.card-fields {
  display: grid;
  gap: 10px;
}

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

.is-hidden {
  display: none;
}

.tracking-box {
  padding: 14px;
}

.tracking-steps {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.tracking-step {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.tracking-step::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--line);
}

.tracking-step.is-active {
  color: var(--brand-dark);
  font-weight: 800;
}

.tracking-step.is-active::before {
  background: var(--brand);
}

.pix-payment {
  display: grid;
  justify-items: stretch;
  gap: 10px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-alt);
}

.pix-payment h2,
.pix-payment p,
.pix-payment .field-label {
  margin: 0;
}

.pix-payment p,
.pix-payment small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.pix-qr-code {
  width: min(230px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  object-fit: contain;
  border: 10px solid #ffffff;
  border-radius: 12px;
}

.pix-copy-code {
  min-height: 92px;
  overflow-wrap: anywhere;
  font-family: Consolas, monospace;
  font-size: 11px;
}

.pix-payment {
  display: grid;
  justify-items: stretch;
  gap: 10px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-alt);
}

.pix-payment h2,
.pix-payment p,
.pix-payment .field-label {
  margin: 0;
}

.pix-payment p,
.pix-payment small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.pix-qr-code {
  width: min(230px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  object-fit: contain;
  border: 10px solid #ffffff;
  border-radius: 12px;
}

.pix-copy-code {
  min-height: 92px;
  overflow-wrap: anywhere;
  font-family: Consolas, monospace;
  font-size: 11px;
}

.empty-state {
  padding: 30px 14px;
  text-align: center;
  color: var(--muted);
}

ons-button,
.button--material {
  --background-color: var(--brand-container);
  --material-background-color: var(--brand-container);
  background: var(--brand-container) !important;
  color: #ffffff !important;
  border-radius: 8px;
  box-shadow: 0 8px 18px -12px rgba(74, 0, 122, 0.75);
}

.profile-page {
  min-height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.profile-card {
  width: 100%;
  max-width: 460px;
  padding: 24px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 24px 60px -42px rgba(15, 28, 45, 0.75);
}

.profile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 26px;
}

.profile-eyebrow {
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-card h1 {
  margin: 7px 0 8px;
  color: var(--brand-dark);
  font-size: 24px;
  line-height: 1.2;
}

.profile-card > p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.profile-card .payment-notice {
  margin: 14px 0 6px;
}

.profile-card .input-full:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(130, 61, 170, 0.12);
}

.profile-privacy {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.amh-alert-popup {
  width: min(360px, calc(100vw - 42px)) !important;
  padding: 22px !important;
  border-radius: 22px !important;
  background: #ffffff !important;
  box-shadow: 0 22px 50px -24px rgba(15, 28, 45, 0.7) !important;
  font-family: "Segoe UI", Arial, sans-serif !important;
}

.amh-alert-title {
  padding: 0 !important;
  color: var(--ink) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 26px !important;
}

.amh-alert-text {
  margin: 12px 0 0 !important;
  padding: 0 !important;
  color: var(--muted) !important;
  font-size: 14px !important;
  line-height: 20px !important;
}

.amh-alert-confirm {
  min-width: 108px;
  min-height: 42px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--brand-container);
  color: #ffffff;
  font: 700 13px/1 "Sora", "Segoe UI", Arial, sans-serif;
  box-shadow: 0 10px 20px -14px rgba(74, 0, 122, 0.8);
}

.amh-alert-confirm:focus-visible {
  outline: 3px solid rgba(130, 61, 170, 0.24);
  outline-offset: 2px;
}

.amh-toast-popup {
  border-radius: 14px !important;
  background: var(--ink) !important;
  color: #ffffff !important;
  font-family: "Segoe UI", Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  box-shadow: 0 14px 30px -18px rgba(15, 28, 45, 0.7) !important;
}

.amh-toast-popup .swal2-icon,
.amh-alert-popup .swal2-icon {
  margin-top: 0.4em;
}

@media (min-width: 720px) {
  .page-content,
  .cart-page,
  .checkout-page,
  .order-page {
    max-width: 760px;
    margin: 0 auto;
  }

  .profile-page {
    max-width: 760px;
    margin: 0 auto;
  }

  .product-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-height: 820px) {
  .profile-page {
    align-items: center;
  }
}
