:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #fff;
  --surface-soft: #f8fafc;
  --line: #d9e0ea;
  --line-strong: #b9c4d2;
  --text: #141924;
  --muted: #667085;
  --accent: #ff5a66;
  --accent-dark: #d83c4b;
  --accent-soft: #fff0f2;
  --green: #138a55;
  --green-soft: #eaf8f1;
  --shadow: 0 18px 50px rgba(20, 25, 36, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.account-nav,
.account-nav a,
.login-trigger,
.account-menu__item,
.category-chip,
.payment-method,
.product-card__button,
.login-submit {
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand__mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--text);
  color: white;
  font-weight: 800;
}

.brand__name {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.account-nav {
  position: relative;
  gap: 8px;
}

.account-nav a,
.login-trigger {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.account-nav__primary {
  background: var(--text);
  color: white !important;
}

.login-trigger--logged-in {
  background: var(--surface-soft);
  color: var(--text);
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 30;
  min-width: 132px;
  display: grid;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(20, 25, 36, 0.14);
}

.account-menu[hidden] {
  display: none;
}

.account-menu__item {
  min-height: 38px;
  justify-content: flex-start;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  text-align: start;
}

.account-menu__item:hover {
  background: var(--surface-soft);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  max-width: 100%;
  margin: 24px auto 48px;
}

.intro-panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: block;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 240, 242, 0.8), rgba(255, 255, 255, 0.3)), var(--surface);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(2.1rem, 6vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.intro-panel__copy {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.product-card__button,
.login-submit {
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 800;
}

.category-strip {
  max-width: 100%;
  display: flex;
  gap: 10px;
  margin: 18px 0;
  padding: 4px 0 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.category-chip {
  flex: 0 0 auto;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.category-chip--active {
  border-color: var(--text);
  background: var(--text);
  color: white;
}

.layout-grid {
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

.catalog {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.catalog-message {
  grid-column: 1 / -1;
  min-height: 86px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.catalog-message--error {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.product-section {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(20, 25, 36, 0.05);
  overflow: hidden;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.section-heading p {
  margin: 0 0 4px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0 0 6px;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  letter-spacing: 0;
}

.section-heading span {
  display: block;
  color: var(--muted);
  line-height: 1.5;
}

.section-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-dark);
  font-weight: 900;
}

.product-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.product-card {
  display: grid;
  gap: 14px;
  min-height: 178px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.product-card--selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.product-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.product-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.product-card__badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 900;
}

.product-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.product-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.product-card__price {
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 900;
}

.product-card__button {
  min-width: 104px;
  padding: 0 14px;
}

.checkout {
  min-width: 0;
  position: sticky;
  top: 94px;
}

.checkout__card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.checkout__close {
  display: none;
}

.checkout h2 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.25;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkout p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.checkout-product {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-soft);
}

.checkout-product__main {
  display: grid;
  gap: 10px;
}

.checkout-product__copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.selected-price {
  color: var(--text);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.08;
  text-align: start;
  white-space: nowrap;
}

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

.payment-method {
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 850;
}

.payment-method[data-platform='waffo_apple_pay'] {
  border-color: #111827;
  background: #111827;
  color: white;
}

.payment-method[data-platform='waffo_google_pay'] {
  border-color: #1a73e8;
  background: #1a73e8;
  color: white;
}

.payment-method[data-platform='waffo_card'] {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.payment-method__content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.payment-method__icon-wrap {
  flex: 0 0 auto;
  width: 30px;
  height: 22px;
  display: grid;
  place-items: center;
}

.payment-method__icon-wrap--dark {
  border-radius: 5px;
  background: var(--text);
}

.payment-method__icon {
  width: 22px;
  height: 16px;
  display: block;
  object-fit: contain;
}

.payment-method--active {
  border-color: currentcolor;
  color: white;
}

.payment-method:disabled {
  cursor: wait;
  opacity: 0.72;
}

.secure-note {
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.secure-note span {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
  font-weight: 900;
}

.secure-note p {
  margin: 0;
  font-size: 0.92rem;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  max-width: 100%;
  margin: 0 auto 34px;
  display: grid;
  gap: 16px;
  justify-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer a,
.site-footer__button,
.legal-link {
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  font-size: clamp(1rem, 3vw, 1.35rem);
  font-weight: 850;
}

.legal-link {
  font-size: inherit;
}

.copyright-box {
  width: min(760px, 100%);
  border: 2px solid var(--text);
  padding: 8px 14px;
  color: var(--muted);
  background: var(--surface);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.35;
}

.copyright-box strong {
  color: var(--text);
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 20px;
}

.login-modal--open {
  display: grid;
}

.login-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 25, 36, 0.62);
}

.login-modal__panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  display: grid;
  gap: 24px;
  padding: 36px 32px 30px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(20, 25, 36, 0.28);
}

.login-modal__close {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

.login-modal__brand {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  text-align: start;
}

.login-modal__brand strong,
.login-modal__brand div span {
  display: block;
}

.login-modal__brand strong {
  font-size: 1.7rem;
  line-height: 1;
}

.login-modal__brand div span {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.login-modal__terms {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.55;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-field {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

.login-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.login-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.4;
}

.login-submit {
  width: 100%;
}

.payment-modal {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: none;
  place-items: center;
  padding: 20px;
}

.payment-modal--open {
  display: grid;
}

.payment-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 25, 36, 0.62);
}

.payment-modal__panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  justify-items: center;
  padding: 34px 30px 30px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(20, 25, 36, 0.28);
  text-align: center;
}

.payment-modal__close {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

.payment-modal__icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 900;
}

.payment-modal__icon--pending::before {
  content: '';
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 82, 102, 0.24);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: payment-spin 0.8s linear infinite;
}

.payment-modal__icon--error {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.payment-modal__icon--error::before {
  content: '!';
}

.payment-modal__icon--success {
  background: rgba(16, 148, 78, 0.12);
  color: var(--green);
}

.payment-modal__icon--success::before {
  content: 'OK';
  font-size: 0.82rem;
}

.payment-modal__panel .eyebrow {
  margin: 0;
}

.payment-modal__panel h2 {
  margin: 0;
  font-size: 1.65rem;
  letter-spacing: 0;
}

.payment-modal__panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.payment-modal__summary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  text-align: start;
}

.payment-modal__summary span {
  min-width: 0;
  color: var(--muted);
  font-weight: 800;
}

.payment-modal__summary strong {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 1.15rem;
}

.payment-modal__action {
  width: 100%;
  margin-top: 2px;
}

.payment-modal__close[hidden],
.payment-modal__summary[hidden],
.payment-modal__action[hidden] {
  display: none;
}

@keyframes payment-spin {
  to {
    transform: rotate(360deg);
  }
}

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 20px;
}

.legal-modal--open {
  display: grid;
}

.legal-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 25, 36, 0.62);
}

.legal-modal__panel {
  position: relative;
  z-index: 1;
  width: min(840px, 100%);
  max-height: min(820px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(20, 25, 36, 0.28);
  overflow: hidden;
}

.legal-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.legal-modal__header h2 {
  margin: 0;
  font-size: 1.6rem;
}

.legal-modal__close {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

.legal-modal__body {
  overflow-y: auto;
  padding: 24px;
  color: var(--muted);
  line-height: 1.65;
}

.legal-modal__body h3 {
  margin: 24px 0 8px;
  color: var(--text);
  font-size: 1.05rem;
}

.legal-modal__body h3:first-child {
  margin-top: 0;
}

.legal-modal__body p,
.legal-modal__body li {
  font-size: 0.96rem;
}

.legal-modal__body ul {
  margin: 0;
  padding-inline-start: 20px;
}

.legal-company-box {
  margin-top: 24px;
  border: 2px solid var(--text);
  padding: 10px 14px;
  background: #f5fbff;
  color: #2c3b5d;
  font-weight: 850;
  line-height: 1.35;
}

.legal-company-box span {
  display: block;
}

.legal-company-box strong {
  color: #23365d;
}

.result-page {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  padding: 28px 16px 56px;
}

.result-panel {
  width: min(520px, 100%);
  display: grid;
  justify-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(28px, 5vw, 42px);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.result-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 1.7rem;
  font-weight: 900;
}

.result-panel--pending .result-icon::before {
  content: '';
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 82, 102, 0.24);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: payment-spin 0.8s linear infinite;
}

.result-panel--success .result-icon {
  background: var(--green-soft);
  color: var(--green);
}

.result-panel--failed .result-icon,
.result-panel--cancelled .result-icon {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.result-panel h1 {
  margin: 0;
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  line-height: 1.08;
}

.result-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.result-order {
  width: 100%;
  display: grid;
  gap: 6px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.result-order strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.result-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.result-action--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.result-action:disabled {
  cursor: wait;
  opacity: 0.72;
}

@media (width <= 980px) {
  .intro-panel,
  .layout-grid {
    grid-template-columns: 1fr;
  }

  .checkout {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: grid;
    place-items: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
  }

  .checkout::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(20, 25, 36, 0.46);
  }

  .checkout--active {
    opacity: 1;
    pointer-events: auto;
  }

  .checkout__card {
    width: min(405px, 100%);
    max-height: min(72vh, 560px);
    overflow-y: auto;
    transform: scale(0.96);
    transition: transform 180ms ease;
  }

  .checkout--active .checkout__card {
    transform: scale(1);
  }

  .checkout__close {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    cursor: pointer;
    font-size: 1.7rem;
    line-height: 1;
  }
}

@media (width <= 700px) {
  .topbar {
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 10px;
    padding-inline: 12px;
  }

  .topbar > .brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .account-nav {
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
    justify-content: flex-end;
    overflow: visible;
  }

  .account-nav a,
  .login-trigger {
    justify-content: center;
    min-width: 0;
    max-width: 128px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-shell {
    width: min(calc(100% - 24px), 1180px);
    margin-top: 14px;
  }

  .intro-panel {
    padding: 20px;
    overflow: hidden;
  }

  h1 {
    font-size: 2rem;
  }

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

  .product-grid {
    display: grid;
  }

  .product-card__bottom {
    display: grid;
    align-items: stretch;
  }

  .product-card__button {
    width: 100%;
  }

  .section-heading {
    align-items: flex-start;
  }

  .site-footer {
    width: min(100% - 24px, 1180px);
    flex-direction: column;
  }

  .login-modal__panel {
    padding: 34px 22px 26px;
  }

  .legal-modal {
    padding: 12px;
  }

  .legal-modal__header,
  .legal-modal__body {
    padding: 18px;
  }

  .legal-modal__header h2 {
    font-size: 1.35rem;
  }

  .copyright-box {
    font-size: 0.76rem;
  }
}
