/* ============================================
   Size Guide — light / dark via data-theme
   ============================================ */

.size-guide-page {
  padding-block: 40px 80px;
}

.size-guide-page > .container {
  max-width: 1240px;
}

.size-guide-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.size-guide-tab {
  appearance: none;
  min-width: min(100%, 260px);
  padding: 14px 28px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
}

.size-guide-tab:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.size-guide-tab.is-active {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  color: #fff;
  box-shadow: var(--shadow);
}

.size-guide-tab.is-active::before {
  content: "★ ";
  color: var(--gold);
}

[data-theme="dark"] .size-guide-tab.is-active {
  background: #0e1d35;
  border-color: var(--gold);
}

.size-guide-filters {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px 20px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

.size-guide-gender {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 18px;
}

.size-guide-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.size-guide-gender-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.size-guide-gender-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.size-guide-gender-btn:hover {
  border-color: var(--gold);
}

.size-guide-gender-btn.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

[data-theme="dark"] .size-guide-gender-btn.is-active {
  background: #0e1d35;
  border-color: var(--gold);
}

.size-guide-gender-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
  box-shadow: inset 0 0 0 2px var(--bg);
  background: transparent;
}

.size-guide-gender-btn.is-active .size-guide-gender-dot {
  background: var(--gold);
  box-shadow: inset 0 0 0 2px var(--navy);
  border-color: #fff;
}

.size-guide-jump-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
}

.size-guide-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.size-guide-chip {
  appearance: none;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.size-guide-chip:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.size-guide-chip.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.size-chart-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 10px;
}

.size-chart-banner {
  background: var(--gold);
  color: #fff;
  padding: 12px 20px;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.size-chart-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface2);
  overflow: hidden;
}

.size-chart-stage.has-photo {
  aspect-ratio: auto;
  background: #fff;
  overflow: visible;
}

.size-chart-photo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.size-chart-stage.has-photo.is-native {
  width: var(--chart-w);
  max-width: 100%;
  height: auto;
  aspect-ratio: var(--chart-w) / var(--chart-h);
  margin-inline: auto;
  overflow: hidden;
}

.size-chart-stage.has-photo.is-native .size-chart-photo {
  width: 100%;
  height: auto;
  max-height: none;
}

.size-chart-photo.is-hidden {
  display: none;
}

.size-chart-stage.has-photo .size-chart-fallback {
  display: none;
}

.size-chart-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100%;
}

.size-chart-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background:
    radial-gradient(circle at 30% 20%, rgba(217, 35, 46, 0.06), transparent 50%),
    var(--surface);
}

.size-chart-diagram svg {
  width: min(100%, 280px);
  height: auto;
  max-height: 100%;
}

.size-chart-diagram .sg-body {
  fill: rgba(26, 44, 78, 0.08);
  stroke: var(--navy);
  stroke-width: 3;
}

.size-chart-diagram .sg-accent {
  stroke: var(--gold);
  stroke-width: 2.5;
  fill: none;
}

.size-chart-diagram .sg-label {
  fill: var(--gold);
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
}

[data-theme="dark"] .size-chart-diagram .sg-body {
  fill: rgba(162, 185, 227, 0.12);
  stroke: #a2b9e3;
}

.size-chart-table-wrap {
  background: #0e1d35;
  color: #eef2f7;
  padding: 12px 14px;
  overflow: auto;
}

.size-chart-table-caption {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 8px;
}

.size-chart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.size-chart-table th,
.size-chart-table td {
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  white-space: nowrap;
}

.size-chart-table th {
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.625rem;
  color: #fff;
}

.size-chart-table td {
  color: #d7e2f2;
}

.size-chart-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.size-chart-empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
  line-height: 1.5;
}

.size-chart-brand {
  display: flex;
  justify-content: flex-end;
  padding: 10px 18px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--navy);
}

[data-theme="dark"] .size-chart-brand {
  color: #a2b9e3;
}

.size-code-help {
  margin: 0 0 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.size-code-help summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  user-select: none;
}

.size-code-help summary::-webkit-details-marker {
  display: none;
}

.size-code-help-chevron {
  flex-shrink: 0;
  width: 0.45em;
  height: 0.45em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
  opacity: 0.65;
  margin-top: -2px;
}

.size-code-help[open] .size-code-help-chevron {
  transform: rotate(45deg);
  margin-top: -4px;
}

.size-code-help-hint {
  color: var(--muted, #7a8699);
  font-weight: 500;
  font-size: 0.75rem;
}

.size-code-help[open] .size-code-help-hint {
  display: none;
}

.size-code-help-list {
  margin: 0;
  padding: 0 14px 14px 36px;
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.size-code-help-list strong {
  color: var(--navy);
  font-weight: 700;
}

[data-theme="dark"] .size-code-help-hint {
  color: #8fa0b5;
}

[data-theme="dark"] .size-code-help-list strong {
  color: #e2ecfc;
}

.size-guide-tips {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow);
}

.size-guide-tips-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 18px;
}

[data-theme="dark"] .size-guide-tips-title {
  color: #e2ecfc;
}

.size-guide-tips h3 {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 10px;
}

.size-guide-tips p,
.size-guide-tips li {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.size-guide-tips ul {
  margin: 0 0 18px;
  padding-left: 1.15rem;
}

.size-guide-tips li {
  margin-bottom: 8px;
}

.size-guide-tips li strong {
  color: var(--text);
}

.size-guide-convert {
  display: inline-block;
  margin-top: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--gold-light);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.875rem;
}

[data-theme="dark"] .size-guide-convert {
  color: #eef2f7;
}

.size-guide-callouts {
  display: grid;
  gap: 12px;
}

.size-guide-growth,
.size-guide-fitting {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--gold-light);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
}

.size-guide-fitting a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 800;
}

.size-guide-fitting a:hover {
  color: var(--gold-dark);
}

[data-theme="dark"] .size-guide-tips p,
[data-theme="dark"] .size-guide-tips li {
  color: #8fa0b5;
}

[data-theme="dark"] .size-guide-growth,
[data-theme="dark"] .size-guide-fitting {
  color: var(--text);
}

[data-theme="dark"] .size-guide-fitting a {
  color: var(--gold);
}

[data-theme="dark"] .size-guide-fitting a:hover {
  color: var(--gold-dark);
}

@media (max-width: 900px) {
  .size-chart-fallback {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .size-chart-stage {
    aspect-ratio: auto;
    min-height: 0;
  }

  .size-chart-diagram {
    min-height: 240px;
  }

  .size-chart-table-wrap {
    max-height: 360px;
  }

  .size-chart-photo:not(.is-hidden) ~ .size-chart-fallback {
    display: none;
  }

  .size-chart-stage:has(.size-chart-photo:not(.is-hidden)) {
    aspect-ratio: 16 / 9;
  }
}

.size-guide-cta {
  margin-top: 28px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow);
}

.size-guide-cta-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 10px;
}

.size-guide-cta-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 auto 28px;
  max-width: 520px;
}

.size-guide-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.size-guide-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(26, 44, 78, 0.1);
}

.size-guide-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 44, 78, 0.16);
}

.size-guide-cta-btn--branches {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.size-guide-cta-btn--branches:hover {
  color: #fff;
  filter: brightness(0.92);
}

.size-guide-cta-btn--whatsapp {
  background: var(--wa-green);
  color: #fff;
  border-color: var(--wa-green);
}

.size-guide-cta-btn--whatsapp:hover {
  background: var(--wa-dark);
  border-color: var(--wa-dark);
  color: #fff;
}

[data-theme="dark"] .size-guide-cta-title {
  color: #e2ecfc;
}

[data-theme="dark"] .size-guide-cta-desc {
  color: #8fa0b5;
}

[data-theme="dark"] .size-guide-cta-btn--branches {
  background: #0e1d35;
  border-color: var(--gold);
}

@media (max-width: 640px) {
  .size-guide-tab {
    min-width: 100%;
  }

  .size-guide-tips,
  .size-guide-cta {
    padding: 22px 18px;
  }

  .size-guide-cta-btn {
    min-width: 100%;
  }
}
