:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --panel: #ffffff;
  --panel-muted: #eef0f3;
  --line: #d9dde3;
  --text: #202328;
  --muted: #68707c;
  --dark: #2f343b;
  --accent: #2cd5c4;
  --accent-dark: #1ea99c;
  --accent-soft: #d7faf6;
  --disabled: #a6adb7;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input,
a {
  font: inherit;
}

.shell {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 18px 14px 36px;
}

.brand-header {
  display: flex;
  justify-content: center;
  padding: 10px 0 18px;
}

.brand-logo {
  width: min(420px, 92vw);
  height: auto;
  object-fit: contain;
}

.lookup-panel,
.consent-section,
.rewards-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(31, 37, 45, 0.08);
}

.lookup-panel,
.consent-section {
  padding: 18px;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 7vw, 2.35rem);
  line-height: 1.05;
}

.lookup-form label,
.search-field span {
  display: block;
  margin-bottom: 8px;
  color: var(--dark);
  font-size: 0.92rem;
  font-weight: 800;
}

.phone-row {
  display: grid;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfc;
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 127, 115, 0.18);
}

button,
.redeem-button {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

#submit-button,
.redeem-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #ffffff;
  padding: 0 18px;
  text-decoration: none;
}

#submit-button:hover,
.redeem-button:hover {
  background: var(--accent-dark);
}

#submit-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.result {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 8px;
  background: var(--panel-muted);
  text-align: center;
}

.result strong {
  font-size: clamp(2rem, 12vw, 3rem);
  line-height: 1;
}

.result-label,
.message,
.product-detail,
.missing-points,
.active-filter {
  color: var(--muted);
}

.message {
  min-height: 22px;
  margin: 10px 0 0;
  font-size: 0.92rem;
}

.message.is-error {
  color: #a43d3d;
  font-weight: 750;
}

.message.is-success {
  color: var(--accent-dark);
  font-weight: 850;
}

.consent-section {
  margin-top: 14px;
}

.consent-intro {
  color: var(--dark);
  line-height: 1.5;
}

.legal-documents {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.legal-document {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfc;
  overflow: hidden;
}

.legal-document summary {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 900;
}

.legal-document summary small {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 800;
}

.legal-document pre {
  max-height: 260px;
  margin: 0;
  overflow: auto;
  border-top: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 12px;
  white-space: pre-wrap;
}

.consent-form {
  display: grid;
  gap: 10px;
}

.contact-grid {
  display: grid;
  gap: 10px;
}

.contact-grid label {
  color: var(--dark);
  font-size: 0.92rem;
  font-weight: 800;
}

.contact-grid input {
  margin-top: 8px;
}

.checkbox-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  color: var(--dark);
  font-size: 0.94rem;
  line-height: 1.35;
}

.checkbox-row.optional {
  background: var(--panel-muted);
}

.checkbox-row input {
  width: 20px;
  min-height: 20px;
  margin: 0;
  accent-color: var(--accent);
}

#accept-button {
  background: var(--accent);
  color: #ffffff;
  padding: 0 18px;
}

#accept-button:hover:not(:disabled) {
  background: var(--accent-dark);
}

#accept-button:disabled {
  cursor: not-allowed;
  background: var(--disabled);
}

.rewards-section {
  margin-top: 14px;
  padding: 14px;
}

.rewards-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.search-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.search-button {
  min-width: 86px;
  border: 1px solid var(--line);
  background: var(--panel-muted);
  color: var(--dark);
  padding: 0 15px;
}

.search-button:hover {
  background: #e1e4e9;
}

.filter-menu {
  position: relative;
}

.filter-button {
  min-width: 94px;
  border: 1px solid var(--line);
  background: var(--dark);
  color: #ffffff;
  padding: 0 16px;
}

.filter-popover {
  position: absolute;
  z-index: 3;
  right: 0;
  top: calc(100% + 8px);
  width: min(76vw, 280px);
  max-height: 320px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(24, 28, 33, 0.18);
}

.filter-popover button {
  width: 100%;
  min-height: 42px;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  padding: 0 10px;
  text-align: left;
}

.filter-popover button:hover {
  background: var(--panel-muted);
}

.active-filter {
  margin: 10px 0 12px;
  font-size: 0.9rem;
  font-weight: 800;
}

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

.product-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 13px;
}

.product-card.is-inactive {
  background: #eceef1;
  filter: grayscale(1);
  opacity: 0.66;
}

.product-main,
.product-footer {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.product-main {
  align-items: flex-start;
}

.product-image {
  flex: 0 0 74px;
  width: 74px;
  height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f8;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.product-image.is-empty {
  display: grid;
  place-items: center;
  color: var(--accent-dark);
  font-weight: 900;
  background: var(--accent-soft);
}

.product-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.product-footer {
  align-items: center;
  margin-top: 12px;
  padding-left: 86px;
}

.product-category {
  margin-bottom: 5px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.product-card h2 {
  margin-bottom: 4px;
  font-size: 1.02rem;
  line-height: 1.25;
}

.product-detail {
  margin-bottom: 0;
  font-size: 0.88rem;
}

.status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.75rem;
  font-weight: 900;
}

.status.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.status.inactive {
  background: #d6d9de;
  color: #4d535c;
}

.redeem-button {
  min-height: 42px;
  min-width: 92px;
}

.empty-state {
  margin: 12px 0 0;
  text-align: center;
}

.is-hidden {
  display: none !important;
}

@media (min-width: 700px) {
  .shell {
    padding-top: 28px;
  }

  .lookup-panel,
  .consent-section,
  .rewards-section {
    padding: 22px;
  }

  .phone-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

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

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

  .product-footer {
    padding-left: 0;
  }
}
