:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #eef7f4;
  --ink: #111827;
  --muted: #667085;
  --line: #d8dee8;
  --primary: #0f766e;
  --primary-dark: #0b5f59;
  --accent: #f59e0b;
  --danger: #dc2626;
  --success: #15803d;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(216, 222, 232, 0.85);
  backdrop-filter: blur(16px);
}

.header-grid {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand small,
.product-meta,
.summary-note,
.cart-line span,
.result-details span {
  color: var(--muted);
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--accent);
}

.brand span:last-child {
  display: grid;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-weight: 700;
}

.nav-links a:hover,
.cart-link:hover {
  color: var(--primary);
}

.cart-link {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
}

.cart-link strong {
  min-width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 13px;
}

.hero-store {
  padding: 72px 0 56px;
  background: linear-gradient(180deg, #ffffff 0%, #eef7f4 100%);
}

.hero-grid,
.workflow-grid,
.trust-grid,
.checkout-grid {
  display: grid;
  gap: 28px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  align-items: center;
}

.hero-copy h1,
.page-heading h1 {
  margin: 10px 0 16px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.03;
  letter-spacing: 0;
}

.hero-copy p,
.page-heading p,
.section-heading p {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
}

.eyebrow {
  display: inline-flex;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

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

.btn-secondary,
.btn-ghost {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}

.btn-block {
  width: 100%;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-stat {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 160px;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.hero-stat strong {
  display: block;
  font-size: 36px;
  line-height: 1;
}

.hero-stat span {
  color: var(--muted);
  font-weight: 700;
}

.section {
  padding: 72px 0;
}

.muted {
  background: var(--surface-soft);
}

.section-heading {
  text-align: center;
  margin-bottom: 34px;
}

.section-heading.align-left {
  text-align: left;
  margin-bottom: 0;
}

.section-heading h2,
.trust-grid h2 {
  margin: 8px 0 10px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.product-card,
.checkout-card,
.trust-card,
.empty-cart,
.result-card,
.gateway-card {
  background: var(--surface);
  border: 1px solid rgba(216, 222, 232, 0.95);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.product-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-image {
  position: relative;
  background: #e5e7eb;
}

.product-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #2b1600;
  font-weight: 800;
  font-size: 12px;
}

.product-content {
  padding: 18px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.product-meta,
.price-row,
.summary-row,
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.product-meta {
  font-size: 13px;
  font-weight: 800;
}

.product-meta i {
  color: var(--accent);
}

.product-content h3 {
  margin: 12px 0 8px;
  font-size: 18px;
}

.product-content p {
  min-height: 68px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.price-row {
  margin-top: auto;
  margin-bottom: 16px;
}

.price-row div {
  display: grid;
}

.price-row small {
  color: var(--muted);
  text-decoration: line-through;
}

.price-row strong {
  font-size: 20px;
}

.stock {
  color: var(--success);
  font-size: 13px;
  font-weight: 800;
}

.alert {
  margin: 22px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-weight: 700;
}

.alert-success {
  color: #14532d;
  background: #dcfce7;
}

.alert-error {
  color: #7f1d1d;
  background: #fee2e2;
}

.workflow-grid {
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.step,
.trust-card {
  padding: 22px;
  border-radius: var(--radius);
  background: white;
  border: 1px solid var(--line);
}

.step i,
.trust-card i {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--primary);
}

.step strong,
.step span,
.trust-card strong,
.trust-card span {
  display: block;
}

.step span,
.trust-card span {
  color: var(--muted);
  margin-top: 6px;
}

.trust-grid {
  grid-template-columns: 1.25fr repeat(3, 1fr);
  align-items: stretch;
}

.site-footer {
  padding: 34px 0;
  background: var(--ink);
  color: white;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-grid p {
  color: #cbd5e1;
  margin: 6px 0 0;
}

.checkout-page {
  padding: 52px 0 78px;
}

.page-heading {
  margin-bottom: 26px;
}

.checkout-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.7fr);
  align-items: start;
}

.payment-form-card {
  grid-column: 1 / -1;
}

.checkout-card {
  padding: 24px;
}

.card-heading {
  margin-bottom: 18px;
}

.card-heading h2,
.order-summary h2 {
  margin: 0;
}

.card-heading span {
  color: var(--muted);
  font-weight: 700;
}

.cart-lines {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.cart-line {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 86px auto 44px;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.cart-line img {
  width: 78px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius);
}

.cart-line input,
.checkout-form input,
.checkout-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: white;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--danger);
  cursor: pointer;
}

.summary-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.summary-row.total {
  border-bottom: 0;
  font-size: 22px;
}

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

.checkout-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.span-2 {
  grid-column: 1 / -1;
}

.checkout-form .btn {
  margin-top: 18px;
}

.empty-cart {
  padding: 60px 24px;
  text-align: center;
}

.empty-cart i {
  font-size: 42px;
  color: var(--primary);
}

.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;
}

.gateway-page,
.result-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #ffffff, #eef7f4);
}

.gateway-card,
.result-card {
  width: min(620px, 100%);
  padding: 36px;
  text-align: center;
}

.spinner {
  width: 54px;
  height: 54px;
  margin: 0 auto 22px;
  border: 5px solid #d7ece7;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.result-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  border-radius: 50%;
  color: white;
  font-size: 30px;
}

.result-card.success .result-icon {
  background: var(--success);
}

.result-card.failed .result-icon {
  background: var(--danger);
}

.result-card h1,
.gateway-card h1 {
  margin: 8px 0 10px;
  font-size: 34px;
  line-height: 1.1;
}

.result-card p,
.gateway-card p {
  color: var(--muted);
}

.result-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 28px 0;
  text-align: left;
}

.result-details div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.result-details strong,
.result-details span {
  display: block;
  overflow-wrap: anywhere;
}

.result-actions {
  justify-content: center;
}

@media (max-width: 980px) {
  .hero-grid,
  .workflow-grid,
  .checkout-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .section-heading.align-left {
    text-align: center;
  }
}

@media (max-width: 720px) {
  .header-grid {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .hero-store,
  .section {
    padding: 48px 0;
  }

  .product-grid,
  .form-grid,
  .result-details {
    grid-template-columns: 1fr;
  }

  .cart-line {
    grid-template-columns: 64px 1fr;
  }

  .cart-line img {
    width: 64px;
    height: 58px;
  }

  .cart-line label,
  .cart-line > strong,
  .cart-line .icon-button {
    grid-column: 2;
  }

  .footer-grid,
  .hero-actions,
  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
