@font-face {
  font-family: 'Gotham Book';
  src: url('/fonts/GothamBook.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Gotham Medium';
  src: url('/fonts/GothamMedium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Gotham Bold';
  src: url('/fonts/GothamBold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

:root {
  --btn-color: #d4686b;
  --progress-color: #3a4a5c;
  --progress-gradient: true;
  --progress-end-color: #5a6a7c;
  --heading-color: #000000;
  --heading-size: 2.2rem;
  --paragraph-color: #8a9aaa;
  --paragraph-size: 1rem;
  --title-color: #000000;
  --nav-btn-color: #000000;
  --product-desc-color: #6a7a8a;
  --review-text-color: #8a9aaa;
}

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

html, body {
  height: 100%;
  width: 100%;
  font-family: 'Gotham Book', 'Inter', sans-serif;
}

body {
  background-color: #f5f3ef;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  min-height: 100vh;
}

@media (min-width: 769px) {
  body {
    padding: 10px 20px;
  }
  
  .quiz-header {
    margin-bottom: 5px;
  }
  
  .quiz-content {
    padding: 10px 0;
  }
  
  .step-indicator {
    margin-bottom: 10px;
  }
  
  .question-subtitle {
    margin-bottom: 20px;
  }
  
  .options-container {
    gap: 25px;
    margin-top: 10px;
  }
  
  .option-image-wrapper {
    width: 130px;
    height: 130px;
    margin-bottom: 10px;
  }
  
  .option-card {
    max-width: 150px;
  }
}

.quiz-container {
  max-width: 1000px;
  width: 100%;
  text-align: center;
}

.quiz-header {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  body {
    padding: 10px 10px;
    align-items: flex-start;
  }
  
  .quiz-header {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 5px;
    margin-bottom: 5px;
  }
  
  .quiz-header .quiz-title {
    width: 100%;
    order: -1;
    text-align: center;
  }
  
  .quiz-header .back-btn {
    position: static;
  }
  
  .quiz-header .restart-btn {
    position: static;
  }
  
  .progress-container {
    margin-bottom: 0;
  }
  
  .quiz-content {
    padding: 5px 0;
  }
}

.quiz-title {
  font-family: 'Gotham Bold', 'Inter', sans-serif;
  font-size: 1.4rem;
  font-weight: bold;
  letter-spacing: 2px;
  color: var(--title-color);
  margin: 0;
}

.back-btn {
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-family: 'Gotham Medium', 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--nav-btn-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-btn:hover {
  background: #f8f8f8;
  border-color: #ccc;
}

.back-btn.hidden {
  opacity: 0;
  pointer-events: none;
}

.restart-btn {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-family: 'Gotham Medium', 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--nav-btn-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.restart-btn:hover {
  background: #f8f8f8;
  border-color: #ccc;
}

.restart-btn.hidden {
  display: none;
}

.progress-container {
  width: 100%;
  height: 6px;
  background: #e0ddd8;
  border-radius: 3px;
  margin-bottom: 30px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--progress-color);
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 0%;
}

.progress-bar.gradient {
  background: linear-gradient(90deg, var(--progress-color), var(--progress-end-color));
}

.quiz-content {
  padding: 20px 0;
}

.step-indicator {
  font-family: 'Gotham Medium', 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #7a8a9a;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.question-title {
  font-family: 'Gotham Bold', 'Inter', sans-serif;
  font-size: var(--heading-size);
  font-weight: bold;
  color: var(--heading-color);
  margin-bottom: 10px;
  line-height: 1.3;
}

.question-subtitle {
  font-family: 'Gotham Book', 'Inter', sans-serif;
  font-size: var(--paragraph-size);
  color: var(--paragraph-color);
  margin-bottom: 40px;
}

.intro-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 20px 20px 20px;
  min-height: 500px;
  background-image: url('attached_assets/Quiz-homepage-background-desktop.webp');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
}

@media (max-width: 768px) {
  .intro-container {
    background-image: url('attached_assets/0106-Quiz-Page-mobile.webp');
    background-size: cover;
    background-position: center center;
    min-height: 500px;
    justify-content: flex-start;
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

@media (min-width: 769px) {
  .intro-container {
    min-height: auto;
    height: calc(100vh - 100px);
    max-height: 600px;
  }
}

.intro-content {
  text-align: center;
  max-width: 500px;
}

.intro-subtitle {
  font-family: 'Gotham Book', 'Inter', sans-serif;
  font-size: 1.2rem;
  color: var(--paragraph-color);
  margin-bottom: 10px;
  line-height: 1.6;
}

.start-quiz-btn {
  display: inline-block;
  padding: 18px 50px;
  background: var(--btn-color);
  color: white;
  font-family: 'Gotham Medium', 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 1px;
}

.start-quiz-btn:hover {
  filter: brightness(0.9);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.options-container {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.option-card {
  cursor: pointer;
  text-align: center;
  transition: transform 0.3s ease;
  max-width: 180px;
}

.option-card:hover {
  transform: translateY(-5px);
}

.option-card:hover .option-image-wrapper {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.option-image-wrapper {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin: 0 auto 15px;
  transition: box-shadow 0.3s ease;
}

.option-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.option-label {
  font-family: 'Gotham Medium', 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #000000;
  line-height: 1.4;
  margin: 0;
}

.result-container {
  padding: 20px;
  display: block;
  width: 100%;
  text-align: center;
}

@media (min-width: 769px) {
  .result-container {
    --scale-factor: clamp(0.6, calc((100vh - 80px) / 900px), 1);
    transform: scale(var(--scale-factor));
    transform-origin: top center;
    padding: 10px;
  }
}

.perfect-match-label {
  font-family: 'Gotham Bold', 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #000000;
  letter-spacing: 2px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.product-card {
  background: white;
  border-radius: 20px;
  overflow: visible;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  max-width: 360px;
  width: 100%;
  margin: 0 auto;
  min-height: fit-content;
  display: inline-block;
}

.multi-product-grid {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: stretch;
}

.multi-product-grid .product-card {
  max-width: 340px;
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
}

.multi-product-grid .product-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.multi-product-grid .product-tagline,
.multi-product-grid .product-bullets {
  min-height: 3em;
}

.multi-product-grid .stars-container {
  margin-top: auto;
}

.product-image-container {
  position: relative;
  background: linear-gradient(135deg, #f0f0f0, #e8e8e8) !important;
  padding: 20px 0 !important;
  border-radius: 20px 20px 0 0 !important;
  overflow: hidden !important;
  min-height: 300px !important;
  height: auto !important;
}

@media (min-width: 769px) {
  .product-image-container {
    padding: 10px 0 !important;
    min-height: 220px !important;
  }
  
  .product-info {
    padding: 12px 15px 15px !important;
  }
  
  .gallery-thumbnails {
    gap: 6px !important;
  }
  
  .gallery-thumbnail {
    width: 50px !important;
    height: 50px !important;
  }
}

.product-image {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 5px !important;
}

.product-gallery {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 15px;
  box-sizing: border-box;
}

.gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.gallery-slides {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e0e0e0;
}

.gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gallery-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.gallery-slide .product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 5px;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.gallery-nav:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.05);
}

.gallery-prev {
  left: 8px;
}

.gallery-next {
  right: 8px;
}

.gallery-thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.gallery-thumbnails::-webkit-scrollbar {
  height: 4px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
  background: transparent;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

.gallery-thumbnail {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  background: white;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.gallery-thumbnail:hover {
  border-color: #aaa;
}

.gallery-thumbnail.active {
  border-color: var(--btn-color, #d4686b);
}

.gallery-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zoom-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  z-index: 5;
}

.zoom-btn:hover {
  background: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.zoom-btn svg {
  color: #333;
}

.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  box-sizing: border-box;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 10001;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
}

.product-title-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.product-title-row .product-name {
  margin: 0;
}

.price-badge {
  font-family: 'Gotham Bold', 'Inter', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #2c3e50;
  white-space: nowrap;
}

.compare-price {
  text-decoration: line-through;
  color: #999;
  font-weight: normal;
  margin-right: 5px;
  font-size: 0.85em;
}

.product-info {
  padding: 25px 30px 30px;
  text-align: left;
}

.product-name {
  font-family: 'Gotham Bold', 'Inter', sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: #000000;
  margin: 0 0 8px 0;
}

.product-tagline {
  font-family: 'Gotham Book', 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--product-desc-color);
  margin-bottom: 15px;
  line-height: 1.5;
}

.product-bullets {
  font-family: 'Gotham Book', 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--product-desc-color);
  margin: 8px 0 15px 0;
  padding-left: 1.2em;
  line-height: 1.6;
  list-style-type: none;
}

.product-bullets li {
  margin-bottom: 4px;
  position: relative;
}

.product-bullets li::before {
  content: "•";
  position: absolute;
  left: -1.2em;
  color: var(--product-desc-color);
}

.testimonial-carousel {
  margin: 10px 0 15px;
  position: relative;
}

.testimonial-slides {
  position: relative;
  min-height: 70px;
}

.testimonial-slide {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.testimonial-slide.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

.testimonial-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.testimonial-text {
  flex: 1;
}

.testimonial-name {
  font-family: 'Gotham Bold', 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: bold;
  color: var(--heading-color);
  font-style: italic;
}

.testimonial-stars {
  color: #f5c518;
  font-size: 0.9rem;
  letter-spacing: 2px;
  margin: 2px 0;
}

.testimonial-quote {
  font-family: 'Gotham Book', 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--paragraph-color);
  font-style: italic;
  line-height: 1.4;
}

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.testimonial-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: #d0d0d0;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.testimonial-dot.active {
  background: var(--btn-color);
  transform: scale(1.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.shop-now-btn {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  background: var(--btn-color);
  color: white;
  font-family: 'Gotham Medium', 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.shop-now-btn:hover {
  filter: brightness(0.9);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.shop-now-btn.loading {
  opacity: 0.7;
  pointer-events: none;
  cursor: not-allowed;
}

.shop-now-btn .btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: btn-spin 0.8s linear infinite;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

.shop-now-btn svg {
  stroke: white;
}

@media (max-width: 768px) {
  .quiz-title {
    font-size: 0.9rem;
  }

  .back-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .restart-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .question-title {
    font-size: 1.6rem;
  }

  .options-container {
    gap: 25px;
  }

  .option-image-wrapper {
    width: 120px;
    height: 120px;
  }

  .option-label {
    font-size: 0.85rem;
  }

  .result-product-name {
    font-size: 2rem;
  }

  .result-image-wrapper {
    width: 180px;
    height: 180px;
  }
}

@media (max-width: 480px) {
  .options-container {
    gap: 20px;
  }

  .option-card {
    max-width: 140px;
  }

  .option-image-wrapper {
    width: 100px;
    height: 100px;
  }

  .question-title {
    font-size: 1.4rem;
  }
}

.color-swatches-section {
  margin: 15px 0;
}

.color-label {
  font-family: 'Gotham Book', sans-serif;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 10px;
}

.color-label .selected-color-name {
  font-family: 'Gotham Medium', sans-serif;
  color: #333;
}

.color-swatches {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.color-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #e0e0e0;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-swatch:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.color-swatch.selected {
  border: 3px solid #333;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #333;
}

.color-swatch:focus {
  outline: none;
}

@media (max-width: 768px) {
  .color-swatch {
    width: 36px;
    height: 36px;
  }
  
  .color-swatches {
    gap: 8px;
  }
}