/* ===== Variables & Reset ===== */
:root {
  /* Crowdcart design tokens (Material-style palette from design reference) */
  --cc-primary: #00657d;
  --cc-primary-container: #00809d;
  --cc-surface-tint: #00677f;
  --cc-on-primary: #ffffff;
  --cc-on-primary-container: #fdfeff;
  --cc-primary-cta-edge: #005a70;
  --cc-primary-cta-edge-strong: #004e60;
  --cc-secondary: #9f402d;
  --cc-secondary-container: #fd876f;
  --cc-on-secondary: #ffffff;
  --cc-on-secondary-container: #732010;
  --cc-background: #fcf9f8;
  --cc-surface: #fcf9f8;
  --cc-surface-dim: #dcd9d9;
  --cc-surface-container: #f0eded;
  --cc-surface-container-high: #eae7e7;
  --cc-surface-container-low: #f6f3f2;
  --cc-on-background: #1b1c1c;
  --cc-on-surface: #1b1c1c;
  --cc-on-surface-variant: #3e484d;
  --cc-outline: #6e797d;
  --cc-outline-variant: #bec8cd;
  --cc-tertiary: #5e5d57;
  --cc-error: #ba1a1a;
  --cc-error-container: #ffdad6;
  --cc-warm-page: #f9f7f4;
  --cc-paper-bg: #fffdfc;

  /* Legacy bridge — existing rules keep using these names */
  --color-primary: var(--cc-primary);
  --color-primary-light: var(--cc-primary-container);
  --color-primary-dark: #004e60;
  --color-accent: var(--cc-secondary);
  --color-accent-light: var(--cc-secondary-container);
  --color-bg: var(--cc-warm-page);
  --color-surface: var(--cc-paper-bg);
  --color-text: var(--cc-on-background);
  --color-text-muted: var(--cc-on-surface-variant);
  --color-border: color-mix(in srgb, var(--cc-outline-variant) 88%, var(--cc-surface-dim));
  --color-success: var(--cc-primary);
  --color-error: var(--cc-error);

  --font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Literata', Georgia, 'Times New Roman', serif;

  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;

  --space-xs: 4px;
  --space-sm: 12px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 80px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px -8px rgba(0, 0, 0, 0.1);

  --max-width: 1200px;
  --nav-height: 72px;

  --texture-noise: url("data:image/svg+xml;utf8,%3Csvg viewBox=%220 0 200 200%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cfilter id=%22noiseFilter%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.65%22 numOctaves=%223%22 stitchTiles=%22stitch%22/%3E%3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23noiseFilter)%22 opacity=%220.04%22/%3E%3C/svg%3E");
  --paper-noise: url("data:image/svg+xml;utf8,%3Csvg width=%22100%22 height=%22100%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cfilter id=%22noise%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.8%22 numOctaves=%224%22 stitchTiles=%22stitch%22/%3E%3C/filter%3E%3Crect width=%22100%22 height=%22100%22 filter=%22url(%23noise)%22 opacity=%220.05%22/%3E%3C/svg%3E");
  --stamp-border-image: url("data:image/svg+xml;utf8,%3Csvg width=%2220%22 height=%2220%22 viewBox=%220 0 20 20%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Ccircle cx=%2210%22 cy=%2210%22 r=%222%22 fill=%22%23e4e2e1%22/%3E%3C/svg%3E") 8 round;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: max(884px, 100dvh);
  -webkit-font-smoothing: antialiased;
}

.texture-overlay {
  position: relative;
  isolation: isolate;
}

.texture-overlay::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--texture-noise);
  pointer-events: none;
  z-index: -1;
}

.paper-texture {
  background-color: var(--cc-paper-bg);
  background-image: var(--paper-noise);
}

.soft-shadow {
  box-shadow: var(--shadow-lg);
}

.stamp-border {
  border: 8px solid transparent;
  border-image: var(--stamp-border-image);
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  white-space: nowrap;
}

.btn-sm {
  font-size: 14px;
  padding: var(--space-xs) 18px;
}

.btn-lg {
  font-size: 16px;
  line-height: 24px;
  padding: var(--space-sm) var(--space-lg);
}

.btn-primary {
  background: var(--cc-primary-container);
  color: var(--cc-on-primary);
  border-color: transparent;
  border-bottom: 4px solid var(--cc-primary-cta-edge);
  box-shadow: 0 4px 12px rgba(0, 101, 125, 0.15);
}

.btn-primary:hover {
  background: var(--cc-surface-tint);
  border-bottom-color: var(--cc-primary-cta-edge-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: var(--cc-surface);
  color: var(--cc-secondary);
  border: 1px solid var(--cc-secondary);
}

.btn-outline:hover {
  background: color-mix(in srgb, var(--cc-secondary) 5%, var(--cc-surface));
  color: var(--cc-secondary);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: color-mix(in srgb, var(--cc-warm-page) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--cc-surface-dim) 20%, transparent);
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 12px;
}

.nav-cluster {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 32px;
  flex: 1;
  min-width: 0;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--cc-primary);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
  position: relative;
}

a.nav-logo:hover,
a.nav-logo:focus {
  text-decoration: none;
}

.nav-logo-img,
.crowdcart-logo-img {
  display: block;
  height: 1.75rem;
  width: auto;
  max-width: min(200px, 48vw);
  object-fit: contain;
  flex-shrink: 0;
}

/* Until branding resolves (and image decodes), hide text so it never flashes before the remote logo */
.crowdcart-logo--pending .crowdcart-logo-fallback {
  display: none !important;
}

.crowdcart-logo--pending:not(.crowdcart-logo--has-image) .crowdcart-logo-img[hidden] {
  display: none !important;
}

a.nav-logo.crowdcart-logo--pending,
span.nav-logo.crowdcart-logo--pending {
  min-height: 1.75rem;
  min-width: 8.5rem;
}

.crowdcart-logo--has-image .crowdcart-logo-fallback {
  display: none !important;
}

.crowdcart-logo:not(.crowdcart-logo--has-image):not(.crowdcart-logo--pending) .crowdcart-logo-img[hidden] {
  display: none !important;
}

.crowdcart-logo-fallback span {
  color: var(--cc-secondary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a:not(.btn) {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.nav-links a:not(.btn):hover {
  color: var(--cc-primary);
  opacity: 0.85;
}

.nav-lang-wrap {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  margin-left: 4px;
}

.nav-lang-select {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 26px 6px 10px;
  cursor: pointer;
  max-width: 132px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-my-crowdcart-item {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-my-crowdcart--bar {
  flex-shrink: 0;
}

@media (min-width: 769px) {
  .nav-my-crowdcart-item {
    display: none !important;
  }
}

/* ===== Account menu (avatar dropdown) ===== */
.nav-account {
  position: relative;
  flex-shrink: 0;
}

.nav-account-trigger {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nav-account-trigger:hover {
  border-color: var(--cc-primary-container);
  box-shadow: var(--shadow-sm);
}

.nav-account-avatar {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.nav-account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(300px, calc(100vw - 48px));
  padding: 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  text-align: left;
}

.nav-account-dropdown[hidden] {
  display: none !important;
}

.nav-account-email {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  word-break: break-all;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.nav-account-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.nav-account-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-account-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.nav-account-field input,
.nav-account-field select {
  width: 100%;
  font-family: var(--font-family);
  font-size: 0.85rem;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}

/* Inline list so all nationalities (incl. Other) stay visible — native dropdowns often show only ~3 rows. */
.nav-account-field select.nav-account-nationality {
  padding: 6px 8px;
  line-height: 1.45;
}

.nav-account-save {
  width: 100%;
  margin-top: 4px;
}

.nav-account-feedback {
  font-size: 0.78rem;
  margin-top: 8px;
  min-height: 1.2em;
}

.nav-account-feedback.is-success {
  color: var(--color-success);
}

.nav-account-feedback.is-error {
  color: var(--color-error);
}

.nav-account-logout {
  width: 100%;
  margin-top: 14px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ===== Hero ===== */
.hero {
  --hero-viewport-h: calc(70vh - var(--nav-height));
  --hero-dots-band: 52px;
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding-top: var(--nav-height);
  padding-bottom: 0;
  overflow: hidden;
  border-bottom: none;
  background-color: var(--cc-background);
  background-image: linear-gradient(
    160deg,
    var(--cc-surface-container-low) 0%,
    var(--cc-warm-page) 45%,
    color-mix(in srgb, var(--cc-secondary) 10%, var(--cc-warm-page)) 100%
  );
  text-align: center;
}

.hero-carousel {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: var(--hero-viewport-h);
}

.hero-carousel-viewport {
  overflow: hidden;
  width: 100%;
  flex: 1 1 auto;
  min-height: var(--hero-viewport-h);
  display: flex;
  flex-direction: column;
}

.hero-carousel-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  min-height: 100%;
  align-items: stretch;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.hero-carousel--reduced-motion .hero-carousel-track {
  transition: none;
}

.hero-slide {
  flex: 0 0 100%;
  width: 100%;
  box-sizing: border-box;
  padding: 0;
  min-height: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.hero-slide--static {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right));
}

.hero-slide-static-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  position: relative;
}

.hero-slide--static-has-image {
  padding: 0;
}

.hero-slide--static-has-image .hero-slide-static-inner {
  justify-content: stretch;
  min-height: 100%;
  overflow: hidden;
}

.hero-slide-static-visual {
  display: none;
  position: absolute;
  inset: -2px -1px -12px -1px;
  z-index: 0;
}

.hero-slide--static-has-image .hero-slide-static-visual {
  display: block;
}

.hero-static-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.04);
}

.hero-slide-static-text-block {
  width: 100%;
}

.hero-slide--static-has-image .hero-slide-static-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  flex: 1 1 auto;
  min-height: 100%;
  padding: 28px max(16px, env(safe-area-inset-left)) calc(var(--hero-dots-band) + max(10px, env(safe-area-inset-bottom))) max(16px, env(safe-area-inset-right));
  gap: 14px;
}

.hero-slide--static-has-image .hero-slide-static-text-block {
  flex-shrink: 0;
  align-self: center;
  max-width: 40rem;
}

.hero-slide--static-has-image .hero-slide-static-copy .hero-subtitle {
  margin-bottom: 0;
}

.hero-slide--static-has-image .hero-slide-static-copy #heroCta {
  margin-top: auto;
  flex-shrink: 0;
  box-shadow: var(--shadow-lg);
}

.hero-carousel--has-dots .hero-slide--static:not(.hero-slide--static-has-image) .hero-slide-static-copy {
  padding-bottom: calc(var(--hero-dots-band) + max(8px, env(safe-area-inset-bottom)));
}

.hero-slide-inner.hero-content {
  width: 100%;
}

.hero-content {
  max-width: 720px;
}

.hero h1,
.hero-promo-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--cc-on-surface);
  margin: 12px 0 28px;
  padding: 12px clamp(20px, 5vw, 48px);
  box-sizing: border-box;
}

.hero-slide--promo .hero-promo-title {
  margin-top: 0;
}

.hero-subtitle,
.hero-promo-subtitle {
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  line-height: 1.75;
  font-weight: 400;
  color: var(--cc-on-surface-variant);
  max-width: 560px;
  margin: 0 auto 40px;
}

.hero-slide--promo-text-only .hero-promo-subtitle {
  padding: 0 clamp(8px, 3vw, 16px);
}

.hero-slide--promo-text-only {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slide--promo-text-only .hero-slide-promo-copy {
  display: block;
  width: 100%;
}

.hero-slide--promo-text-only .hero-slide-promo-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 0 max(12px, env(safe-area-inset-left)) 0 max(12px, env(safe-area-inset-right));
}

/* Promo: full-bleed image + warm-page gradient + CTA pinned to bottom */
.hero-slide--promo-has-image {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.hero-slide--promo-has-image .hero-slide-promo-inner {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 100%;
  overflow: hidden;
  border-radius: 0;
  box-shadow: none;
  border: none;
  text-align: center;
}

.hero-slide-promo-visual {
  position: absolute;
  inset: -2px -1px -12px -1px;
  z-index: 0;
}

.hero-promo-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.04);
}

.hero-slide-promo-text-block {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
}

.hero-slide--promo-has-image .hero-slide-promo-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  flex: 1 1 auto;
  min-height: 100%;
  padding: 28px max(16px, env(safe-area-inset-left)) calc(var(--hero-dots-band) + max(10px, env(safe-area-inset-bottom))) max(16px, env(safe-area-inset-right));
  gap: 0;
}

.hero-slide--promo-has-image .hero-slide-promo-text-block {
  flex-shrink: 0;
  align-self: center;
  width: 100%;
}

.hero-slide--promo-has-image .hero-promo-title {
  color: var(--cc-on-surface);
  margin-bottom: 12px;
  padding-left: clamp(8px, 3vw, 24px);
  padding-right: clamp(8px, 3vw, 24px);
}

.hero-slide--promo-has-image .hero-promo-subtitle {
  color: var(--cc-on-surface-variant);
  margin-bottom: 0;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-slide--promo-has-image .hero-promo-cta {
  margin-top: auto;
  flex-shrink: 0;
  align-self: center;
  box-shadow: var(--shadow-lg);
}

.hero-slide-promo-copy {
  min-width: 0;
}

.hero-carousel-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 6px max(20px, env(safe-area-inset-left)) 4px max(20px, env(safe-area-inset-right));
  flex-wrap: wrap;
  flex-shrink: 0;
  background: transparent;
  pointer-events: none;
}

.hero-carousel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--cc-on-surface) 14%, transparent);
  background: var(--cc-paper-bg);
  background-image: var(--paper-noise);
  color: var(--cc-on-surface);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
}

.hero-carousel-btn--edge {
  position: absolute;
  top: calc(var(--nav-height) + var(--hero-viewport-h) / 2);
  z-index: 32;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--cc-on-surface) 18%, transparent);
  background: color-mix(in srgb, var(--cc-paper-bg) 92%, transparent);
}

.hero-carousel-btn--edge.hero-carousel-btn--prev {
  left: max(28px, calc(env(safe-area-inset-left, 0px) + 16px));
}

.hero-carousel-btn--edge.hero-carousel-btn--next {
  right: max(28px, calc(env(safe-area-inset-right, 0px) + 16px));
}

.hero-carousel-btn:hover {
  border-color: color-mix(in srgb, var(--cc-primary) 45%, transparent);
  background: color-mix(in srgb, var(--cc-primary) 8%, var(--cc-paper-bg));
}

.hero-carousel-btn--edge:hover {
  background: color-mix(in srgb, var(--cc-paper-bg) 96%, transparent);
}

.hero-carousel-btn:focus-visible {
  outline: 2px solid var(--cc-primary);
  outline-offset: 2px;
}

.hero-carousel-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 8px;
  pointer-events: auto;
}

.hero-carousel-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--cc-on-surface) 35%, transparent);
  background: color-mix(in srgb, var(--cc-paper-bg) 55%, transparent);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s, border-color 0.2s;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--cc-warm-page) 40%, transparent), 0 1px 4px rgba(0, 0, 0, 0.2);
}

.hero-carousel-dot[aria-selected='true'] {
  background: var(--cc-primary);
  border-color: var(--cc-primary);
  transform: scale(1.15);
}

.hero-carousel-dot:focus-visible {
  outline: 2px solid var(--cc-primary);
  outline-offset: 2px;
}

.hero-carousel--reduced-motion .hero-carousel-dot[aria-selected='true'] {
  transform: none;
}

.hero-carousel--reduced-motion .hero-promo-bg-img {
  transform: none;
}

.hero-carousel--reduced-motion .hero-static-bg-img {
  transform: none;
}

/* Mobile: hide hero banner photos; keep titles, body copy, and CTAs on the page gradient */
@media (max-width: 768px) {
  .hero-slide-static-visual,
  .hero-slide--static-has-image .hero-slide-static-visual,
  .hero-slide-promo-visual {
    display: none !important;
  }

  .hero-slide--static-has-image .hero-slide-static-inner {
    justify-content: center;
    overflow: visible;
  }

  .hero-slide--static-has-image .hero-slide-static-copy {
    flex: 0 1 auto;
    min-height: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding-top: 28px;
    padding-bottom: calc(var(--hero-dots-band) + max(10px, env(safe-area-inset-bottom)));
    background: none !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
  }

  .hero-slide--static-has-image .hero-slide-static-copy #heroCta {
    margin-top: 20px;
  }

  .hero-slide--promo-has-image .hero-slide-promo-inner {
    justify-content: center;
    overflow: visible;
    min-height: 0;
  }

  .hero-slide--promo-has-image .hero-slide-promo-copy {
    flex: 0 1 auto;
    min-height: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding-top: 28px;
    padding-bottom: calc(var(--hero-dots-band) + max(10px, env(safe-area-inset-bottom)));
    background: none !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
  }

  .hero-slide--promo-has-image .hero-promo-cta {
    margin-top: 20px;
  }
}

/* ===== Sections shared ===== */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--cc-on-surface);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1rem;
  line-height: 24px;
  font-weight: 400;
  color: var(--cc-on-surface-variant);
  max-width: 520px;
  margin: 0 auto 48px;
}

/* ===== Group Buy Preview on Landing ===== */
.group-buy-preview {
  margin-top: -2px;
  padding: calc(var(--space-xl) + 2px) 0 var(--space-xl);
  text-align: center;
  background: var(--cc-background);
  border-top: none;
}

.group-buy-preview .section-title {
  margin-bottom: 12px;
}

.group-buy-preview .section-subtitle {
  margin-bottom: 40px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
  text-align: left;
}

.preview-cta {
  margin-top: 16px;
}

/* ===== How It Works ===== */
.how-it-works {
  padding: var(--space-xl) 0;
  text-align: center;
}

.steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
  max-width: 900px;
  margin: 16px auto 0;
  text-align: left;
}

@media (min-width: 1024px) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: var(--max-width);
  }
}

.step {
  position: relative;
  background-color: var(--cc-paper-bg);
  background-image: var(--paper-noise);
  border: 8px solid transparent;
  border-image: var(--stamp-border-image);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s, box-shadow 0.2s;
}

.steps .step:nth-child(odd) {
  transform: rotate(-1.1deg);
}

.steps .step:nth-child(even) {
  transform: rotate(1deg);
}

.steps .step:nth-child(3n) {
  transform: rotate(-0.55deg);
}

.step:hover {
  transform: translateY(-6px) rotate(0deg) !important;
  box-shadow: 0 16px 48px -10px rgba(0, 0, 0, 0.12);
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--cc-on-primary);
  background: var(--cc-primary-container);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--cc-primary) 25%, transparent);
}

.step h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  color: var(--cc-on-surface);
}

.step-desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

.step-desc-link {
  color: var(--cc-primary-container);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.step-desc-link:hover {
  color: var(--cc-primary);
}

/* ===== About ===== */
.about {
  padding: var(--space-xl) 0;
  background: var(--cc-background);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-text .section-title {
  text-align: left;
}

.about-text p {
  color: var(--color-text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
}

.about-values {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.value-card {
  position: relative;
  background-color: var(--cc-paper-bg);
  background-image: var(--paper-noise);
  border: 8px solid transparent;
  border-image: var(--stamp-border-image);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-md);
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s, box-shadow 0.2s;
}

.about-values .value-card:nth-child(odd) {
  transform: rotate(-1.1deg);
}

.about-values .value-card:nth-child(even) {
  transform: rotate(1deg);
}

.about-values .value-card:nth-child(3n) {
  transform: rotate(-0.55deg);
}

.value-card:hover {
  transform: translateY(-6px) rotate(0deg) !important;
  box-shadow: 0 16px 48px -10px rgba(0, 0, 0, 0.12);
}

.value-card h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--cc-on-surface);
  margin-bottom: 8px;
}

.value-card p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ===== Contact ===== */
.contact {
  padding: var(--space-xl) 0;
  text-align: center;
}

.contact-form {
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
  position: relative;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 24px;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--cc-primary-container);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cc-primary-container) 22%, transparent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #b0b0b0;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.contact-form .form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23666' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 44px;
}

.form-feedback {
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  min-height: 24px;
}

.form-feedback.success {
  color: var(--color-success);
}

.form-feedback.error {
  color: var(--color-error);
}

/* ===== Footer ===== */
.footer {
  background: color-mix(in srgb, var(--cc-surface-dim) 20%, var(--cc-warm-page));
  color: var(--cc-on-surface-variant);
  padding: var(--space-lg) 0 0;
  border-top: 2px dashed color-mix(in srgb, var(--cc-outline-variant) 45%, transparent);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: var(--space-lg);
}

.footer-brand .nav-logo {
  color: var(--cc-tertiary);
  font-size: 1.4rem;
}

.footer-brand .crowdcart-logo-fallback span {
  color: var(--cc-secondary);
}

.footer-brand .nav-logo-img {
  height: 1.5rem;
}

.footer-brand p {
  margin-top: 8px;
  font-size: 16px;
  line-height: 24px;
  color: var(--cc-on-surface-variant);
}

.footer-social {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cc-on-surface-variant);
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-social-link:hover {
  color: var(--cc-primary-container);
  transform: translateY(-2px);
}

.footer-social-icon {
  width: 26px;
  height: 26px;
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cc-outline);
  margin-bottom: 14px;
}

.footer-links a {
  display: block;
  font-size: 16px;
  line-height: 24px;
  margin-bottom: 8px;
  color: var(--cc-on-surface-variant);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--cc-primary);
}

.footer-bottom {
  border-top: 1px dashed color-mix(in srgb, var(--cc-outline-variant) 50%, transparent);
  padding: var(--space-md) 0;
}

.footer-bottom p {
  font-size: 16px;
  line-height: 24px;
  color: var(--cc-tertiary);
  font-style: italic;
  text-align: center;
}

/* ===== Auth Pages ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 40px) var(--space-md) 40px;
  background: linear-gradient(160deg, var(--cc-surface-container-low) 0%, var(--cc-warm-page) 100%);
}

.auth-card {
  background-color: var(--cc-paper-bg);
  background-image: var(--paper-noise);
  border: 1px solid color-mix(in srgb, var(--cc-surface-dim) 40%, transparent);
  border-radius: var(--radius);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--cc-on-surface);
  text-align: center;
  margin-bottom: 8px;
}

.auth-card .auth-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

.auth-card .form-group {
  margin-bottom: 18px;
}

.auth-card .btn-primary {
  width: 100%;
  margin-top: 8px;
}

.auth-card .auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.auth-card .auth-footer a {
  color: var(--cc-primary-container);
  font-weight: 600;
}

.auth-card .auth-footer a:hover {
  text-decoration: underline;
}

.auth-error {
  background: var(--cc-error-container);
  border: 1px solid color-mix(in srgb, var(--cc-error) 28%, transparent);
  color: var(--color-error);
  font-size: 0.88rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  display: none;
}

.auth-error.visible {
  display: block;
}

.auth-success {
  background: color-mix(in srgb, var(--cc-primary) 8%, var(--cc-warm-page));
  border: 1px solid color-mix(in srgb, var(--cc-primary-container) 35%, transparent);
  color: var(--color-success);
  font-size: 0.88rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  display: none;
}

.auth-success.visible {
  display: block;
}

/* ===== Dashboard ===== */
.dashboard-page {
  min-height: 100vh;
  padding: calc(var(--nav-height) + 48px) 24px 48px;
  background: var(--color-bg);
}

.dashboard-card {
  background-color: var(--cc-paper-bg);
  background-image: var(--paper-noise);
  border: 1px solid color-mix(in srgb, var(--cc-surface-dim) 40%, transparent);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 700px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.dashboard-card h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--cc-on-surface);
  margin-bottom: 8px;
}

.dashboard-card .user-email {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.dashboard-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Group Buys Page ===== */
.group-buys-page {
  padding: calc(var(--nav-height) + 48px) 0 64px;
  min-height: 100vh;
}

.group-buys-page .section-title,
.group-buys-page .section-subtitle {
  text-align: center;
}

.country-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.country-tab {
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 22px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.country-tab:hover {
  border-color: var(--cc-primary-container);
  color: var(--cc-primary);
  background: color-mix(in srgb, var(--cc-primary) 6%, var(--cc-warm-page));
}

.country-tab.active {
  background: var(--cc-primary-container);
  color: var(--cc-on-primary);
  border-color: var(--cc-primary-container);
}

.group-buy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.group-buy-card {
  background-color: var(--cc-paper-bg);
  background-image: var(--paper-noise);
  border: 8px solid transparent;
  border-image: var(--stamp-border-image);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) 20px var(--space-md);
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  position: relative;
}

.group-buy-grid .group-buy-card:nth-child(odd),
.preview-grid .group-buy-card:nth-child(odd) {
  transform: rotate(-1.1deg);
}

.group-buy-grid .group-buy-card:nth-child(even),
.preview-grid .group-buy-card:nth-child(even) {
  transform: rotate(1deg);
}

.group-buy-grid .group-buy-card:nth-child(3n),
.preview-grid .group-buy-card:nth-child(3n) {
  transform: rotate(-0.55deg);
}

.group-buy-card:hover {
  transform: translateY(-6px) rotate(0deg) !important;
  box-shadow: 0 16px 48px -10px rgba(0, 0, 0, 0.12);
}

.group-buy-card--locked {
  border: 8px solid transparent;
  border-image: var(--stamp-border-image);
  background-color: var(--cc-paper-bg);
  background-image: var(--paper-noise),
    linear-gradient(180deg, var(--cc-paper-bg) 0%, var(--cc-surface-container-low) 100%);
}

.group-buy-card--upcoming {
  border: 2px dashed color-mix(in srgb, var(--cc-primary) 38%, transparent);
  border-image: none;
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--cc-primary) 6%, var(--cc-warm-page)) 0%,
    var(--cc-surface-container) 50%,
    var(--cc-warm-page) 100%
  );
  box-shadow: 0 8px 28px color-mix(in srgb, var(--cc-primary) 12%, transparent);
}

.group-buy-card--upcoming:hover {
  border-color: color-mix(in srgb, var(--cc-primary) 52%, transparent);
  box-shadow: 0 12px 36px color-mix(in srgb, var(--cc-primary) 14%, transparent);
}

.group-buy-card--upcoming .card-actions .btn-primary {
  background: var(--cc-primary);
  border-bottom-color: var(--cc-primary-cta-edge-strong);
}

.group-buy-card--upcoming .card-actions .btn-primary:hover {
  background: var(--cc-primary-dark);
  border-bottom-color: #003d4d;
}

.card-banner-wrap {
  position: relative;
  height: 190px;
  margin: 0 0 14px;
  border: 2px solid color-mix(in srgb, var(--cc-surface-dim) 35%, transparent);
  overflow: hidden;
  background: var(--cc-surface-container-low);
}

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

.card-banner-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: var(--cc-paper-bg);
  color: var(--cc-secondary);
  border: 1px solid color-mix(in srgb, var(--cc-secondary) 35%, transparent);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  padding: 6px 10px;
  transform: rotate(-1.6deg);
}

.card-banner-badge--locked {
  color: var(--cc-primary);
  border-color: color-mix(in srgb, var(--cc-primary) 35%, transparent);
}

.group-buy-opens-banner,
.detail-opens-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin: 0 0 16px;
  background: color-mix(in srgb, var(--cc-secondary) 10%, var(--cc-warm-page));
  border: 1px solid color-mix(in srgb, var(--cc-secondary) 28%, transparent);
  border-radius: var(--radius-sm);
}

.group-buy-card--locked .group-buy-opens-banner {
  margin: -4px -4px 16px;
  width: calc(100% + 8px);
  box-sizing: border-box;
}

.group-buy-opens-banner--upcoming,
.detail-opens-banner--upcoming {
  background: color-mix(in srgb, var(--cc-primary) 9%, var(--cc-warm-page));
  border-color: color-mix(in srgb, var(--cc-primary) 28%, transparent);
}

.group-buy-opens-banner--upcoming .group-buy-opens-label,
.detail-opens-banner--upcoming .group-buy-opens-label {
  color: var(--color-primary-dark);
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.95rem;
  font-weight: 700;
}

.detail-progress--upcoming .contributor-row,
.detail-progress--upcoming .urgency-text,
.detail-progress--upcoming .countdown-inline {
  display: none;
}

.group-buy-opens-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.group-buy-opens-text {
  flex: 1;
  min-width: 0;
}

.group-buy-opens-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cc-secondary);
  margin-bottom: 4px;
}

.countdown-opens {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.detail-opens-banner {
  margin-bottom: 20px;
  max-width: 640px;
}

.cart-lock-message {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  background: color-mix(in srgb, var(--cc-secondary) 7%, var(--cc-warm-page));
  border: 1px solid color-mix(in srgb, var(--cc-secondary) 22%, transparent);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  line-height: 1.45;
}

.product-card--locked {
  opacity: 0.92;
}

.btn-add--locked {
  opacity: 0.65;
  cursor: not-allowed;
  font-size: 0.8rem;
  padding: 8px 12px;
}

.cart-item-qty--locked {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
  padding: 4px 0;
}

.card-meta-labels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  align-self: flex-start;
}

.group-buy-card .card-country {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--cc-primary);
  background: color-mix(in srgb, var(--cc-primary) 10%, var(--cc-warm-page));
  border: 1px solid color-mix(in srgb, var(--cc-primary) 22%, transparent);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  align-self: flex-start;
}

.card-pickup {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 4px 11px 4px 8px;
  border-radius: 999px;
  max-width: 100%;
}

.card-pickup-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-label-icon--pickup {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--color-primary);
}

.group-buy-card .card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--cc-on-surface);
  margin-bottom: 8px;
}

.group-buy-card .card-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Contributors (avatars + user count) on group buys */
.contributor-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  width: 100%;
  margin: 10px 0 12px;
  min-height: 38px;
  box-sizing: border-box;
}

.contributor-row--empty {
  align-items: center;
}

.contributor-be-first {
  font-size: 0.85rem;
  font-weight: 500;
  font-style: italic;
  color: var(--color-text-muted);
  line-height: 1.35;
}

.contributor-count {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.contributor-count strong {
  color: var(--color-text);
  font-weight: 700;
}

.contributor-stack {
  display: flex;
  align-items: center;
}

.contributor-stack .contributor-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cc-surface-container-low), var(--cc-surface-container));
  border: 2px solid var(--color-surface);
  margin-left: -10px;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.contributor-stack .contributor-avatar:first-child {
  margin-left: 0;
}

.contributor-plus {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 5px 11px;
  border-radius: 999px;
  flex-shrink: 0;
}

.detail-progress .contributor-row {
  margin-top: 12px;
  margin-bottom: 8px;
}

/* ===== Progress Bar ===== */
.progress-bar {
  width: 100%;
  height: 8px;
  background: color-mix(in srgb, var(--cc-surface-dim) 35%, transparent);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--cc-primary-container);
  border-radius: var(--radius-sm);
  transition: width 0.6s ease;
  min-width: 0;
}

.progress-fill.almost {
  background: linear-gradient(90deg, var(--cc-secondary-container), var(--cc-secondary));
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.progress-info .progress-amount {
  font-weight: 700;
  color: var(--cc-primary-container);
}

.urgency-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cc-secondary);
  margin-bottom: 8px;
}

.countdown-inline {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}

.card-actions {
  margin-top: auto;
}

.btn-join-groupbuy {
  width: 100%;
  min-height: 52px;
  font-size: 18px;
  line-height: 28px;
  font-weight: 700;
  letter-spacing: 0;
  border-bottom-width: 3px;
}

.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--color-text-muted);
  grid-column: 1 / -1;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--cc-on-surface);
  margin-bottom: 8px;
}

/* ===== Group Buy Detail Page ===== */
.detail-page {
  padding: calc(var(--nav-height) + 40px) 0 64px;
  min-height: 100vh;
}

.detail-header {
  margin-bottom: 48px;
}

.detail-header .card-meta-labels {
  margin-bottom: 12px;
}

.detail-header .card-country {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--cc-primary);
  background: color-mix(in srgb, var(--cc-primary) 10%, var(--cc-warm-page));
  border: 1px solid color-mix(in srgb, var(--cc-primary) 22%, transparent);
  padding: 5px 14px;
  border-radius: var(--radius-sm);
}

.detail-header .card-pickup {
  font-size: 0.78rem;
  padding: 5px 12px 5px 9px;
}

.detail-header .card-label-icon--pickup {
  width: 16px;
  height: 16px;
}

.detail-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--cc-on-surface);
  margin-bottom: 10px;
}

.detail-header .detail-desc {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.detail-progress {
  background-color: var(--cc-paper-bg);
  background-image: var(--paper-noise);
  border: 1px solid color-mix(in srgb, var(--cc-surface-dim) 40%, transparent);
  border-radius: var(--radius);
  padding: 24px 28px;
  max-width: 640px;
  box-shadow: var(--shadow-lg);
}

.detail-progress .progress-bar {
  height: 14px;
  margin-bottom: 12px;
}

.detail-progress .progress-info {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.detail-progress .urgency-text {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.detail-progress .countdown-inline {
  font-size: 0.88rem;
  margin-bottom: 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  align-items: start;
}

/* ===== Product Grid ===== */
.product-section h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--cc-on-surface);
  margin-bottom: 20px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.product-card {
  background-color: var(--cc-paper-bg);
  background-image: var(--paper-noise);
  border: 1px solid color-mix(in srgb, var(--cc-surface-dim) 40%, transparent);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px -10px rgba(0, 0, 0, 0.12);
}

.product-card .product-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: var(--color-bg);
}

.product-card .product-img-placeholder {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, var(--cc-surface-container-low), var(--cc-surface-container-high));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 2rem;
}

.product-card .product-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 210px;
}

.product-card .product-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.product-card .product-desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  line-height: 1.4;
}

.product-card .product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.product-card .product-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--cc-primary-container);
}

.product-card .btn-add {
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  background: var(--cc-primary-container);
  color: var(--cc-on-primary);
  border: none;
  border-bottom: 2px solid var(--cc-primary-cta-edge-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.product-card .btn-add:hover {
  background: var(--cc-primary);
  border-bottom-color: #003d4d;
}

/* ===== Cart Section ===== */
.cart-section {
  background-color: var(--cc-paper-bg);
  background-image: var(--paper-noise);
  border: 1px solid color-mix(in srgb, var(--cc-surface-dim) 40%, transparent);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  box-shadow: var(--shadow-lg);
}

.cart-section h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cc-on-surface);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.cart-empty {
  text-align: center;
  padding: 24px 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.cart-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-item-qty button {
  font-family: var(--font-family);
  width: 26px;
  height: 26px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.cart-item-qty button:hover {
  background: var(--color-border);
}

.cart-item-qty span {
  font-size: 0.88rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.cart-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 4px 0 12px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--cc-on-surface);
  margin-bottom: 16px;
}

/* ===== Dashboard Orders ===== */
.orders-section {
  margin-top: 32px;
  text-align: left;
}

.orders-section h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--cc-on-surface);
  margin-bottom: 16px;
  text-align: center;
}

.order-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.order-card .order-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2px;
}

.order-card .order-info p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.order-card .order-meta {
  text-align: right;
}

.order-card .order-amount {
  font-size: 1rem;
  font-weight: 700;
  color: var(--cc-primary-container);
}

.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.status-badge.reserved {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.confirmed {
  background: color-mix(in srgb, var(--cc-primary) 12%, var(--cc-warm-page));
  color: var(--cc-primary);
}

.status-badge.cancelled {
  background: #fef2f2;
  color: var(--color-error);
}

/* ===== My Crowdcart page ===== */
.my-crowdcart-page {
  padding: calc(var(--nav-height) + 40px) 0 64px;
  min-height: 100vh;
  background: var(--color-bg);
}

.my-crowdcart-page .section-title {
  text-align: center;
}

.my-crowdcart-page .section-subtitle {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.joined-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 720px;
  margin: 0 auto;
}

.joined-card {
  background-color: var(--cc-paper-bg);
  background-image: var(--paper-noise);
  border: 8px solid transparent;
  border-image: var(--stamp-border-image);
  border-radius: var(--radius-sm);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.joined-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.joined-card-header h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--cc-on-surface);
  margin: 0 0 4px;
}

.joined-card-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.joined-your-total {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cc-primary-container);
  text-align: right;
}

.joined-card .progress-bar {
  margin-top: 8px;
}

.joined-items {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.joined-items h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.joined-item-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.9rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-bg);
}

.joined-item-row:last-child {
  border-bottom: none;
}

.joined-item-name {
  font-weight: 600;
  color: var(--color-text);
}

.joined-item-qty {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.joined-item-line-total {
  font-weight: 700;
  color: var(--cc-primary-container);
  font-variant-numeric: tabular-nums;
}

.joined-orders-note {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.joined-card-actions {
  margin-top: 18px;
}

/* ===== Blog List Page ===== */
.blog-list-page {
  padding: calc(var(--nav-height) + 48px) 0 80px;
  min-height: 100vh;
}

.blog-list-header {
  text-align: center;
  margin-bottom: 48px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.blog-card {
  position: relative;
  background-color: var(--cc-paper-bg);
  background-image: var(--paper-noise);
  border: 8px solid transparent;
  border-image: var(--stamp-border-image);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s, box-shadow 0.2s;
}

.blog-grid .blog-card:nth-child(odd) {
  transform: rotate(-1.1deg);
}

.blog-grid .blog-card:nth-child(even) {
  transform: rotate(1deg);
}

.blog-grid .blog-card:nth-child(3n) {
  transform: rotate(-0.55deg);
}

.blog-card:hover {
  transform: translateY(-6px) rotate(0deg) !important;
  box-shadow: 0 16px 48px -10px rgba(0, 0, 0, 0.12);
}

.blog-card-img-link {
  display: block;
  flex-shrink: 0;
}

.blog-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.blog-card-img-placeholder {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--cc-surface-container-high), var(--cc-surface-container-low));
}

.blog-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.blog-card-date {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.blog-read-time {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 2px 8px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
}

.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--cc-on-surface);
  margin-bottom: 8px;
  line-height: 1.35;
}

.blog-card-title a {
  color: inherit;
  transition: color 0.2s;
}

.blog-card-title a:hover {
  color: var(--cc-primary-container);
}

.blog-card-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: 20px;
  flex-grow: 1;
}

.blog-card-cta {
  align-self: flex-start;
  margin-top: auto;
}

/* ===== Blog Post Page ===== */
.blog-post-page {
  min-height: 100vh;
  padding-bottom: 80px;
}

.blog-hero-wrap {
  width: 100%;
  overflow: hidden;
  margin-top: var(--nav-height);
}

.blog-hero-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.blog-post-page .container {
  padding-top: 40px;
}

.blog-post-page:not(:has(.blog-hero-wrap)) .container {
  padding-top: calc(var(--nav-height) + 40px);
}

.blog-back-link {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cc-primary-container);
  margin-bottom: 28px;
  transition: color 0.2s;
}

.blog-back-link:hover {
  color: var(--cc-primary);
  text-decoration: underline;
}

.blog-article {
  max-width: 720px;
  margin: 0 auto;
}

.blog-article-header {
  margin-bottom: 36px;
}

.blog-article-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--cc-on-surface);
  line-height: 1.2;
  margin-bottom: 12px;
}

.blog-article-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.blog-article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

/* ===== Blog Article Body (Prose) ===== */
.blog-article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text);
}

.blog-article-body > * + * {
  margin-top: 1.25em;
}

.blog-article-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--cc-on-surface);
  margin-top: 2em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

.blog-article-body h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--cc-on-surface);
  margin-top: 1.75em;
  margin-bottom: 0.4em;
}

.blog-article-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-top: 1.5em;
  margin-bottom: 0.35em;
}

.blog-article-body p {
  margin: 0;
}

.blog-article-body ul,
.blog-article-body ol {
  padding-left: 1.5em;
  list-style: disc;
}

.blog-article-body ol {
  list-style: decimal;
}

.blog-article-body li + li {
  margin-top: 0.35em;
}

.blog-article-body a {
  color: var(--cc-primary-container);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-article-body a:hover {
  color: var(--cc-primary);
}

.blog-article-body strong {
  font-weight: 700;
  color: var(--cc-on-surface);
}

.blog-article-body em {
  font-style: italic;
}

.blog-article-body blockquote {
  border-left: 4px solid var(--cc-primary-container);
  padding: 12px 20px;
  margin: 0;
  background: color-mix(in srgb, var(--cc-primary) 6%, var(--cc-warm-page));
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-text-muted);
  font-style: italic;
}

.blog-article-body code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.88em;
  background: var(--cc-surface-container);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--cc-primary);
}

.blog-article-body pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 20px 24px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
}

.blog-article-body pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
  border-radius: 0;
}

.blog-article-body img {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.blog-article-body hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2em 0;
}

/* nav active state */
.nav-active {
  color: var(--cc-primary) !important;
  font-weight: 600;
}

/* ===== Home signup popup ===== */
body.has-signup-popup {
  overflow: hidden;
}

.signup-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(20, 24, 33, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.signup-popup-overlay[hidden] {
  display: none !important;
}

.signup-popup {
  position: relative;
  width: min(560px, 100%);
  background-color: var(--cc-paper-bg);
  background-image: var(--paper-noise);
  border: 1px solid color-mix(in srgb, var(--cc-surface-dim) 40%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 34px 30px 28px;
  text-align: left;
}

.signup-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.signup-popup-close:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.signup-popup-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cc-primary-container);
  margin-bottom: 8px;
}

.signup-popup h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  line-height: 1.2;
  font-weight: 600;
  color: var(--cc-on-surface);
  margin-bottom: 10px;
}

.signup-popup p {
  color: var(--color-text-muted);
}

.signup-popup-actions {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    z-index: 1001;
    background: color-mix(in srgb, var(--cc-warm-page) 98%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid color-mix(in srgb, var(--cc-surface-dim) 25%, transparent);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-cluster {
    flex: 1 1 0;
    min-width: 0;
    gap: 10px;
    justify-content: flex-end;
  }

  .nav-logo {
    flex-shrink: 0;
  }

  .nav-auth {
    margin-left: 0;
    min-width: 0;
    flex: 0 1 auto;
    max-width: 100%;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .nav-my-crowdcart--bar {
    display: none !important;
  }

  .nav-my-crowdcart-item {
    width: 100%;
    align-self: stretch;
    order: -1;
  }

  .nav-my-crowdcart--drawer {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .nav-account {
    flex-shrink: 0;
  }

  .nav-account-dropdown {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--nav-height);
    width: auto;
    max-width: none;
    margin: 0;
    transform: none;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-sizing: border-box;
    padding: 18px max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom))
      max(18px, env(safe-area-inset-left));
    max-height: min(75vh, calc(100vh - var(--nav-height) - 12px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .steps {
    grid-template-columns: 1fr;
    max-width: min(420px, 100%);
    margin: 16px auto 0;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-text .section-title {
    text-align: center;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .auth-card {
    padding: 36px 28px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .cart-section {
    position: static;
  }

  .group-buy-grid {
    grid-template-columns: 1fr;
  }

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

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

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

  .blog-hero-img {
    max-height: 260px;
  }

  .blog-article-title {
    font-size: 1.5rem;
  }

  .blog-article-body {
    font-size: 1rem;
  }

  .signup-popup {
    padding: 30px 20px 22px;
  }

  .signup-popup-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .signup-popup-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .footer-content {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 0 4px;
  }
}
