/* ==========================================================================
   Fit Finder — LBO-style size recommendation modal
   ========================================================================== */

.ff-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.ff-overlay.active { display: flex; opacity: 1; }

.ff-modal {
  background: #fff;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  border-radius: 2px;
}
.ff-overlay.active .ff-modal { transform: translateY(0); }

/* Header with close */
.ff-header {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ff-header__back,
.ff-header__close {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
}
.ff-header__back { visibility: hidden; }
.ff-header__back.visible { visibility: visible; }
.ff-header__title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #1a1a1a;
}

/* Product image */
.ff-product {
  padding: 20px 16px 8px;
  text-align: center;
}
.ff-product__img {
  width: 110px;
  height: 140px;
  object-fit: cover;
  background: #f5f5f5;
  margin: 0 auto;
  display: block;
}
.ff-product__brand {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #888;
  margin-top: 10px;
}
.ff-product__name {
  font-size: 13px;
  color: #1a1a1a;
  margin-top: 2px;
  font-weight: 500;
}

/* Step container */
.ff-step {
  padding: 16px 20px 24px;
  display: none;
}
.ff-step.active { display: block; }

.ff-step__title {
  font-size: 22px;
  font-weight: 500;
  color: #1a1a1a;
  text-align: center;
  font-family: Georgia, 'Times New Roman', serif;
  margin-bottom: 4px;
}
.ff-step__subtitle {
  font-size: 12px;
  color: #888;
  text-align: center;
  margin-bottom: 24px;
}

/* Unit switch */
.ff-unit-switch {
  display: inline-flex;
  background: #f2f2f2;
  border-radius: 100px;
  padding: 3px;
  margin-bottom: 10px;
}
.ff-unit-switch__btn {
  background: none;
  border: none;
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #999;
  cursor: pointer;
  border-radius: 100px;
  transition: all 0.2s;
}
.ff-unit-switch__btn.active {
  background: #1a1a1a;
  color: #fff;
}

/* Measurement block */
.ff-measure {
  margin-bottom: 24px;
}
.ff-measure__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ff-measure__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #888;
}
.ff-measure__value {
  font-size: 28px;
  font-weight: 500;
  color: #1a1a1a;
  font-family: Georgia, 'Times New Roman', serif;
}
.ff-measure__value-unit {
  font-size: 13px;
  color: #888;
  margin-left: 4px;
  font-family: inherit;
}

/* Custom slider */
.ff-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: #e5e5e5;
  border-radius: 2px;
  outline: none;
  margin: 0;
}
.ff-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1a1a1a;
  cursor: pointer;
  border: 4px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: transform 0.15s;
}
.ff-slider::-webkit-slider-thumb:active { transform: scale(1.15); }
.ff-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1a1a1a;
  cursor: pointer;
  border: 4px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.ff-slider__range {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #bbb;
  margin-top: 6px;
  font-weight: 600;
}

/* Fit preference cards */
.ff-fit-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}
.ff-fit-card {
  border: 1.5px solid #e5e5e5;
  background: #fff;
  padding: 18px 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  border-radius: 2px;
}
.ff-fit-card:hover { border-color: #999; }
.ff-fit-card.selected {
  border-color: #1a1a1a;
  background: #1a1a1a;
  color: #fff;
}
.ff-fit-card__icon {
  font-size: 28px;
  margin-bottom: 8px;
  display: block;
}
.ff-fit-card__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Primary button */
.ff-btn {
  display: block;
  width: 100%;
  padding: 16px;
  background: #d6272e;
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  margin-top: 8px;
}
.ff-btn:hover { background: #b81f25; }
.ff-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}
.ff-btn--secondary {
  background: #fff;
  color: #1a1a1a;
  border: 1.5px solid #1a1a1a;
}
.ff-btn--secondary:hover { background: #1a1a1a; color: #fff; }

/* Result step */
.ff-result {
  text-align: center;
  padding: 8px 0;
}
.ff-result__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #888;
  margin-bottom: 6px;
}
.ff-result__size {
  font-size: 72px;
  font-weight: 500;
  color: #1a1a1a;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1;
  margin-bottom: 12px;
}
.ff-result__msg {
  font-size: 13px;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.5;
}
.ff-confidence {
  margin: 0 auto 20px;
  max-width: 280px;
}
.ff-confidence__label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  margin-bottom: 6px;
}
.ff-confidence__bar {
  height: 4px;
  background: #f0f0f0;
  border-radius: 2px;
  overflow: hidden;
}
.ff-confidence__fill {
  height: 100%;
  background: #1a1a1a;
  transition: width 0.8s ease;
}
.ff-social {
  font-size: 11px;
  color: #999;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ff-social::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  animation: ffPulse 2s infinite;
}
@keyframes ffPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.ff-restart {
  background: none;
  border: none;
  font-size: 11px;
  color: #888;
  text-decoration: underline;
  cursor: pointer;
  padding: 12px;
  font-family: inherit;
  margin-top: 4px;
  width: 100%;
  text-align: center;
}

/* Trigger button in PDP */
.fit-finder-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  margin-left: 12px;
}
.fit-finder-trigger svg {
  width: 14px;
  height: 14px;
}

/* Body lock */
body.ff-open { overflow: hidden; }

/* ---------- Shoe-specific elements ---------- */
.ff-method-tabs {
  display: flex;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 20px;
}
.ff-method-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 12px 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #999;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  transition: color 0.2s;
}
.ff-method-tab.active {
  color: #1a1a1a;
}
.ff-method-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #1a1a1a;
}

.ff-method-panel { display: none; }
.ff-method-panel.active { display: block; }

.ff-field { margin-bottom: 16px; }
.ff-field__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #888;
  margin-bottom: 8px;
}
.ff-select {
  width: 100%;
  padding: 14px 12px;
  border: 1.5px solid #e5e5e5;
  background: #fff;
  font-size: 15px;
  color: #1a1a1a;
  font-family: inherit;
  cursor: pointer;
  border-radius: 2px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.ff-select:focus {
  outline: none;
  border-color: #1a1a1a;
}

.ff-hint {
  font-size: 11px;
  color: #999;
  line-height: 1.5;
  margin-top: 10px;
  font-style: italic;
}

.ff-result__conversion {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #888;
  margin-bottom: 16px;
  margin-top: -4px;
}
