:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #2b1d17;
  background: #eadfce;
  --brand-ink: #2b1d17;
  --brand-ink-soft: #63493a;
  --brand-copper: #a95f2b;
  --brand-copper-dark: #6f351b;
  --brand-gold: #d8a85b;
  --brand-paper: #fbf5ea;
  --brand-paper-deep: #f3e4cf;
  --brand-line: #e5d1b4;
  --brand-red: #a33a22;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 18px 10px;
  background:
    linear-gradient(180deg, #d9c7ae 0%, #f4eadc 42%, #e6d4bb 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.48;
}

.phone-shell {
  width: min(430px, 100%);
  min-height: calc(100vh - 36px);
  padding: 12px;
  border: 1px solid rgba(111, 53, 27, 0.12);
  border-radius: 32px;
  background: var(--brand-paper);
  box-shadow: 0 28px 70px rgba(63, 35, 20, 0.24);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 292px;
  padding: 26px 24px 72px;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(169, 95, 43, 0.96) 0%, rgba(94, 43, 24, 0.98) 48%, #211614 100%);
  color: #fffaf2;
}

.hero.has-image {
  background:
    linear-gradient(90deg, rgba(43, 29, 23, 0.78), rgba(111, 53, 27, 0.36)),
    var(--hero-image) center / cover no-repeat;
}

.hero-top,
.hero-foot,
.card-title,
.section-head,
.product-meta,
.product-action {
  display: flex;
  align-items: center;
}

.hero-top,
.card-title,
.section-head,
.product-action {
  gap: 12px;
  justify-content: space-between;
}

.brand-lockup {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-calligraphy {
  display: block;
  width: 238px;
  max-width: 62vw;
  height: auto;
  filter: drop-shadow(0 6px 12px rgba(20, 12, 8, 0.35));
}

.badge,
.micro-status {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge {
  background: rgba(255, 242, 202, 0.17);
  color: #fff4d6;
}

.micro-status {
  background: #f8ead2;
  color: var(--brand-copper-dark);
}

.eyebrow {
  margin: 0 0 8px;
  color: currentColor;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  opacity: 0.76;
}

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

h1 {
  max-width: 280px;
  margin-top: 48px;
  font-size: 38px;
  line-height: 1.16;
  font-weight: 900;
}

h1 span {
  display: block;
  white-space: nowrap;
}

.hero-copy {
  max-width: 300px;
  margin-top: 14px;
  color: #fff1cf;
  font-size: 15px;
  line-height: 1.65;
}

.hero-foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 28px;
}

.hero-foot span {
  display: block;
  padding: 7px 10px;
  border: 1px solid rgba(255, 242, 202, 0.22);
  border-radius: 999px;
  color: #fbe8bd;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.redemption-card,
.entitlement-card,
.product-card {
  border: 1px solid var(--brand-line);
  background: #fffaf2;
  box-shadow: 0 14px 30px rgba(111, 53, 27, 0.08);
}

.redemption-card {
  position: relative;
  z-index: 2;
  margin: -46px 10px 0;
  padding: 18px;
  border-radius: 22px;
}

.card-title {
  gap: 14px;
  margin-bottom: 16px;
}

.card-title h2,
.section-head h2,
.entitlement-card h2 {
  color: var(--brand-ink);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 900;
}

.card-bind {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input {
  min-width: 0;
  height: 48px;
  border: 1px solid #d8bc96;
  border-radius: 14px;
  padding: 0 14px;
  background: #fff;
  color: var(--brand-ink);
  text-transform: uppercase;
}

input:focus {
  outline: 2px solid rgba(216, 168, 91, 0.32);
  border-color: var(--brand-gold);
}

.primary,
.secondary {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  font-weight: 900;
}

.primary {
  width: 100%;
  background: linear-gradient(135deg, var(--brand-copper), var(--brand-copper-dark));
  color: #fff;
  box-shadow: 0 10px 22px rgba(111, 53, 27, 0.22);
}

.secondary {
  background: #2b1d17;
  color: #fff4d6;
}

.trust-copy,
.panel-copy,
.muted {
  color: var(--brand-ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.trust-copy {
  margin-top: 12px;
}

.entitlement-card {
  display: grid;
  gap: 14px;
  margin: 14px 10px 0;
  padding: 18px;
  border-radius: 22px;
}

.success-card {
  background: linear-gradient(180deg, #fffaf2, #f7ead7);
}

.entitlement-main .eyebrow,
.card-title .eyebrow,
.section-head .eyebrow {
  color: var(--brand-copper-dark);
}

.entitlement-value {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}

.entitlement-value span {
  color: var(--brand-ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.entitlement-value strong {
  color: var(--brand-red);
  font-size: 30px;
  line-height: 1;
}

.catalog-section {
  margin: 24px 10px 0;
}

.section-head {
  gap: 12px;
  margin-bottom: 12px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--brand-copper-dark);
  font-weight: 900;
}

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

.product-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  box-shadow: none;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.product-card.is-selected {
  border-color: var(--brand-copper);
  box-shadow: 0 10px 22px rgba(111, 53, 27, 0.14);
  transform: translateY(-1px);
}

.product-card.is-confirmed {
  border-color: var(--brand-gold);
  background: linear-gradient(180deg, #fff8e8, #fbf0dd);
}

.media-button {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  background: var(--brand-paper-deep);
}

.compact-list .product-image {
  aspect-ratio: 1 / 1;
}

.product-body {
  display: flex;
  min-height: 148px;
  flex: 1;
  flex-direction: column;
  padding: 10px;
}

.product-title {
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-subtitle {
  margin-top: 5px;
  color: var(--brand-ink-soft);
  font-size: 11px;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-meta {
  gap: 6px;
  margin-top: 8px;
  color: var(--brand-ink-soft);
  font-size: 11px;
  flex-wrap: wrap;
}

.points-pill {
  padding: 3px 6px;
  border-radius: 999px;
  background: #f7ead7;
  color: var(--brand-copper-dark);
  font-weight: 900;
}

.price {
  color: var(--brand-red);
  font-size: 20px;
  font-weight: 900;
}

.product-action {
  margin-top: auto;
  padding-top: 10px;
}

.product-action .primary {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border-radius: 10px;
  padding: 0 8px;
  box-shadow: none;
  font-size: 12px;
}

.selection-dock {
  position: sticky;
  bottom: 10px;
  z-index: 8;
  display: grid;
  gap: 12px;
  margin: 18px 10px 0;
  padding: 14px;
  border: 1px solid rgba(111, 53, 27, 0.18);
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.96);
  box-shadow: 0 18px 40px rgba(63, 35, 20, 0.2);
  backdrop-filter: blur(10px);
}

.selection-copy h3 {
  color: var(--brand-ink);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 900;
}

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

.selection-dock.is-confirmed .selection-actions,
.selection-dock.is-pending .selection-actions {
  grid-template-columns: 1fr;
}

.selection-actions .primary,
.selection-actions .secondary {
  width: 100%;
}

.selection-actions .primary:only-child,
.selection-actions .secondary:only-child {
  grid-column: 1 / -1;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: end center;
  padding: 18px 12px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(43, 29, 23, 0.48);
}

.modal-sheet {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  overflow: hidden;
  border: 1px solid var(--brand-line);
  border-radius: 24px;
  background: #fffaf2;
  box-shadow: 0 28px 70px rgba(20, 12, 8, 0.35);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(43, 29, 23, 0.72);
  color: #fffaf2;
  font-size: 24px;
  line-height: 1;
}

.modal-media {
  max-height: 68vh;
  overflow-y: auto;
  background: var(--brand-paper-deep);
}

.detail-gallery {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.detail-image,
.detail-video {
  display: block;
  width: 100%;
  border-radius: 14px;
  object-fit: contain;
  background: #fffaf2;
}

.detail-video {
  aspect-ratio: 16 / 9;
  background: #201511;
}

.modal-content {
  padding: 18px;
}

.detail-meta {
  margin-top: 12px;
  color: var(--brand-copper-dark);
  font-size: 13px;
  font-weight: 900;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  width: min(360px, calc(100% - 32px));
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--brand-ink);
  color: #fff;
  text-align: center;
  box-shadow: 0 16px 36px rgba(63, 35, 20, 0.28);
  font-size: 14px;
}

@media (max-width: 390px) {
  .hero {
    min-height: 270px;
    padding: 22px 20px 66px;
  }

  h1 {
    margin-top: 42px;
    font-size: 34px;
  }

  .brand-calligraphy {
    width: 214px;
  }

  .card-bind {
    grid-template-columns: 1fr;
  }
}
