:root {
  --purple: #6e00a8;
  --purple-2: #52007f;
  --green: #36d72b;
  --green-2: #20a61b;
  --deep-green: #07532a;
  --accent: #d7ff4a;
  --ink: #151a17;
  --muted: #727a76;
  --line: #e8ece9;
  --surface: #ffffff;
  --soft: #f7f8f5;
  --shadow: 0 14px 35px rgba(78, 0, 120, .16);
}

* {
  box-sizing: border-box;
}

html {
  background: #eef2ee;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef2ee;
}

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

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

.app-shell {
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 96px;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .04);
}

.sticky-brand {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 58px;
  margin-bottom: -58px;
  gap: 9px;
  color: #fff;
  background: var(--purple);
  border-bottom: 1px solid rgba(232, 236, 233, 0);
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease, border-color .2s ease;
  backdrop-filter: blur(16px);
}

.sticky-brand.visible {
  border-bottom-color: rgba(255, 255, 255, .18);
  opacity: 1;
  transform: translateY(0);
}

.sticky-brand img {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  object-fit: cover;
}

.hero {
  min-height: 258px;
  padding: 36px 26px 28px;
  color: white;
  background:
    radial-gradient(circle at 84% 16%, rgba(54, 215, 43, .42), transparent 22%),
    linear-gradient(145deg, var(--purple), var(--purple-2) 58%, #1b8f24 100%);
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
}

.brand-mark {
  width: 96px;
  height: 96px;
  margin: 0 auto 20px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}

.eyebrow {
  max-width: 340px;
  margin: 0 0 10px;
  color: rgba(255, 255, 255, .76);
  font-size: 15px;
  line-height: 1.35;
}

.hero h1 {
  max-width: 370px;
  margin: 0;
  font-size: 40px;
  line-height: 1.14;
  font-weight: 650;
  letter-spacing: 0;
}

.customer-text {
  max-width: 360px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, .86);
  font-size: 16px;
  line-height: 1.42;
}

.content-section {
  padding: 24px 16px 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-title h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.section-title a {
  flex: 0 0 auto;
  color: var(--purple);
  font-size: 17px;
  font-weight: 520;
}

.store-strip,
.deal-grid,
.promo-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 17px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 2px 0 8px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  cursor: grab;
  touch-action: pan-x;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

.store-strip.dragging,
.deal-grid.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.store-strip::-webkit-scrollbar,
.deal-grid::-webkit-scrollbar,
.promo-strip::-webkit-scrollbar,
.banner-track::-webkit-scrollbar {
  display: none;
}

.store-card {
  display: grid;
  place-items: center;
  width: 88px;
  height: 78px;
  scroll-snap-align: start;
  flex: 0 0 auto;
}

.store-card img {
  width: 88px;
  height: 64px;
  object-fit: contain;
  pointer-events: none;
}

.info-carousel {
  position: relative;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.banner-track {
  display: flex;
  width: 100%;
  transition: transform .35s ease;
  will-change: transform;
}

.banner-card {
  flex: 0 0 100%;
  overflow: hidden;
  background: var(--soft);
}

.banner-card img {
  width: 100%;
  aspect-ratio: 2.05 / 1;
  object-fit: cover;
}

.carousel-button {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: white;
  background: rgba(110, 0, 168, .82);
  border: 0;
  border-radius: 999px;
  transform: translateY(-50%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}

.carousel-button.prev {
  left: 9px;
}

.carousel-button.next {
  right: 9px;
}

.carousel-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 22px;
  margin-top: 8px;
}

.carousel-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  background: #c7d0ca;
  border: 0;
  border-radius: 999px;
  transition: width .2s ease, background .2s ease;
}

.carousel-dots button.active {
  width: 20px;
  background: var(--purple);
}

.deals-section {
  padding-bottom: 12px;
}

.deal-grid {
  gap: 14px;
}

.deal-card {
  overflow: hidden;
  width: 156px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  scroll-snap-align: start;
}

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

.deal-copy {
  padding: 8px;
}

.deal-copy span,
.detail-label {
  color: var(--green-2);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.deal-copy strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.1;
}

.deal-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.promo-section {
  padding-top: 18px;
}

.promo-strip {
  gap: 14px;
}

.promo-strip.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.promo-card {
  display: block;
  width: 156px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--soft);
  box-shadow: 0 8px 18px rgba(78, 0, 120, .1);
  scroll-snap-align: start;
}

.promo-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  pointer-events: none;
}

.promo-section:last-child {
  padding-bottom: 14px;
}

.promotion-shell {
  padding-bottom: 96px;
}

.promotion-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  min-height: 88px;
  padding: 22px 16px 12px;
  background: #fff;
}

.promotion-header h1 {
  margin: 0;
  text-align: center;
  font-size: 26px;
  font-weight: 720;
  letter-spacing: 0;
}

.promotion-back {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #111;
}

.promotion-back svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.promotion-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 22px);
  min-height: 52px;
  margin: 10px 11px 14px;
  padding: 0 12px 0 18px;
  color: #fff;
  background: var(--deep-green);
  border: 3px double #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 2px var(--deep-green);
  font-size: 20px;
  font-weight: 820;
}

.promotion-filter svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 999px;
}

.promotion-layout {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  align-items: start;
  border-top: 1px solid var(--line);
}

.promotion-categories {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 166px);
  overflow-y: auto;
  background: #f1f1f1;
  scrollbar-width: none;
}

.promotion-categories::-webkit-scrollbar {
  display: none;
}

.promotion-categories button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  color: #111;
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
}

.promotion-categories button.active {
  color: #fff;
  background: var(--deep-green);
}

.promotion-categories svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.promotion-list {
  display: grid;
  gap: 14px;
  padding: 11px 10px 24px;
}

.promotion-poster {
  position: relative;
  display: block;
  width: min(100%, 156px);
  overflow: hidden;
  border-radius: 8px;
  background: var(--soft);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
}

.promotion-poster-link {
  display: block;
}

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

.promotion-poster-price {
  position: absolute;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 5px 8px;
  color: #fff;
  background: rgba(110, 0, 168, .88);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.promotion-add {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--green-2);
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
  cursor: pointer;
}

.promotion-add svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.promotion-add.loading {
  opacity: .72;
  cursor: wait;
}

.promotion-add.added {
  background: var(--purple);
}

.cart-notice {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 8;
  width: min(calc(100% - 38px), 374px);
  padding: 12px 14px;
  color: #fff;
  background: #1f1f1f;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 750;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .18s ease, transform .18s ease;
}

.cart-notice.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.cart-notice.error {
  background: #8b1d2c;
}

.promotion-state {
  min-height: 160px;
  padding: 18px 12px;
  color: var(--muted);
  font-weight: 650;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(calc(100% - 38px), 374px);
  height: 64px;
  padding: 0 14px;
  background: #1f1f1f;
  border: 0;
  border-radius: 14px;
  transform: translateX(-50%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .24);
}

.bottom-nav a {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  color: #fff;
  font-size: 11px;
  font-weight: 540;
}

.bottom-nav svg {
  position: relative;
  z-index: 1;
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.bottom-nav span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.bottom-nav .active {
  color: #fff;
  transform: translateY(-25px);
}

.bottom-nav .active::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: 58px;
  height: 58px;
  background: #1f1f1f;
  border: 8px solid #fff;
  border-radius: 999px;
}

.bottom-nav .active svg {
  width: 31px;
  height: 31px;
  padding: 6px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), #8a3dff 48%, var(--green) 49%, var(--green));
  border-radius: 10px;
}

.detail-shell {
  padding-bottom: 32px;
}

.detail-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: 68px;
  padding: 10px 14px;
  color: white;
  background: var(--purple);
}

.detail-header span {
  text-align: center;
  font-size: 20px;
  font-weight: 760;
}

.back-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
}

.back-button svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.detail-content {
  padding: 18px 16px 0;
}

.detail-image {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.detail-copy {
  padding: 22px 2px 0;
}

.detail-copy h1,
.empty-state h1 {
  margin: 5px 0 12px;
  font-size: 30px;
  line-height: 1.12;
}

.detail-copy p,
.empty-state p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 12px;
  padding: 0 18px;
  color: white;
  background: var(--purple);
  border-radius: 8px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  color: var(--purple);
  background: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
}

.hero-action.secondary {
  color: #fff;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .34);
}

.auth-shell {
  padding-bottom: 32px;
}

.auth-panel {
  padding: 28px 22px 0;
}

.auth-logo {
  width: 78px;
  height: 78px;
  margin-bottom: 20px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.auth-panel h1 {
  margin: 0 0 10px;
  font-size: 31px;
  line-height: 1.12;
  letter-spacing: 0;
}

.auth-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.auth-alert {
  margin-top: 18px;
  padding: 12px 14px;
  color: #7d1422;
  background: #fff0f2;
  border: 1px solid #ffd1d8;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.auth-form label {
  display: grid;
  gap: 7px;
}

.auth-form span {
  color: #303733;
  font-size: 13px;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  outline: none;
}

.auth-form input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(110, 0, 168, .12);
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.auth-switch {
  margin-top: 18px;
  text-align: center;
}

.auth-switch a {
  color: var(--purple);
  font-weight: 850;
}

.empty-state {
  padding: 36px 4px;
}

.cart-list {
  display: grid;
  gap: 12px;
  padding: 18px 16px 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-item img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--soft);
}

.cart-item h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

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

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.qty-control {
  display: inline-grid;
  grid-template-columns: 32px minmax(34px, auto) 32px;
  align-items: center;
  min-height: 34px;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.qty-control button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--purple);
  background: #fff;
  border: 0;
  cursor: pointer;
}

.qty-control button:disabled {
  color: #a7aea9;
  cursor: wait;
}

.qty-control svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.qty-value {
  min-width: 34px;
  padding: 0 8px;
  font-size: 14px;
  font-weight: 850;
  text-align: center;
}

.cart-item-total {
  flex: 0 0 auto;
  font-size: 14px;
}

.cart-summary {
  margin: 16px;
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 850;
}

@media (max-width: 370px) {
  .hero h1 {
    font-size: 34px;
  }

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