/**
 * Quote Flow Wizard Styles
 * Mobile-first, following design system from design-system.md
 */

:root {
  --color-blue-primary: #003366;
  --color-blue-light: #E6F0FA;
  --color-orange-primary: #FF6600;
  --color-orange-light: #FFF4E6;
}

/* ===== LAYOUT ===== */
.quote-flow-container {
  min-height: calc(100vh - 200px);
}

.step-container {
  display: none;
}

.step-container.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

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

/* ===== PROGRESS BAR ===== */
.progress-container {
  max-width: 600px;
  margin: 0 auto;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: #E5E7EB;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--color-blue-primary);
  transition: width 0.3s ease-in-out;
  border-radius: 9999px;
}

/* ===== STEP CONTENT ===== */
.step-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  .step-content {
    padding: 3rem;
  }
}

.step-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
  text-align: center;
}

@media (min-width: 768px) {
  .step-title {
    font-size: 2.25rem;
  }
}

.step-description {
  font-size: 1rem;
  color: #6B7280;
  text-align: center;
  margin-bottom: 2rem;
}

/* ===== STEP 1: PROPERTY TYPE CARDS ===== */
.property-type-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .property-type-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.property-card {
  background: white;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.property-card:hover {
  border-color: var(--color-blue-primary);
  box-shadow: 0 4px 6px rgba(0, 51, 102, 0.1);
}

.property-card.selected {
  border-color: var(--color-blue-primary);
  background: rgba(0, 51, 102, 0.05);
}

.property-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.property-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.property-description {
  font-size: 0.875rem;
  color: #6B7280;
  line-height: 1.5;
}

/* ===== STEP 1: JOURNEY PREVIEW STRIP ===== */
.journey-preview {
  background: #F9FAFB; /* design system --gray-50 */
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 0 auto 1.5rem;
  max-width: 700px;
  text-align: center;
  overflow: hidden; /* contain child overflow */
}

.journey-preview-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9CA3AF;
  margin-bottom: 0.6rem;
}

.journey-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap; /* keep on one line; scroll if needed */
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.journey-steps::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.journey-step {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.journey-step-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.journey-step-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
}

.journey-step-divider {
  font-size: 0.75rem;
  color: #D1D5DB;
  padding: 0 0.2rem;
}

.journey-preview-time {
  font-size: 0.72rem;
  color: #9CA3AF;
  margin: 0;
}

/* ===== STEP 2: ROOM SELECTION ===== */
.room-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .room-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .room-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1280px) {
  .room-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.room-checkbox {
  background: white;
  border: 2px solid #E5E7EB;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.room-checkbox:hover {
  border-color: var(--color-blue-primary);
  box-shadow: 0 2px 4px rgba(0, 51, 102, 0.1);
}

.room-checkbox.selected {
  border-color: var(--color-blue-primary);
  background: rgba(0, 51, 102, 0.05);
}

.room-checkbox.selected::after {
  content: '✓';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--color-blue-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.room-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.room-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
}

.stairs-badge {
  font-size: 0.75rem;
  color: #FF6600;
  background: #FFF4E6;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.5rem;
  font-weight: 600;
}

/* Room quantity controls (for multi-instance rooms like Bedroom ×2) */
.room-qty-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.qty-btn {
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid #D1D5DB;
  border-radius: 4px;
  background: white;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  line-height: 1;
  padding: 0;
}

.qty-btn:hover {
  background: var(--color-blue-primary);
  color: white;
  border-color: var(--color-blue-primary);
}

.qty-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.3);
  border-color: var(--color-blue-primary);
}

.qty-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-blue-primary);
  min-width: 1.25rem;
  text-align: center;
}

.remove-custom-room {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  width: 1.5rem;
  height: 1.5rem;
  background: #EF4444;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-custom-room:hover {
  background: #DC2626;
}

.custom-room-section {
  margin-bottom: 2rem;
}

.btn-add-custom {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 2px dashed #D1D5DB;
  background: white;
  color: #6B7280;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-custom:hover {
  border-color: var(--color-blue-primary);
  color: var(--color-blue-primary);
}

.custom-room-input {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.custom-room-input .form-input {
  flex: 1;
  min-width: 200px;
}

.btn-primary-small,
.btn-outline-small {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary-small {
  background: var(--color-blue-primary);
  color: white;
  border: none;
}

.btn-primary-small:hover {
  background: #002244;
}

.btn-outline-small {
  background: white;
  color: #6B7280;
  border: 1px solid #D1D5DB;
}

.btn-outline-small:hover {
  background: #F3F4F6;
}

/* ===== STEP 3: MEASUREMENTS ===== */
.measurements-form {
  margin-bottom: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.measurement-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #E5E7EB;
}

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

.measurement-label {
  font-size: 1rem;
  font-weight: 500;
  color: #111827;
  flex: 1;
}

.stairs-note {
  display: block;
  font-size: 0.75rem;
  color: #FF6600;
  font-weight: 400;
  margin-top: 0.25rem;
}

.measurement-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.measurement-input {
  width: 100px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 1rem;
  text-align: right;
}

.measurement-input:focus {
  outline: none;
  border-color: var(--color-blue-primary);
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.measurement-unit {
  font-size: 0.875rem;
  color: #6B7280;
  white-space: nowrap;
}

.total-sqft-display {
  background: var(--color-blue-light);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

.total-sqft-label {
  font-size: 1rem;
  color: #6B7280;
  margin-right: 0.5rem;
}

.total-sqft-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-blue-primary);
}

/* ===== STEP 4: CARPET SELECTION ===== */
.carpet-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
  margin-bottom: 0.5rem;
}

.filter-select,
.filter-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 0.875rem;
}

.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

/* ===== CARPET EDUCATION CALLOUT ===== */
.carpet-education-callout {
  background: linear-gradient(135deg, #E6F0FA 0%, #F0F7FF 100%);
  border: 1px solid #B3D4F0;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.carpet-education-callout.dismissed {
  display: none;
}

.education-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.education-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}

.education-intro {
  flex: 1;
}

.education-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-blue-primary, #003366);
  margin: 0 0 0.125rem;
}

.education-subtitle {
  font-size: 0.8125rem;
  color: #4B5563;
  margin: 0;
}

.education-dismiss {
  background: none;
  border: none;
  color: #9CA3AF;
  font-size: 1.125rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  border-radius: 4px;
  flex-shrink: 0;
}

.education-dismiss:hover {
  color: #4B5563;
  background: rgba(0, 0, 0, 0.05);
}

.education-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.education-card {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  background: white;
  border-radius: 8px;
  padding: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.education-card-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1.3;
}

.education-card strong {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 0.125rem;
}

.education-card p {
  font-size: 0.75rem;
  color: #6B7280;
  margin: 0;
  line-height: 1.4;
}

.education-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.education-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-blue-primary, #003366);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.education-link:hover {
  text-decoration: underline;
  color: #004C99;
}

.education-separator {
  color: #D1D5DB;
  font-size: 0.75rem;
}

@media (min-width: 768px) {
  .carpet-education-callout {
    padding: 1.5rem;
  }

  .education-cards {
    flex-direction: row;
  }

  .education-card {
    flex: 1;
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }

  .education-card-icon {
    font-size: 1.5rem;
  }
}

.carpet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .carpet-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .carpet-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .carpet-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.carpet-card {
  background: white;
  border: 2px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.carpet-card:hover {
  border-color: var(--color-blue-primary);
  box-shadow: 0 4px 6px rgba(0, 51, 102, 0.1);
}

.carpet-card.selected {
  border-color: var(--color-blue-primary);
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.carpet-image {
  aspect-ratio: 3 / 4;
  background: #F3F4F6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.carpet-card-image-container {
  position: relative;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carpet-placeholder {
  color: #9CA3AF;
  font-size: 0.875rem;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

/* Skeleton shimmer loading animation for carpet images */
.skeleton-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.5rem;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== RUNNING PRICE TRACKER ===== */
.price-tracker {
  position: sticky;
  bottom: 0;
  z-index: 40;
  margin: 0 -1rem;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.price-tracker.hidden {
  display: none;
}

.price-tracker-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #003366 0%, #004488 100%);
  color: white;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
}

.price-tracker-left {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-shrink: 0;
}

.price-tracker-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.price-tracker-amount {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.price-tracker-right {
  text-align: right;
  min-width: 0;
}

.price-tracker-detail {
  font-size: 0.7rem;
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Desktop: non-sticky, inline card style */
@media (min-width: 768px) {
  .price-tracker {
    position: relative;
    margin: 0;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
  }

  .price-tracker-inner {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.15);
    padding: 0.875rem 1.5rem;
  }

  .price-tracker-amount {
    font-size: 1.5rem;
  }
}

/* Add bottom padding to body when price tracker is sticky (mobile) */
@media (max-width: 767px) {
  .price-tracker-active {
    padding-bottom: 4rem;
  }
}

/* Carousel Controls */
.carousel-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  padding: 16px 8px 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.carpet-card:hover .carousel-controls {
  opacity: 1;
}

.carousel-btn {
  background: rgba(0, 51, 102, 0.8);
  color: white;
  border: none;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding: 0;
}

.carousel-btn:hover {
  background: rgba(0, 51, 102, 1);
}

.carousel-dots {
  display: flex;
  gap: 4px;
}

.carousel-dot {
  background: rgba(255, 255, 255, 0.5);
  border: none;
  border-radius: 50%;
  width: 8px;
  height: 8px;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.carousel-dot.active {
  background: white;
}

.carpet-details {
  padding: 1rem;
}

.carpet-name {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.carpet-fiber-badge {
  display: inline-block;
  font-size: 0.75rem;
  background: #E6F0FA;
  color: #003366;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.carpet-durability {
  font-size: 0.875rem;
  color: #FBBF24;
  margin-bottom: 0.5rem;
}

.carpet-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-blue-primary);
}

.price-unit {
  font-size: 0.875rem;
  color: #6B7280;
  font-weight: 400;
}

/* "Choose Color" button on carpet cards */
.btn-choose-color {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-blue-primary);
  background: var(--color-blue-light);
  border: 1px solid var(--color-blue-primary);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-choose-color:hover {
  background: var(--color-blue-primary);
  color: #fff;
}
.btn-choose-color:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.3);
}
.carpet-card.selected .btn-choose-color {
  background: var(--color-blue-primary);
  color: #fff;
}

.loading-spinner,
.no-results,
.error-message {
  text-align: center;
  padding: 3rem;
  color: #6B7280;
}

/* ===== STEP 5 & 6: FORMS ===== */
.address-form,
.contact-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group-small {
  flex: 0 0 auto;
  width: 100px;
}

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

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
  margin-bottom: 0.5rem;
}

.required {
  color: #EF4444;
}

.required-indicator {
  color: #EF4444;
  font-weight: 600;
  margin-left: 0.25rem;
  display: inline;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 1rem;
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-blue-primary);
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.form-input::placeholder {
  color: #9CA3AF;
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

.radio-group {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.radio-label input[type="radio"] {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
}

/* ===== STEP 7: REVIEW ===== */
.review-section {
  background: #F9FAFB;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.review-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
}

.edit-btn {
  color: var(--color-blue-primary);
  background: none;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
}

.edit-btn:hover {
  color: #002244;
}

.review-content {
  color: #374151;
  line-height: 1.75;
}

.review-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.review-list li {
  padding: 0.25rem 0;
}

.review-total {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #D1D5DB;
  font-weight: 600;
  color: #111827;
}

.review-carpet-details strong {
  color: #111827;
}

.pricing-section {
  background: var(--color-blue-light);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.pricing-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
}

.pricing-breakdown {
  margin-bottom: 1rem;
}

.pricing-line {
  padding: 0.5rem 0;
  color: #374151;
}

.pricing-breakdown-list {
  list-style: none;
  padding-left: 1rem;
  margin: 0.5rem 0;
}

.pricing-breakdown-list li {
  padding: 0.25rem 0;
  color: #6B7280;
  font-size: 0.875rem;
}

.pricing-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 2px solid var(--color-blue-primary);
  margin-top: 1rem;
}

.pricing-total-label {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
}

.pricing-total-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-blue-primary);
}

.terms-section {
  margin-bottom: 1.5rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  cursor: pointer;
}

.checkbox-label a {
  color: var(--color-blue-primary);
  text-decoration: underline;
}

.submit-note {
  text-align: center;
  color: #6B7280;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* ===== ACTION BUTTONS ===== */
.step-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-continue,
.btn-submit {
  background: var(--color-blue-primary);
  color: white;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 51, 102, 0.2);
}

.btn-continue:hover:not(:disabled),
.btn-submit:hover:not(:disabled) {
  background: #002244;
  box-shadow: 0 4px 6px rgba(0, 51, 102, 0.3);
}

.btn-continue:disabled,
.btn-submit:disabled {
  background: #9CA3AF;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-back {
  background: white;
  color: #6B7280;
  padding: 0.875rem 2rem;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-back:hover {
  background: #F3F4F6;
  border-color: #9CA3AF;
}

.hidden {
  display: none !important;
}

/* ===== ICONS ===== */
.icon-sm {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-block;
  vertical-align: middle;
}

/* ===== COLORWAY MODAL STYLES (Phase 2) ===== */

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 95vw;
  max-height: 85vh;
  overflow-y: auto;
  z-index: 1001;
  animation: modalSlideIn 0.3s ease-out;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  position: relative;
  padding: 32px;
}

.modal-header {
  margin-bottom: 24px;
}

.modal-header h3 {
  margin: 0 0 16px 0;
  font-size: 24px;
  font-weight: 600;
  color: #003366;
}

.style-info-recap {
  background: #f9fafb;
  padding: 16px;
  border-left: 4px solid #003366;
  border-radius: 4px;
  font-size: 14px;
  color: #555;
}

.style-info-recap strong {
  font-size: 18px;
  color: #003366;
  display: block;
  margin-bottom: 8px;
}

.specs-text {
  font-size: 13px;
  color: #666;
  margin: 4px 0;
  line-height: 1.4;
}

.close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  transition: all 0.2s;
}

.close-button:hover {
  background: #f0f0f0;
  color: #333;
}

/* ===== COLORWAY GRID STYLES ===== */

.colorway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.colorway-item {
  cursor: pointer;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
  background: white;
  padding-bottom: 0;
}

.colorway-item:hover {
  border-color: #003366;
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.15);
  transform: translateY(-2px);
}

.colorway-item.selected {
  border-color: #ff6600;
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.2);
  background-color: rgba(255, 102, 0, 0.03);
}

.colorway-item.selected .colorway-name {
  color: #ff6600;
  font-weight: 600;
}

/* ===== MODAL FOOTER ===== */

.modal-footer {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  justify-content: flex-end;
}

.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: #003366;
  color: white;
}

.btn-primary:hover {
  background: #002244;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
}

.btn-secondary {
  background: #e5e7eb;
  color: #333;
}

.btn-secondary:hover {
  background: #d1d5db;
}

/* ===== CARPET GRID ENHANCEMENT ===== */

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

.carpet-card {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  display: flex;
  flex-direction: column;
}

.carpet-card:hover {
  border-color: #003366;
  box-shadow: 0 8px 16px rgba(0, 51, 102, 0.15);
  transform: translateY(-4px);
}

.carpet-card.selected {
  border-color: #ff6600;
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.2);
}

.carpet-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #f0f0f0;
}

.carpet-image.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.carpet-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.carpet-name {
  font-weight: 600;
  font-size: 15px;
  color: #003366;
  margin: 0 0 4px 0;
}

.carpet-price {
  font-size: 18px;
  font-weight: 700;
  color: #ff6600;
  margin: 4px 0;
}

.carpet-specs {
  font-size: 12px;
  color: #666;
  margin: 8px 0 0 0;
  flex-grow: 1;
  line-height: 1.3;
}

.colorway-count {
  font-size: 11px;
  background: #f0f0f0;
  color: #666;
  padding: 6px 8px;
  border-radius: 4px;
  margin-top: 8px;
  border-top: 1px solid #e5e7eb;
  padding-top: 8px;
}

/* ===== INTERACTIVE STATES ===== */

/* Colorway Item States */
.colorway-item {
  transition: all 0.2s ease-out;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  position: relative;
}

.colorway-item:hover {
  border-color: #003366;
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.15);
  transform: translateY(-2px);
}

.colorway-item.selected {
  border-color: #ff6600;
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.2);
  background-color: rgba(255, 102, 0, 0.03);
}

.colorway-item.selected .colorway-name {
  color: #ff6600;
  font-weight: 600;
}

/* Carpet Card States */
.carpet-card {
  transition: all 0.2s ease-out;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  position: relative;
}

.carpet-card:hover {
  border-color: #003366;
  box-shadow: 0 8px 16px rgba(0, 51, 102, 0.1);
  transform: translateY(-4px);
}

.carpet-card.selected {
  border-color: #ff6600;
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.2);
  background-color: rgba(255, 102, 0, 0.02);
}

/* Button States */
.btn-primary,
.btn-secondary {
  transition: all 0.2s ease-out;
}

.btn-primary:hover {
  background-color: #002244;
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary:hover {
  border-color: #003366;
  background-color: #f9fafb;
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.1);
}

/* Close Button States */
.close-button {
  transition: all 0.2s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: #666;
}

.close-button:hover {
  background: #f0f0f0;
  color: #333;
}

.close-button:active {
  background: #e0e0e0;
}

/* ===== ANIMATIONS ===== */

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* ===== CARPET FILTERS ===== */
.carpet-filters {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.filters-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.btn-clear-filters {
  padding: 6px 14px;
  background-color: white;
  color: #6B7280;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-clear-filters:hover {
  background-color: #F3F4F6;
  border-color: #9CA3AF;
  color: #374151;
}

.btn-clear-filters:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.2);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}

.filter-select,
.filter-input {
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background-color: white;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-help-text {
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
  font-style: italic;
}

.filters-presets {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--color-blue-light, #E6F0FA);
  border-radius: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  border: 1px solid rgba(0, 51, 102, 0.1);
}

.presets-label {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  margin-right: 4px;
}

.preset-btn {
  padding: 8px 16px;
  background-color: #f3f4f6;
  border: 2px solid #d1d5db;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.preset-btn:hover {
  background-color: #e5e7eb;
  border-color: #9ca3af;
}

.preset-btn.active {
  background-color: var(--color-blue-primary);
  color: white;
  border-color: var(--color-blue-primary);
}

.preset-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.3);
}

.filters-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: #6b7280;
}

/* Advanced Filters collapsible <details> element */
.advanced-filters-details {
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
}

.advanced-filters-details summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: #F9FAFB;
  cursor: pointer;
  user-select: none;
  list-style: none; /* hide default triangle */
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-blue-primary);
  transition: background 0.15s;
}

.advanced-filters-details summary::-webkit-details-marker {
  display: none; /* hide default triangle Safari */
}

.advanced-filters-details summary::before {
  content: '▶';
  font-size: 0.6rem;
  transition: transform 0.2s;
  color: var(--color-blue-primary);
  opacity: 0.6;
}

.advanced-filters-details[open] summary::before {
  transform: rotate(90deg);
}

.advanced-filters-details summary:hover {
  background: var(--color-blue-light);
}

.advanced-filters-details summary:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(0, 51, 102, 0.4);
}

.advanced-filters-details[open] summary {
  border-bottom: 1px solid #E5E7EB;
}

.advanced-filters-details .filters-grid {
  padding: 1rem;
}

.results-count {
  font-weight: 500;
  color: #1f2937;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */

@media (max-width: 768px) {
  .carpet-filters {
    padding: 16px;
  }

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

  .filters-presets {
    flex-direction: column;
    align-items: flex-start;
  }

  .preset-btn {
    width: 100%;
    text-align: center;
  }

  .modal {
    max-width: 95vw;
    width: 95vw;
  }

  .modal-content {
    padding: 20px;
  }

  .colorway-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
  }

  .carpet-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  .modal-footer {
    flex-direction: column;
    gap: 8px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .modal-content {
    padding: 16px;
  }

  .modal-header h3 {
    font-size: 18px;
  }

  .colorway-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .carpet-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 375px) {
  .step-content {
    padding: 1.5rem;
  }

  .step-title {
    font-size: 1.5rem;
  }

  .property-card {
    padding: 1.5rem 1rem;
  }
}

/* ===== STEP HEADER WITH ACTIONS ===== */
.step-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .step-header-actions {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* Tertiary Button - Start Fresh */
.btn-tertiary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-tertiary:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
}

.btn-tertiary:active {
  background: #d1d5db;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 12px;
}

@media (max-width: 640px) {
  .btn-tertiary {
    width: 100%;
    padding: 10px;
  }
}

/* Visualize Button on Carpet Card */
.visualize-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-blue-primary);
  border: 1px solid var(--color-blue-primary);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background-color 0.2s;
  z-index: 10;
}

.carpet-card:hover .visualize-btn {
  opacity: 1;
}

.visualize-btn:hover {
  background: var(--color-blue-primary);
  color: white;
}

/* ===== DIMENSIONS INPUTS (STEP 3 UPDATE) ===== */
.measurement-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 0.75rem;
}

.room-sqft-display {
  font-size: 0.875rem;
  color: #6B7280;
  background: #F3F4F6;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.dimensions-inputs {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  width: 100%;
}

.dimensions-inputs .input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dimensions-inputs .sub-label {
  font-size: 0.75rem;
  color: #6B7280;
  margin-bottom: 0.25rem;
}

.dimension-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 1rem;
  text-align: center;
}

.dimension-input:focus {
  outline: none;
  border-color: var(--color-blue-primary);
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.multiply-symbol {
  font-size: 1.25rem;
  color: #9CA3AF;
  padding-bottom: 0.5rem;
}

@media (max-width: 480px) {
  .measurement-row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .measurement-header {
    margin-bottom: 0.5rem;
  }
  
  .dimensions-inputs {
    width: 100%;
  }
}

/* ===== PHASE 2: ZIP FEEDBACK TOAST ===== */
.zip-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, #003366 0%, #004080 100%);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 320px;
  z-index: 1000;
  animation: slideInUp 0.3s ease-out, fadeOut 0.3s ease-in 2.7s;
  opacity: 0;
  animation-fill-mode: forwards;
}

.zip-toast.show {
  animation: slideInUp 0.3s ease-out, fadeOut 0.3s ease-in 2.7s;
}

.zip-toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zip-toast-icon svg {
  width: 16px;
  height: 16px;
}

.zip-toast-content {
  flex: 1;
}

.zip-toast-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.125rem;
}

.zip-toast-message {
  font-size: 0.75rem;
  opacity: 0.9;
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

@media (max-width: 640px) {
  .zip-toast {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
}

/* ===== STEP 7: INSTALLER MATCH ===== */
.installer-check-loading {
  text-align: center;
  padding: 3rem 1rem;
}

.loading-spinner {
  display: inline-block;
  color: #003366;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.installer-match-section {
  margin-top: 2rem;
}

.match-card {
  border-radius: 12px;
  padding: 2rem;
  border: 2px solid;
}

.match-card-success {
  background: linear-gradient(to bottom, #f0fdf4, #ffffff);
  border-color: #86efac;
}

.match-card-alternative {
  background: linear-gradient(to bottom, #eff6ff, #ffffff);
  border-color: #93c5fd;
}

.match-card-hybrid {
  background: linear-gradient(to bottom, #faf5ff, #ffffff);
  border-color: #d8b4fe;
}

.match-card-error {
  background: linear-gradient(to bottom, #fef2f2, #ffffff);
  border-color: #fca5a5;
}

.match-icon {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
}

.match-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  text-align: center;
  margin-bottom: 1rem;
}

.match-description {
  font-size: 1rem;
  color: #6b7280;
  text-align: center;
  margin-bottom: 1.5rem;
}

.match-benefits {
  background: #f9fafb;
  border-radius: 8px;
  padding: 1.5rem;
}

.installer-preview-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.installer-preview-card:last-child {
  margin-bottom: 0;
}

.installers-preview {
  max-width: 500px;
  margin: 0 auto;
}