/* Gift Finder - Floating Button */
.gift-finder-floating-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #000;
  color: #fff;
  padding: 16px 24px;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 999;
  font-weight: 500;
  font-size: 14px;
}

.gift-finder-floating-btn:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.gift-finder-floating-btn svg {
  width: 20px;
  height: 20px;
}

/* Pulse Animation */
@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.gift-finder-floating-btn {
  animation: pulse 2s infinite;
}

.gift-finder-floating-btn:hover {
  animation: none;
}

/* Modal */
.gift-finder-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
}

.gift-finder-modal.active {
  display: block;
}

.gift-finder-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.gift-finder-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -48%);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.gift-finder-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 32px;
  color: #999;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  z-index: 10;
}

.gift-finder-close:hover {
  background: #f5f5f5;
  color: #000;
}

/* Progress Bar */
.gift-finder-progress {
  height: 3px;
  background: #f0f0f0;
  width: 100%;
}

.gift-finder-progress-bar {
  height: 100%;
  background: #000;
  transition: width 0.3s ease;
}

/* Quiz Container */
.gift-finder-quiz {
  padding: 60px 40px 40px;
}

.gift-finder-step {
  display: none;
  animation: fadeIn 0.4s ease;
}

.gift-finder-step.active {
  display: block;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gift-finder-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #000;
  text-align: center;
}

.gift-finder-subtitle {
  font-size: 14px;
  color: #666;
  text-align: center;
  margin-bottom: 32px;
}

/* Options Grid */
.gift-finder-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.gift-finder-budget-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.gift-finder-option {
  cursor: pointer;
}

.gift-finder-option input[type="checkbox"],
.gift-finder-option input[type="radio"] {
  display: none;
}

.gift-finder-option-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.2s;
  min-height: 120px;
  background: #fff;
  text-align: center;
}

.gift-finder-option:hover .gift-finder-option-content {
  border-color: #000;
  background: #f9f9f9;
}

.gift-finder-option input:checked+.gift-finder-option-content {
  border-color: #000;
  background: #000;
  color: #fff;
}

.gift-finder-option-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.gift-finder-option-label {
  font-size: 14px;
  font-weight: 500;
}

.budget-option .gift-finder-option-content {
  flex-direction: row;
  justify-content: flex-start;
  min-height: auto;
  padding: 16px 20px;
}

.budget-option .gift-finder-option-icon {
  margin-bottom: 0;
  margin-right: 12px;
}

/* Buttons */
.gift-finder-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

.gift-finder-btn-next,
.gift-finder-btn-submit {
  background: #000;
  color: #fff;
  border: 2px solid #000;
  padding: 14px 32px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
  max-width: 200px;
}

.gift-finder-btn-next:hover,
.gift-finder-btn-submit:hover {
  background: #333;
  border-color: #333;
}

.gift-finder-btn-back {
  background: #fff;
  color: #000;
  border: 2px solid #e0e0e0;
  padding: 14px 32px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
  max-width: 200px;
}

.gift-finder-btn-back:hover {
  border-color: #000;
  background: #f9f9f9;
}

/* Loading */
.gift-finder-loading {
  text-align: center;
  padding: 60px 20px;
}

.gift-finder-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid #f0f0f0;
  border-top: 3px solid #000;
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 1s linear infinite;
}

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

.gift-finder-loading h2 {
  font-size: 20px;
  color: #666;
  font-weight: 500;
}

/* Results */
.gift-finder-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.gift-finder-product-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
  background: #fff;
}

.gift-finder-product-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.gift-finder-product-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.gift-finder-product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.gift-finder-product-card h3 {
  font-size: 14px;
  font-weight: 500;
  padding: 12px;
  margin: 0;
  color: #000;
  min-height: 60px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gift-finder-product-card .price {
  font-size: 16px;
  font-weight: 700;
  color: #000;
  padding: 0 12px 12px;
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .gift-finder-floating-btn {
    bottom: 20px;
    right: 20px;
    padding: 14px 20px;
    font-size: 13px;
  }

  .gift-finder-floating-btn span {
    display: none;
  }

  .gift-finder-content {
    width: 95%;
    max-height: 95vh;
  }

  .gift-finder-quiz {
    padding: 50px 24px 24px;
  }

  .gift-finder-title {
    font-size: 22px;
  }

  .gift-finder-options-grid {
    grid-template-columns: 1fr;
  }

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

  .gift-finder-product-card img {
    height: 140px;
  }

  .gift-finder-buttons {
    flex-direction: column;
  }

  .gift-finder-btn-next,
  .gift-finder-btn-submit,
  .gift-finder-btn-back {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .gift-finder-floating-btn {
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }

  .gift-finder-floating-btn svg {
    margin: 0;
  }
}

/* Tooltip/Speech Bubble */
.gift-finder-tooltip {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 15px;
  background: #fff;
  color: #000;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  font-size: 13px;
  font-weight: 500;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
  z-index: 1000;
  width: max-content;
  max-width: 300px;
  text-align: right;
  border: 1px solid #f0f0f0;
  line-height: 1.4;
}

/* Tooltip Arrow */
.gift-finder-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  border-bottom: 1px solid #f0f0f0;
  border-right: 1px solid #f0f0f0;
}

.gift-finder-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .gift-finder-tooltip {
    right: -10px;
    font-size: 12px;
    padding: 10px 14px;
  }

  .gift-finder-tooltip::after {
    right: 30px;
  }
}