/**
 * Premium Size Guide Modal - CSS Styles
 * 
 * Luxury, Apple-quality modal experience for the shirt size guide.
 * Features: smooth animations, elegant typography, responsive design.
 * 
 * @since 2.1.0
 * @package Sestito\ShirtCustomizer
 */

/* ═══════════════════════════════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES
   ═══════════════════════════════════════════════════════════════════════════ */
.sgm {
  /* Colors */
  --sgm-bg: #ffffff;
  --sgm-bg-subtle: #fafafa;
  --sgm-bg-muted: #f5f5f7;
  --sgm-text: #1d1d1f;
  --sgm-text-secondary: #6e6e73;
  --sgm-text-tertiary: #86868b;
  --sgm-border: rgba(0, 0, 0, 0.08);
  --sgm-border-strong: rgba(0, 0, 0, 0.12);
  --sgm-primary: #0071e3;
  --sgm-primary-hover: #0077ed;
  --sgm-accent: #1d1d1f;
  --sgm-success: #30d158;
  --sgm-overlay: rgba(0, 0, 0, 0.4);
  
  /* Typography */
  --sgm-font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sgm-font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sgm-font-mono: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Monaco, monospace;
  
  /* Spacing */
  --sgm-space-xs: 0.25rem;
  --sgm-space-sm: 0.5rem;
  --sgm-space-md: 1rem;
  --sgm-space-lg: 1.5rem;
  --sgm-space-xl: 2rem;
  --sgm-space-2xl: 3rem;
  
  /* Borders */
  --sgm-radius-sm: 8px;
  --sgm-radius-md: 12px;
  --sgm-radius-lg: 16px;
  --sgm-radius-xl: 20px;
  --sgm-radius-full: 9999px;
  
  /* Shadows */
  --sgm-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --sgm-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --sgm-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --sgm-shadow-xl: 0 24px 80px rgba(0, 0, 0, 0.2);
  
  /* Transitions */
  --sgm-transition-fast: 0.15s ease;
  --sgm-transition-base: 0.25s ease;
  --sgm-transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --sgm-transition-spring: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BASE MODAL STRUCTURE
   ═══════════════════════════════════════════════════════════════════════════ */
.sgm {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sgm-space-lg);
  font-family: var(--sgm-font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  
  /* Hidden by default */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: visibility 0s 0.3s, opacity var(--sgm-transition-slow);
}

.sgm[aria-hidden="false"] {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: visibility 0s, opacity var(--sgm-transition-slow);
}

/* Backdrop with blur */
.sgm__backdrop {
  position: absolute;
  inset: 0;
  background: var(--sgm-overlay);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* Modal Container */
.sgm__container {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: calc(100vh - 3rem);
  background: var(--sgm-bg);
  border-radius: var(--sgm-radius-xl);
  box-shadow: var(--sgm-shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(20px);
  transition: transform var(--sgm-transition-slow);
}

.sgm[aria-hidden="false"] .sgm__container {
  transform: scale(1) translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════════════ */
.sgm__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sgm-space-lg) var(--sgm-space-xl);
  border-bottom: 1px solid var(--sgm-border);
  background: var(--sgm-bg);
  flex-shrink: 0;
}

.sgm__header-content {
  display: flex;
  align-items: center;
  gap: var(--sgm-space-lg);
}

.sgm__brand {
  display: flex;
  align-items: center;
  gap: var(--sgm-space-sm);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--sgm-text-secondary);
}

.sgm__logo {
  opacity: 0.7;
}

.sgm__title {
  font-family: var(--sgm-font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--sgm-text);
  margin: 0;
}

.sgm__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--sgm-bg-muted);
  border: none;
  border-radius: var(--sgm-radius-full);
  color: var(--sgm-text-secondary);
  cursor: pointer;
  transition: all var(--sgm-transition-fast);
}

.sgm__close:hover {
  background: var(--sgm-border-strong);
  color: var(--sgm-text);
}

.sgm__close:active {
  transform: scale(0.95);
}

/* ═══════════════════════════════════════════════════════════════════════════
   NAVIGATION TABS
   ═══════════════════════════════════════════════════════════════════════════ */
.sgm__nav {
  display: flex;
  align-items: center;
  gap: var(--sgm-space-xs);
  padding: var(--sgm-space-md) var(--sgm-space-xl);
  background: var(--sgm-bg-subtle);
  border-bottom: 1px solid var(--sgm-border);
  flex-shrink: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sgm__nav-tab {
  display: flex;
  align-items: center;
  gap: var(--sgm-space-sm);
  padding: var(--sgm-space-sm) var(--sgm-space-md);
  background: transparent;
  border: none;
  border-radius: var(--sgm-radius-md);
  font-family: var(--sgm-font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sgm-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--sgm-transition-fast);
}

.sgm__nav-tab:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--sgm-text);
}

.sgm__nav-tab--active {
  background: var(--sgm-bg);
  color: var(--sgm-text);
  box-shadow: var(--sgm-shadow-sm);
}

.sgm__nav-icon {
  opacity: 0.7;
  flex-shrink: 0;
}

.sgm__nav-tab--active .sgm__nav-icon {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT AREA
   ═══════════════════════════════════════════════════════════════════════════ */
.sgm__content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.sgm__panel {
  padding: var(--sgm-space-xl);
  display: none;
  animation: sgmFadeIn 0.3s ease;
}

.sgm__panel--active {
  display: block;
}

@keyframes sgmFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PANEL: SIZE TABLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Fit Selector */
.sgm__fit-selector {
  display: flex;
  align-items: center;
  gap: var(--sgm-space-md);
  margin-bottom: var(--sgm-space-lg);
}

.sgm__fit-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sgm-text-secondary);
}

.sgm__fit-buttons {
  display: flex;
  gap: var(--sgm-space-xs);
  background: var(--sgm-bg-muted);
  padding: 4px;
  border-radius: var(--sgm-radius-md);
}

.sgm__fit-btn {
  padding: var(--sgm-space-sm) var(--sgm-space-md);
  background: transparent;
  border: none;
  border-radius: var(--sgm-radius-sm);
  font-family: var(--sgm-font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--sgm-text-secondary);
  cursor: pointer;
  transition: all var(--sgm-transition-fast);
}

.sgm__fit-btn:hover {
  color: var(--sgm-text);
}

.sgm__fit-btn--active {
  background: var(--sgm-bg);
  color: var(--sgm-text);
  box-shadow: var(--sgm-shadow-sm);
}

/* Unit Toggle */
.sgm__unit-toggle {
  display: flex;
  align-items: center;
  gap: var(--sgm-space-md);
  margin-bottom: var(--sgm-space-xl);
}

.sgm__unit-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sgm-text-secondary);
}

.sgm__unit-switch {
  display: flex;
  background: var(--sgm-bg-muted);
  padding: 3px;
  border-radius: var(--sgm-radius-sm);
}

.sgm__unit-btn {
  padding: 6px 14px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-family: var(--sgm-font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sgm-text-secondary);
  cursor: pointer;
  transition: all var(--sgm-transition-fast);
}

.sgm__unit-btn:hover {
  color: var(--sgm-text);
}

.sgm__unit-btn--active {
  background: var(--sgm-bg);
  color: var(--sgm-text);
  box-shadow: var(--sgm-shadow-sm);
}

/* Fit Description Card */
.sgm__fit-card {
  margin-bottom: var(--sgm-space-xl);
}

.sgm__fit-info {
  display: none;
  align-items: center;
  gap: var(--sgm-space-xl);
  padding: var(--sgm-space-lg);
  background: linear-gradient(135deg, var(--sgm-bg-subtle) 0%, var(--sgm-bg-muted) 100%);
  border-radius: var(--sgm-radius-lg);
  animation: sgmFadeIn 0.25s ease;
}

.sgm__fit-info--active {
  display: flex;
}

.sgm__fit-visual {
  flex-shrink: 0;
  width: 80px;
  height: 100px;
}

.sgm__fit-silhouette {
  width: 100%;
  height: 100%;
  color: var(--sgm-text);
}

.sgm__fit-silhouette--slim .sgm__shirt-outline {
  transform: scaleX(0.9);
  transform-origin: center;
}

.sgm__fit-silhouette--extraslim .sgm__shirt-outline {
  transform: scaleX(0.8);
  transform-origin: center;
}

.sgm__fit-details {
  flex: 1;
}

.sgm__fit-name {
  font-family: var(--sgm-font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--sgm-text);
  margin: 0 0 var(--sgm-space-sm) 0;
}

.sgm__fit-desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--sgm-text-secondary);
  margin: 0;
}

/* Size Table */
.sgm__table-wrapper {
  display: none;
  overflow-x: auto;
  margin-bottom: var(--sgm-space-xl);
  border-radius: var(--sgm-radius-lg);
  border: 1px solid var(--sgm-border);
  background: var(--sgm-bg);
}

.sgm__table-wrapper--active {
  display: block;
}

.sgm__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.sgm__th {
  padding: var(--sgm-space-md) var(--sgm-space-lg);
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sgm-text-tertiary);
  background: var(--sgm-bg-subtle);
  border-bottom: 1px solid var(--sgm-border);
  white-space: nowrap;
}

.sgm__th--size {
  width: 80px;
  background: var(--sgm-bg-muted);
  position: sticky;
  left: 0;
  z-index: 1;
}

.sgm__row {
  transition: background var(--sgm-transition-fast);
}

.sgm__row:hover {
  background: var(--sgm-bg-subtle);
}

.sgm__row:last-child .sgm__td {
  border-bottom: none;
}

.sgm__td {
  padding: var(--sgm-space-md) var(--sgm-space-lg);
  border-bottom: 1px solid var(--sgm-border);
  color: var(--sgm-text);
  white-space: nowrap;
}

.sgm__td--size {
  background: var(--sgm-bg-subtle);
  position: sticky;
  left: 0;
  z-index: 1;
}

.sgm__size-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  background: var(--sgm-text);
  color: var(--sgm-bg);
  font-family: var(--sgm-font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--sgm-radius-sm);
}

.sgm__value {
  font-family: var(--sgm-font-mono);
  font-weight: 500;
  font-size: 0.9375rem;
}

/* Tip Box */
.sgm__tip {
  display: flex;
  align-items: flex-start;
  gap: var(--sgm-space-md);
  padding: var(--sgm-space-lg);
  background: linear-gradient(135deg, #f5f5f7 0%, #eaeaec 100%);
  border-radius: var(--sgm-radius-md);
  border-left: 3px solid var(--sgm-primary);
}

.sgm__tip-icon {
  flex-shrink: 0;
  color: var(--sgm-primary);
  margin-top: 2px;
}

.sgm__tip-content {
  flex: 1;
}

.sgm__tip-content strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sgm-text);
  margin-bottom: var(--sgm-space-xs);
}

.sgm__tip-content p {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--sgm-text-secondary);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PANEL: HOW TO MEASURE
   ═══════════════════════════════════════════════════════════════════════════ */
.sgm__measure-intro {
  margin-bottom: var(--sgm-space-xl);
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.sgm__section-title {
  font-family: var(--sgm-font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--sgm-text);
  margin: 0 0 var(--sgm-space-md) 0;
}

.sgm__section-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--sgm-text-secondary);
  margin: 0;
}

/* Measurement Diagram */
.sgm__measure-diagram {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--sgm-space-2xl);
  margin-bottom: var(--sgm-space-2xl);
}

.sgm__body-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sgm-space-xl);
  background: var(--sgm-bg-subtle);
  border-radius: var(--sgm-radius-lg);
}

.sgm__body-svg {
  width: 100%;
  max-width: 180px;
  color: var(--sgm-text);
}

.sgm__body-svg .sgm__point-label {
  font-family: var(--sgm-font-mono);
  font-size: 12px;
  font-weight: 700;
  fill: var(--sgm-text);
}

.sgm__measure-point {
  transition: opacity var(--sgm-transition-fast);
}

.sgm__measure-point .sgm__point-dot {
  transition: transform var(--sgm-transition-fast);
}

.sgm__measure-point:hover .sgm__point-dot,
.sgm__measure-point.active .sgm__point-dot {
  transform: scale(1.3);
}

.sgm__measure-line {
  stroke: var(--sgm-primary);
  stroke-width: 2;
  opacity: 0.8;
}

/* Measurement List */
.sgm__measure-list {
  display: flex;
  flex-direction: column;
  gap: var(--sgm-space-md);
}

.sgm__measure-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sgm-space-md);
  padding: var(--sgm-space-md) var(--sgm-space-lg);
  background: var(--sgm-bg);
  border: 1px solid var(--sgm-border);
  border-radius: var(--sgm-radius-md);
  cursor: pointer;
  transition: all var(--sgm-transition-fast);
}

.sgm__measure-item:hover {
  border-color: var(--sgm-border-strong);
  box-shadow: var(--sgm-shadow-sm);
  transform: translateX(4px);
}

.sgm__measure-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--sgm-text);
  color: var(--sgm-bg);
  font-family: var(--sgm-font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--sgm-radius-full);
  flex-shrink: 0;
}

.sgm__measure-content {
  flex: 1;
}

.sgm__measure-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--sgm-text);
  margin: 0 0 4px 0;
}

.sgm__measure-name-en {
  font-weight: 400;
  color: var(--sgm-text-tertiary);
}

.sgm__measure-desc {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--sgm-text-secondary);
  margin: 0 0 var(--sgm-space-sm) 0;
}

.sgm__measure-tip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--sgm-primary);
}

.sgm__measure-tip svg {
  opacity: 0.7;
}

/* Video CTA */
.sgm__video-cta {
  display: flex;
  align-items: center;
  gap: var(--sgm-space-lg);
  padding: var(--sgm-space-lg) var(--sgm-space-xl);
  background: linear-gradient(135deg, var(--sgm-text) 0%, #3a3a3c 100%);
  border-radius: var(--sgm-radius-lg);
  color: var(--sgm-bg);
  cursor: pointer;
  transition: transform var(--sgm-transition-fast), box-shadow var(--sgm-transition-fast);
}

.sgm__video-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--sgm-shadow-lg);
}

.sgm__video-icon {
  flex-shrink: 0;
  opacity: 0.9;
}

.sgm__video-text {
  flex: 1;
}

.sgm__video-text strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.sgm__video-text p {
  font-size: 0.875rem;
  opacity: 0.8;
  margin: 0;
  line-height: 1.4;
}

.sgm__video-arrow {
  flex-shrink: 0;
  opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PANEL: FIT GUIDE
   ═══════════════════════════════════════════════════════════════════════════ */
.sgm__fit-intro {
  text-align: center;
  margin-bottom: var(--sgm-space-2xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Fit Compare Cards */
.sgm__fit-compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sgm-space-lg);
  margin-bottom: var(--sgm-space-2xl);
}

.sgm__fit-compare-card {
  background: var(--sgm-bg);
  border: 1px solid var(--sgm-border);
  border-radius: var(--sgm-radius-lg);
  overflow: hidden;
  transition: all var(--sgm-transition-base);
}

.sgm__fit-compare-card:hover {
  border-color: var(--sgm-border-strong);
  box-shadow: var(--sgm-shadow-md);
  transform: translateY(-4px);
}

.sgm__fit-compare-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sgm-space-xl) var(--sgm-space-lg);
  background: var(--sgm-bg-subtle);
  min-height: 160px;
}

.sgm__shirt-svg {
  width: 70px;
  height: auto;
  color: var(--sgm-text);
  transition: transform var(--sgm-transition-base);
}

.sgm__fit-compare-card:hover .sgm__shirt-svg {
  transform: scale(1.05);
}

.sgm__fit-compare-content {
  padding: var(--sgm-space-lg);
}

.sgm__fit-compare-title {
  font-family: var(--sgm-font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--sgm-text);
  margin: 0 0 var(--sgm-space-sm) 0;
}

.sgm__fit-compare-desc {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--sgm-text-secondary);
  margin: 0 0 var(--sgm-space-md) 0;
}

.sgm__fit-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sgm-space-md) 0;
}

.sgm__fit-features li {
  position: relative;
  padding-left: 18px;
  font-size: 0.8125rem;
  color: var(--sgm-text-secondary);
  margin-bottom: 6px;
}

.sgm__fit-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 6px;
  background: var(--sgm-success);
  border-radius: 50%;
}

.sgm__fit-recommend {
  padding-top: var(--sgm-space-md);
  border-top: 1px solid var(--sgm-border);
}

.sgm__fit-badge {
  display: inline-flex;
  padding: 4px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--sgm-radius-full);
}

.sgm__fit-badge--popular {
  background: rgba(48, 209, 88, 0.15);
  color: #248a3d;
}

.sgm__fit-badge--trending {
  background: rgba(0, 113, 227, 0.1);
  color: var(--sgm-primary);
}

.sgm__fit-badge--exclusive {
  background: rgba(29, 29, 31, 0.08);
  color: var(--sgm-text);
}

/* Body Type Guide */
.sgm__body-guide {
  padding: var(--sgm-space-xl);
  background: var(--sgm-bg-subtle);
  border-radius: var(--sgm-radius-lg);
}

.sgm__body-guide-title {
  font-family: var(--sgm-font-display);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  color: var(--sgm-text);
  margin: 0 0 var(--sgm-space-lg) 0;
}

.sgm__body-types {
  display: flex;
  justify-content: center;
  gap: var(--sgm-space-2xl);
}

.sgm__body-type {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.sgm__body-type-icon {
  width: 50px;
  height: 70px;
  color: var(--sgm-text);
  margin-bottom: var(--sgm-space-sm);
}

.sgm__body-type-icon svg {
  width: 100%;
  height: 100%;
}

.sgm__body-type-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sgm-text);
  margin-bottom: 2px;
}

.sgm__body-type-fit {
  font-size: 0.75rem;
  color: var(--sgm-text-tertiary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.sgm__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sgm-space-md) var(--sgm-space-xl);
  background: var(--sgm-bg);
  border-top: 1px solid var(--sgm-border);
  flex-shrink: 0;
}

.sgm__footer-help {
  display: flex;
  align-items: center;
  gap: var(--sgm-space-sm);
  font-size: 0.8125rem;
  color: var(--sgm-text-secondary);
}

.sgm__footer-help a {
  color: var(--sgm-primary);
  text-decoration: none;
  font-weight: 500;
}

.sgm__footer-help a:hover {
  text-decoration: underline;
}

.sgm__footer-close {
  padding: var(--sgm-space-sm) var(--sgm-space-xl);
  background: var(--sgm-text);
  border: none;
  border-radius: var(--sgm-radius-full);
  font-family: var(--sgm-font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sgm-bg);
  cursor: pointer;
  transition: all var(--sgm-transition-fast);
}

.sgm__footer-close:hover {
  background: #3a3a3c;
}

.sgm__footer-close:active {
  transform: scale(0.98);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
  .sgm__measure-diagram {
    grid-template-columns: 1fr;
  }
  
  .sgm__body-visual {
    display: none;
  }
  
  .sgm__fit-compare {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sgm {
    padding: 0;
    align-items: flex-end;
  }
  
  .sgm__container {
    max-height: 90vh;
    border-radius: var(--sgm-radius-xl) var(--sgm-radius-xl) 0 0;
    transform: translateY(100%);
  }
  
  .sgm[aria-hidden="false"] .sgm__container {
    transform: translateY(0);
  }
  
  .sgm__header {
    padding: var(--sgm-space-md) var(--sgm-space-lg);
  }
  
  .sgm__brand {
    display: none;
  }
  
  .sgm__nav {
    padding: var(--sgm-space-sm) var(--sgm-space-md);
  }
  
  .sgm__nav-tab span {
    display: none;
  }
  
  .sgm__nav-tab {
    padding: var(--sgm-space-sm) var(--sgm-space-md);
  }
  
  .sgm__panel {
    padding: var(--sgm-space-lg);
  }
  
  .sgm__fit-selector {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .sgm__fit-buttons {
    width: 100%;
    overflow-x: auto;
  }
  
  .sgm__fit-btn {
    flex: 1;
    white-space: nowrap;
    justify-content: center;
  }
  
  .sgm__fit-info {
    flex-direction: column;
    text-align: center;
  }
  
  .sgm__fit-compare {
    grid-template-columns: 1fr;
  }
  
  .sgm__body-types {
    flex-direction: column;
    gap: var(--sgm-space-lg);
  }
  
  .sgm__footer {
    flex-direction: column;
    gap: var(--sgm-space-md);
    padding: var(--sgm-space-lg);
  }
  
  .sgm__footer-close {
    width: 100%;
    padding: var(--sgm-space-md);
  }
  
  .sgm__video-cta {
    flex-direction: column;
    text-align: center;
  }
  
  .sgm__video-arrow {
    display: none;
  }
}

@media (max-width: 480px) {
  .sgm__unit-toggle {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .sgm__measure-item {
    padding: var(--sgm-space-sm) var(--sgm-space-md);
  }
  
  .sgm__measure-desc {
    font-size: 0.75rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BODY SCROLL LOCK
   ═══════════════════════════════════════════════════════════════════════════ */
body.sgm-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════════════════════ */
@media print {
  .sgm {
    position: static;
    visibility: visible;
    opacity: 1;
  }
  
  .sgm__backdrop {
    display: none;
  }
  
  .sgm__container {
    box-shadow: none;
    max-height: none;
  }
  
  .sgm__close,
  .sgm__footer-close,
  .sgm__video-cta {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HIGH CONTRAST / REDUCED MOTION
   ═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .sgm,
  .sgm__container,
  .sgm__panel,
  .sgm *  {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: high) {
  .sgm {
    --sgm-border: rgba(0, 0, 0, 0.3);
    --sgm-border-strong: rgba(0, 0, 0, 0.5);
  }
  
  .sgm__fit-btn--active,
  .sgm__unit-btn--active,
  .sgm__nav-tab--active {
    border: 2px solid var(--sgm-text);
  }
}

/* Size Guide Trigger Link in Product Page */
.product-sizes__note {
  margin-top: 16px;
  font-size: 14px;
}

.ssc-sizeguide-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, rgba(201, 169, 89, 0.08) 0%, rgba(201, 169, 89, 0.04) 100%);
  border: 1px solid rgba(201, 169, 89, 0.3);
  border-radius: 8px;
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ssc-sizeguide-trigger:hover {
  background: linear-gradient(135deg, rgba(201, 169, 89, 0.15) 0%, rgba(201, 169, 89, 0.08) 100%);
  border-color: rgba(201, 169, 89, 0.5);
  box-shadow: 0 2px 8px rgba(201, 169, 89, 0.15);
  transform: translateY(-1px);
  text-decoration: none;
  color: #1a1a1a;
}

.ssc-sizeguide-trigger:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.ssc-sizeguide-trigger svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: #c9a959;
  transition: transform 0.2s ease;
}

.ssc-sizeguide-trigger:hover svg {
  transform: scale(1.05);
}

.ssc-sizeguide-trigger::after {
  content: '→';
  font-size: 14px;
  color: #c9a959;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.ssc-sizeguide-trigger:hover::after {
  transform: translateX(3px);
}

/* =============================================
   FABRIC CARD & MODAL - Luxury Apple-like Design
   ============================================= */

/* Fabric Section */
.product-fabric-section {
  padding: 80px 24px;
  background: linear-gradient(180deg, #fafaf9 0%, #f5f5f4 100%);
}

.product-fabric__inner {
  max-width: 900px;
  margin: 0 auto;
}

/* Fabric Card - Clickable */
.product-fabric-card {
  display: flex;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.03),
    0 8px 24px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.product-fabric-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 16px 48px rgba(0, 0, 0, 0.04);
  border-color: rgba(201, 169, 89, 0.2);
}

.product-fabric-card__image {
  flex: 0 0 280px;
  position: relative;
  background: #f8f6f3;
  overflow: hidden;
}

.product-fabric-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-fabric-card:hover .product-fabric-card__image img {
  transform: scale(1.05);
}

.product-fabric-card__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #1a1a1a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.product-fabric-card__badge svg {
  width: 12px;
  height: 12px;
  color: #c9a959;
}

.product-fabric-card__content {
  flex: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-fabric-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.product-fabric-card__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c9a959;
  margin: 0 0 8px 0;
}

.product-fabric-card__title {
  font-size: 22px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 4px 0;
  letter-spacing: -0.01em;
}

.product-fabric-card__code {
  font-size: 13px;
  color: #86868b;
  font-family: 'SF Mono', Monaco, monospace;
  margin: 0;
}

.product-fabric-card__action {
  flex-shrink: 0;
}

.product-fabric-card__view {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #c9a959;
  transition: gap 0.2s ease;
}

.product-fabric-card:hover .product-fabric-card__view {
  gap: 10px;
}

.product-fabric-card__view svg {
  transition: transform 0.2s ease;
}

.product-fabric-card:hover .product-fabric-card__view svg {
  transform: translateX(2px);
}

.product-fabric-card__composition {
  font-size: 15px;
  color: #424245;
  line-height: 1.6;
  margin: 0 0 16px 0;
}

.product-fabric-card__attrs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-fabric-card__attr {
  display: inline-block;
  padding: 6px 14px;
  background: #f5f5f7;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  color: #1d1d1f;
}

/* Fabric Modal - Premium Design */
.fabric-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fabric-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.fabric-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.fabric-modal__container {
  position: relative;
  display: flex;
  width: 95%;
  max-width: 960px;
  max-height: 90vh;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 
    0 24px 48px rgba(0, 0, 0, 0.15),
    0 8px 16px rgba(0, 0, 0, 0.1);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.fabric-modal.is-open .fabric-modal__container {
  transform: scale(1) translateY(0);
}

.fabric-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fabric-modal__close:hover {
  background: #fff;
  transform: scale(1.05);
}

.fabric-modal__close svg {
  width: 20px;
  height: 20px;
  color: #1a1a1a;
}

.fabric-modal__content {
  display: flex;
  width: 100%;
}

.fabric-modal__image {
  flex: 0 0 50%;
  position: relative;
  background: #f8f6f3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.fabric-modal__image img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: cover;
  border-radius: 16px;
}

.fabric-modal__badge {
  position: absolute;
  bottom: 40px;
  left: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #c9a959 0%, #b8944a 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(201, 169, 89, 0.3);
}

.fabric-modal__details {
  flex: 1;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.fabric-modal__code {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c9a959;
  margin-bottom: 8px;
  font-family: 'SF Mono', Monaco, monospace;
}

.fabric-modal__title {
  font-size: 28px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 20px 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.fabric-modal__price {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e5e5;
}

.fabric-modal__price-current {
  font-size: 26px;
  font-weight: 600;
  color: #1a1a1a;
}

.fabric-modal__price-original {
  font-size: 18px;
  color: #86868b;
  text-decoration: line-through;
}

.fabric-modal__price-discount {
  padding: 4px 10px;
  background: #dc2626;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
}

.fabric-modal__composition {
  font-size: 15px;
  color: #424245;
  line-height: 1.7;
  margin-bottom: 24px;
}

.fabric-modal__attributes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.fabric-modal__attr {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: #f5f5f7;
  border-radius: 12px;
}

.fabric-modal__attr-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #86868b;
}

.fabric-modal__attr-value {
  font-size: 14px;
  font-weight: 500;
  color: #1d1d1f;
}

.fabric-modal__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: auto;
  padding: 16px 32px;
  background: linear-gradient(135deg, #c9a959 0%, #b8944a 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(201, 169, 89, 0.25);
}

.fabric-modal__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 169, 89, 0.35);
}

.fabric-modal__cta svg {
  width: 18px;
  height: 18px;
}

/* Responsive */
@media (max-width: 768px) {
  .product-fabric-card {
    flex-direction: column;
  }
  
  .product-fabric-card__image {
    flex: none;
    height: 200px;
  }
  
  .product-fabric-card__content {
    padding: 24px;
  }
  
  .product-fabric-card__header {
    flex-direction: column;
    gap: 12px;
  }
  
  .fabric-modal__container {
    flex-direction: column;
    max-height: 95vh;
    border-radius: 20px 20px 0 0;
    margin-top: auto;
  }
  
  .fabric-modal__image {
    flex: none;
    height: 250px;
    padding: 16px;
  }
  
  .fabric-modal__image img {
    max-height: 100%;
  }
  
  .fabric-modal__details {
    padding: 28px 24px;
  }
  
  .fabric-modal__title {
    font-size: 22px;
  }
  
  .fabric-modal__attributes {
    grid-template-columns: 1fr;
  }
}
