:root {
  --bg-dark: #0b1220;
  --bg-soft: #111827;
  --bg-card: #111827;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.06);
  --text: #f9fafb;
  --muted: #9ca3af;
  --accent: #3b82f6;
  --accent-2: #0e3a8a;
  --cta-primary: #f97316;
  --cta-primary-hover: #ea580c;
  --danger: #ef4444;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --bg-dark-transparent: rgba(11, 18, 32, 0);

  /* Overlay positioning
     We position the vertical text using a base percentage minus an offset.
      The offset is expressed as a percentage so it scales with the image size.
      (This avoids iOS differences between simulated and real viewport heights.)

     Tune points:
     - --overlay-vertical-top-base / --overlay-vertical-left-base (the % anchor)
     - clamp() min/max (mobile vs desktop offset)
  */
  --overlay-vertical-top-base: 48%;
  --overlay-vertical-left-base: 69%;

  /* Offset: mobile -> desktop (percentage of the image container height). */
  --overlay-vertical-top-offset: 8%;

  /* Small left micro-adjust: ~7px (mobile) -> ~10px (desktop). */
  --overlay-vertical-left-offset: clamp(7px, calc(5.64px + 0.36vw), 10px);

  --overlay-vertical-top: calc(var(--overlay-vertical-top-base) - var(--overlay-vertical-top-offset));
  --overlay-vertical-left: calc(var(--overlay-vertical-left-base) - var(--overlay-vertical-left-offset));
}

/* Lock overlay position on desktop so it doesn't drift with viewport changes.
   (The overlay still moves naturally with the image because it is positioned
   inside the image container.) */
@media (min-width: 1025px) {
  :root {
    --overlay-vertical-top-offset: 25%;
    --overlay-vertical-left-offset: 10px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --overlay-vertical-top-offset: 16%;
  }
}

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

html {
  overflow-x: hidden;
  /* Prevent iOS/Safari text inflation (can change perceived letter spacing/metrics). */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

h1, h2, h3 {
  font-family: 'Playfair Display', 'Inter', serif;
  color: #f8fafc;
  line-height: 1.2;
}

p {
  color: var(--muted);
}

a {
  color: inherit;
}

.bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, #0a1524 0%, #0b192b 45%, #0a1423 100%);
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.18;
  animation: float 18s ease-in-out infinite;
}

.orb-1 { top: 8%; left: 6%; background: #6bb7ff; }
.orb-2 { bottom: 18%; right: 16%; background: #0f66d9; animation-delay: 4s; }
.orb-3 { top: 36%; right: 30%; background: #1a2f55; animation-delay: 8s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -20px); }
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.topbar {
  position: relative;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(12, 18, 36, 0.6);
  border-bottom: 1px solid var(--glass-border);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 104px;
}

/* Header auth */
.topbar-actions {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex: 0 0 auto;
}

.topbar-actions .ghost-btn,
.topbar-actions .primary-btn,
.topbar-actions button {
  white-space: nowrap;
}

.auth {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.auth-input {
  width: 100%;
  margin-top: 0;
}

.auth-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 92vw);
  max-height: min(70vh, 560px);
  overflow: auto;
  padding: 0.85rem;
  z-index: 50;
  background: linear-gradient(135deg, rgba(10, 24, 48, 0.92), rgba(14, 34, 64, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* On mobile, the account button is centered; right-aligning the dropdown can push it off-screen.
   Center it within the viewport instead. */
@media (max-width: 768px) {
  .auth-dropdown {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(420px, 94vw);
  }
}

.auth-dropdown[aria-hidden='true'] {
  display: none;
}

.auth-dropdown-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.auth-close {
  padding: 0.45rem 0.8rem;
}

.auth-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.auth-buttons .primary-btn,
.auth-buttons .ghost-btn {
  flex: 1 1 160px;
}

.auth-signup {
  padding: 0.75rem;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

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

.auth-dob {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.auth-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 0 0 auto;
}

/* Logo-only header */
.brand-text--hidden {
  display: none;
}

/* Make the logo occupy the same footprint as the old logo+text block */
.brand-mark {
  width: auto;
  height: auto;
  border-radius: 12px;
  background: transparent;
  display: flex;
  align-items: center;
  overflow: visible;
  flex: 0 0 auto;
}

.brand-mark--img img {
  display: block;
  height: 96px;
  width: auto;
  object-fit: contain;
}

@media (max-width: 768px) {
  .brand-mark {
    width: auto;
    height: auto;
  }
  .brand-mark--img img {
    height: 80px;
  }
}

/* Make selects match the site's input styling (esp. on mobile) */
select.text-input {
  -webkit-appearance: none;
  appearance: none;
  color-scheme: dark;
  padding-right: 2.2rem;
}

select.text-input option {
  background: var(--bg-dark);
  color: var(--text);
}

@media (max-width: 768px) {
  /* Center the account dropdown so it doesn't render off-screen */
  .auth-dropdown {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(420px, 94vw);
  }
}

.brand-mark--img img {
  border-radius: 10px;
}

.brand-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-transform: uppercase;
}

.brand-name {
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.hero, .pillars, .products, .detail, .cta {
  max-width: 1200px;
  margin: 1.25rem auto;
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: center;
  padding: 2rem;
  background: linear-gradient(135deg, #0a1e3a 0%, #0b2d5c 55%, #0e3a8a 100%);
}

.hero-actions, .detail-actions, .cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}

.primary-btn, .ghost-btn {
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}

.primary-btn {
  background: var(--cta-primary);
  color: #0b1224;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.ghost-btn {
  border-color: var(--glass-border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.75rem 1.2rem;
}

.primary-btn:hover, .ghost-btn:hover {
  transform: translateY(-1px);
}

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

.hero-visual {
  display: flex;
  justify-content: flex-end;
}

.hero-card {
  padding: 1rem;
  max-width: 360px;
  width: 100%;
  background: rgba(17, 24, 39, 0.65);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.hero-card img {
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  font-size: 0.85rem;
  color: var(--text);
}

.pill.ghost {
  background: rgba(255, 255, 255, 0.03);
}

.card-title {
  font-weight: 700;
  margin: 0.6rem 0 0.2rem;
}

.card-sub {
  color: var(--muted);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: #a5b4fc;
  margin-bottom: 0.35rem;
}

.lede {
  margin: 0.5rem 0 1rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
}

.stats strong {
  display: block;
  color: #e0e7ff;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.pillars article {
  padding: 1rem;
}

.products .section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.product-card {
  position: relative;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.12);
}

.product-card img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: 0.6rem;
}

.price {
  font-weight: 800;
  color: #e0e7ff;
}

.tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.option-group {
  margin: 0.75rem 0;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.option-grid--wrap {
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
}

.option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.size-guide-btn {
  padding: 0.35rem 0.7rem;
}

.size-guide {
  margin-top: 0.65rem;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem;
}

.size-guide-table-wrap {
  overflow-x: auto;
}

.size-guide-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.size-guide-table th,
.size-guide-table td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  font-size: 0.92rem;
  color: var(--text);
}

.size-guide-table thead th {
  font-weight: 900;
  color: #e0e7ff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.size-guide-table tbody th {
  font-weight: 850;
  color: var(--text);
}

.option-pill {
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 10px;
  padding: 0.55rem 0.6rem;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.option-pill:hover {
  transform: translateY(-2px);
}

.option-pill.is-active {
  border-color: rgba(99, 102, 241, 0.9);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(34, 211, 238, 0.18));
  color: #f8fafc;
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.35);
  transform: translateY(-2px);
  font-weight: 800;
}

.swatch {
  position: relative;
  overflow: hidden;
  padding: 0;
  border-radius: 12px;
}

.swatch img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
}

.swatch-img-wrap {
  position: relative;
}

.swatch-label {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #f8fafc;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.swatch--image-only {
  padding: 0;
}

.text-input {
  width: 100%;
  padding: 0.75rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  margin-top: 0.35rem;
  /* Prevent iOS Safari focus-zoom on form fields. */
  font-size: 16px;
}

/* iOS Safari zooms on focus when fields are <16px. Apply across all site forms on mobile. */
@media (max-width: 768px) {
  input,
  textarea,
  select {
    font-size: 16px !important;
  }
}

select.text-input {
  appearance: none;
  -webkit-appearance: none;
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

select.text-input option {
  background: var(--bg-soft);
  color: var(--text);
}

.muted-text {
  color: var(--muted);
  font-size: 0.9rem;
}

.error-text {
  color: #f87171;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  align-items: center;
}

.detail-card {
  background: #0e1a2e;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  padding: 0.75rem;
}

.detail-card img {
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: contain;
}

.detail-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.detail-actions a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.detail-actions--inline {
  justify-content: center;
  margin-top: 0.75rem;
}

/* Preview strip (custom tee only) */
.preview-strip {
  display: none;
  padding: 0.75rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.8);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.preview-image-wrap {
  width: 100%;
  margin-bottom: 0.95rem;
  position: relative;
}

.preview-strip img {
  width: 100%;
  border-radius: 14px;
  height: auto;
  max-height: 60vh;
  object-fit: contain;
}

.design-slider {
  display: none;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scroll-snap-type: x mandatory;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  /* Give extra breathing room so it never visually crowds the preview image on mobile. */
  padding-top: 0.35rem;
}

/* Swipe hint (touch devices). */
.design-swipe-hint {
  display: none;
  width: 86px;
  height: 22px;
  margin: 0.35rem auto 0;
  position: relative;
  opacity: 0.75;
}

.design-swipe-hint::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.design-swipe-hint::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 16px;
  width: 14px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.10);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
  animation: designSwipeHint 1.7s ease-in-out infinite;
}

@keyframes designSwipeHint {
  0% { transform: translateX(0); opacity: 0.55; }
  18% { opacity: 0.9; }
  55% { transform: translateX(40px); opacity: 0.9; }
  82% { opacity: 0.55; }
  100% { transform: translateX(0); opacity: 0.55; }
}

.design-slider-hint {
  margin-top: 0.45rem;
  text-align: center;
}

.slider-swatch {
  flex: 0 0 calc((100% - 1rem) / 3);
  max-width: calc((100% - 1rem) / 3);
  padding: 0.35rem;
  scroll-snap-align: start;
}

.slider-swatch img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.has-preview .preview-strip {
  display: none;
}

@media (max-width: 768px) {
  .detail-actions a.primary-btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .has-preview .option-group--design {
    display: none;
  }
  .has-preview .preview-strip {
    display: block;
  }
  .design-slider {
    display: flex;
    gap: 0.6rem;
    max-width: 396px;
    padding-bottom: 0.4rem;
    margin: 0 auto;
  }
  .design-swipe-hint {
    display: block;
  }
  .slider-swatch {
    flex: 0 0 calc((100% - 1rem) / 3);
    max-width: calc((100% - 1rem) / 3);
  }
  .preview-strip img,
  .detail-card img {
    max-height: 60vh;
    max-width: 94vw;
    margin: 0 auto;
  }
}

@media (max-width: 1024px) {
  .detail {
    grid-template-columns: 1fr;
  }
  .has-preview .option-group--design {
    display: none;
  }
  .has-preview .preview-strip {
    display: block;
  }
  .design-slider {
    display: flex;
    gap: 0.65rem;
    max-width: 484px;
    margin: 0 auto;
  }
  .design-swipe-hint {
    display: block;
  }
  .slider-swatch {
    flex: 0 0 calc((100% - 1.2rem) / 3);
    max-width: calc((100% - 1.2rem) / 3);
  }
  .preview-strip img,
  .detail-card img {
    max-height: 65vh;
    max-width: 96vw;
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .design-swipe-hint::before {
    animation: none;
  }
}

@media (min-width: 1025px) {
  .swatch img {
    height: 140px;
  }
  .design-slider {
    display: none;
  }
  .has-preview .preview-strip {
    display: none;
  }
}

.image-wrap {
  position: relative;
}

.image-overlay {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.35rem 0.65rem;
  border-radius: 10px;
  background: transparent;
  color: transparent;
  font-family: 'Anton', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  min-width: 140px;
  max-width: 80%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  /* Prevent iOS text autosizing from distorting overlay fit/position. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.image-overlay--vertical {
  top: var(--overlay-vertical-top);
  left: var(--overlay-vertical-left);
  right: auto;
  bottom: auto;
  transform: translate(0, -50%) rotate(90deg);
  transform-origin: left center;
  min-width: 140px;
  text-align: left;
  white-space: nowrap;
  font-family: 'Bebas Neue', 'Anton', 'Inter', sans-serif;
  font-size: var(--overlay-font-size, clamp(1.25rem, 3vw, 1.8rem));
  letter-spacing: clamp(0.1em, 0.12em, 0.14em);
  line-height: 1.05;
  font-weight: 800;
  /* Remove width constraints: iOS can clip transformed elements to their box. */
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.2s ease;
  /* Prevent iOS text autosizing from distorting overlay fit/position. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* iOS-only: Safari can render the loaded font with slightly wider tracking than desktop
   responsive emulation. Nudge tracking down a touch without changing overlay position. */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 768px) {
    .image-overlay--vertical {
      letter-spacing: 0.095em;
    }
  }
}

.image-overlay--vertical.overlay-long {
  font-size: calc(var(--overlay-font-size, clamp(1.25rem, 3vw, 1.8rem)) * 0.9);
}

.image-overlay--vertical.overlay-max {
  font-size: calc(var(--overlay-font-size, clamp(1.25rem, 3vw, 1.8rem)) * 0.85);
}

.overlay-gold {
  /* Metallic horizontal sheen across letters (gradient is set vertical pre-rotation) */
  background-image: linear-gradient(
    90deg,
    #b27a2b 0%,
    #d7a647 25%,
    #f4d28a 50%,
    #d7a647 75%,
    #b27a2b 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.overlay-white {
  background-image: linear-gradient(
    90deg,
    #ffffff 0%,
    #f5f7fa 25%,
    #ffffff 50%,
    #f5f7fa 75%,
    #ffffff 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

.overlay-black {
  background-image: linear-gradient(
    90deg,
    #0b0f19 0%,
    #111827 25%,
    #1f2937 50%,
    #111827 75%,
    #0b0f19 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

.overlay-narrow {
  max-width: 65%;
  overflow: hidden;
}

@media (max-width: 768px) {
  .image-overlay--vertical {
    transform: translate(0, -50%) rotate(90deg);
    font-size: var(--overlay-font-size, clamp(1.1rem, 3.5vw, 1.55rem));
  }
}


.detail-card img {
  width: 100%;
  border-radius: 14px;
  height: auto;
  max-height: 60vh; /* Updated to allow more height for designs */
  object-fit: contain;
}
  /* Give more vertical room to show full designs (desktop only) */
  .detail-card img {
    max-height: 75vh; /* Increased height for desktop view */
  }

.price-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  justify-content: center;
  align-items: center;
  margin-top: 0.75rem;
}

.price-stack {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: center;
  text-align: center;
}

.price-main-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  justify-content: center;
}

.price-main {
  font-size: clamp(2rem, 5vw, 2.4rem);
  font-weight: 900;
  color: #f5f7fb;
  letter-spacing: -0.02em;
}

.price-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f87171, #ef4444);
  color: #0b1224;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.price-row .pill {
  background: #f1f5f9;
  border-color: #e5e7eb;
  color: #0b1224;
  font-weight: 700;
}

.sale-text {
  font-size: 0.95rem;
  color: #1f2937;
  opacity: 0.9;
}

.inline-sale-text {
  font-size: 0.95rem;
  font-weight: 600;
  margin-left: 0.35rem;
  color: #ffffff;
}

.bundle-text {
  font-size: 0.95rem;
  color: #0b1224;
  font-weight: 700;
}

.bundle-pill-wrapper {
  margin-top: 0.6rem;
}

.bundle-pill-wrapper--below {
  display: flex;
  justify-content: center;
  max-width: 1200px;
  padding: 0 1.5rem;
  margin: 20px auto 24px;
}

.bundle-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  padding: 0.65rem 1.2rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f9fafb;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  text-align: center;
  line-height: 1.15;
}

.bundle-pill > span {
  display: block;
}

.cta-sub {
  display: block;
  font-size: 0.7em;
  font-weight: 600;
  text-align: center;
  margin-top: 2px;
  line-height: 1.1;
  opacity: 0.85;
  width: 100%;
}

.cta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  color: var(--muted);
}

.footer-bar {
  text-align: center;
  padding: 0.75rem 1rem;
  background: rgba(17, 24, 39, 0.85);
  color: #f9fafb;
  font-weight: 700;
  border-top: 1px solid var(--glass-border);
}

/* Basket */
.basket-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.basket-modal[aria-hidden='true'] {
  display: none;
}
.basket-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}
.basket-panel {
  position: relative;
  width: min(520px, 92vw);
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(10, 24, 48, 0.9), rgba(14, 34, 64, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.basket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.basket-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 300px;
  overflow-y: auto;
}
.basket-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.basket-item-title {
  font-weight: 700;
  color: var(--text);
}
.basket-item-meta {
  color: var(--muted);
  font-size: 0.9rem;
}
.basket-item-price {
  font-weight: 700;
  color: var(--text);
}
.basket-remove {
  padding: 0.3rem 0.8rem;
}
.basket-summary {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.basket-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
  font-weight: 600;
}
.basket-summary-row.total {
  font-size: 1.1rem;
}

.address-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.address-actions {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
}

/* Address modal: keep the submit button visible without scrolling */
#address-modal .basket-panel {
  max-height: 92vh;
}

#address-modal .basket-panel {
  padding: 1.1rem;
}

#address-modal .address-form {
  gap: 0.4rem;
}

#address-modal .text-input {
  padding: 0.6rem 0.75rem;
  margin-top: 0.25rem;
}

#address-modal .form-label {
  margin-bottom: 0.2rem;
}

#address-modal .address-actions {
  position: sticky;
  bottom: 0;
  padding-top: 0.65rem;
  padding-bottom: 0.25rem;
  background: linear-gradient(135deg, rgba(10, 24, 48, 0.9), rgba(14, 34, 64, 0.85));
  justify-content: stretch;
}

#address-modal .address-actions .primary-btn {
  width: 100%;
}

.order-success-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Checkout page */
.checkout-main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

.checkout {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.checkout-header h1 {
  margin-bottom: 0.35rem;
}

.checkout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.checkout-summary,
.checkout-payment {
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid var(--glass-border);
}

.payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.25rem 0 0.75rem;
}

.checkout-items,
.checkout-item {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checkout-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.5rem 0 1rem;
}

.checkout-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.checkout-item-title {
  font-weight: 700;
  color: var(--text);
}

.checkout-item-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.checkout-item-price {
  font-weight: 700;
  color: var(--text);
}

.checkout-totals {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.checkout-totals div {
  display: flex;
  justify-content: space-between;
  color: var(--text);
}

.checkout-total {
  font-size: 1.1rem;
  font-weight: 800;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.payment-element {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.payment-message {
  color: var(--danger);
  min-height: 1.2rem;
  margin-bottom: 0.5rem;
}

.small {
  font-size: 0.9rem;
}

/* Reviews + timeline */
.reviews {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Nudge the reviews header text in from the left edge */
.reviews .section-head > div:first-child {
  padding-left: 20px;
}

.reviews-overall {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0.45rem 0 0.2rem;
}

.reviews-overall-meta {
  font-weight: 600;
}

.reviews-grid {
  --reviews-gap: 1rem;
  display: grid;
  gap: var(--reviews-gap);
  align-items: stretch;
  grid-auto-flow: column;
  grid-template-rows: repeat(3, auto);
  grid-auto-columns: calc((100% - (2 * var(--reviews-gap))) / 3);
  grid-template-columns: unset;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
}

.review-card {
  padding: 1rem;
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.76), rgba(2, 6, 23, 0.58)) padding-box,
    linear-gradient(135deg, rgba(139, 92, 246, 0.52), rgba(59, 130, 246, 0.18), rgba(255, 255, 255, 0.08)) border-box;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
  will-change: transform;
  scroll-snap-align: start;
}

.review-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45);
}

.review-card::after {
  content: "";
  position: absolute;
  inset: -120px -120px auto auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.28), transparent 70%);
  pointer-events: none;
  filter: blur(4px);
}

.review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.reviewer {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.review-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  flex: 0 0 auto;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 60%),
    rgba(255, 255, 255, 0.06);
}

.reviewer-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.reviewer-name {
  color: var(--text);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reviewer-dot {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 700;
  margin: 0 0.25rem;
}

.reviewer-sub {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  flex: 0 0 auto;
}

.review-stars {
  letter-spacing: 0.14em;
  color: #fbbf24;
  font-weight: 900;
  font-size: 0.9rem;
  text-shadow: 0 6px 18px rgba(251, 191, 36, 0.18);
}

.review-score {
  color: var(--text);
  font-weight: 900;
  font-size: 0.9rem;
}

.review-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.9rem;
  align-items: start;
}

.review-grid--no-media {
  grid-template-columns: 1fr;
}

.review-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.review-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.review-tag {
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1;
  color: rgba(255, 255, 255, 0.78);
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.review-media {
  width: 123px;
  height: 112px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background:
    radial-gradient(120px 120px at 30% 20%, rgba(139, 92, 246, 0.28), transparent 60%),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px;
}

.review-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 50%;
  border-radius: 10px;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.review-quote {
  color: var(--text);
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.review-upload {
  padding: 1rem;
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.62), rgba(2, 6, 23, 0.46)) padding-box,
    linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(59, 130, 246, 0.16), rgba(255, 255, 255, 0.08)) border-box;
  border-radius: var(--radius);
}

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

.review-form-grid textarea {
  grid-column: 1 / -1;
}

.review-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.6rem;
}

@media (max-width: 768px) {
  .review-form-grid {
    grid-template-columns: 1fr;
  }
}

.review-meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.55rem;
}

.timeline {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.timeline li {
  margin: 0.35rem 0;
}

@media (max-width: 740px) {
  .reviews {
    padding: 0;
  }
  .review-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }
  .reviewer {
    width: 100%;
  }
  .reviewer-name,
  .reviewer-sub {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
  .review-rating {
    margin-left: 54px;
  }
  .review-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "media" "text";
    gap: 0.75rem;
  }
  .review-text {
    grid-area: text;
  }
  .review-media {
    grid-area: media;
    width: 100%;
    height: 187px;
    padding: 11px;
  }
  .review-photo {
    object-fit: contain;
  }
  .review-card {
    min-height: unset;
  }
  .review-stars {
    letter-spacing: 0.12em;
  }
}

@media (max-width: 1024px) {
  .reviews-grid {
    grid-template-rows: repeat(2, auto);
    grid-auto-columns: minmax(280px, 88%);
  }

  /* Match mobile review card layout on tablets. */
  .reviews {
    padding: 0;
  }
  .review-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }
  .reviewer {
    width: 100%;
  }
  .reviewer-name,
  .reviewer-sub {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
  .review-rating {
    margin-left: 54px;
  }
  .review-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "media" "text";
    gap: 0.75rem;
  }
  .review-text {
    grid-area: text;
  }
  .review-media {
    grid-area: media;
    width: 100%;
    height: 187px;
    padding: 11px;
  }
  .review-photo {
    object-fit: contain;
  }
  .review-stars {
    letter-spacing: 0.12em;
  }
}

@media (max-width: 740px) {
  .reviews-grid {
    grid-auto-columns: minmax(260px, 92%);
  }
}

@media (max-width: 420px) {
  .review-quote {
    -webkit-line-clamp: 5;
    line-clamp: 5;
  }
}

/* Consent banner */
#consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  padding: 0.9rem;
  background: rgba(6, 10, 20, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.consent-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
  align-items: center;
}

.consent-copy strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.consent-copy p {
  color: var(--muted);
  margin: 0;
}

.consent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  justify-items: end;
}

.consent-toggle {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--text);
  font-weight: 600;
  justify-self: start;
}

.consent-toggle input {
  width: 18px;
  height: 18px;
}

.consent-buttons {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .consent-banner-inner {
    grid-template-columns: 1fr;
  }
  .consent-actions {
    grid-template-columns: 1fr 1fr;
    justify-items: start;
  }
  .consent-buttons {
    justify-content: stretch;
  }
  .consent-buttons .primary-btn,
  .consent-buttons .ghost-btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 768px) {
  .topbar-inner {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    align-items: center;
    row-gap: 0.75rem;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    justify-content: center;
  }

  .topbar-actions {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
  }

  .topbar-actions > a.ghost-btn {
    justify-self: start;
  }

  .topbar-actions .auth {
    justify-self: center;
  }

  .topbar-actions .basket-btn {
    justify-self: end;
  }

  .nav {
    width: 100%;
    grid-column: 1;
    grid-row: 3;
    justify-content: center;
    text-align: center;
  }
}
