:root {
  --primary-color: var(--nectar-accent-color);
  --primary-light: rgba(207, 36, 9, 0.04);
  --text-color: #333333;
  --border-color: #e5e5e5;
  --background-light: #f9f9f9;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --header-height-desktop: 160px;
  --header-height-mobile: 40px;
  --header-height-tablet: 50px;
  --max-width-mobile: 600px;
  --max-width-tablet: 900px;
}

/* Global Structure */
body {
  background-color: #f2f0ef;
}

.product-advisor {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  overflow: visible;
  max-width: 1200px;
  margin: auto;
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: var(--text-color);
}

/* Step Indicator */
.step-indicator-container {
  position: sticky;
  top: calc(var(--header-height-desktop) + 20px);
  background: white;
  padding: 20px 0;
  z-index: 100;
  box-shadow: 0 2px 8px var(--shadow-color);
  border-radius: 8px;
  margin-bottom: 20px;
}

/* Add background overlay to cover the gap */
.step-indicator-container::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: #efecec; /* Match body background */
  z-index: -1;
}

/* Uses breakpoint defined in :root as --max-width-tablet (900px) */
@media (max-width: 900px) {
  .step-indicator-container {
    top: calc(var(--header-height-tablet) + 15px);

  }
  
  .step-indicator-container::before {
    top: -15px;
    height: 15px;
  }
}

/* Uses breakpoint defined in :root as --max-width-mobile (600px) */
@media (max-width: 600px) {
  .step-indicator-container {
    top: calc(var(--header-height-mobile) + 10px);
  }
  
  .step-indicator-container::before {
    top: -10px;
    height: 10px;
  }
}

.step-indicator {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.step-circle {
  cursor: pointer;
  transition: transform 0.2s;
}
.step-circle.completed {
  background: var(--primary-color);
  color: white;
}
.step-circle.active {
  border-color: var(--primary-color);
}
.step-circle:hover {
  transform: scale(1.05);
}

.progress-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  position: relative;
  flex-wrap: wrap;
}

.progress-line {
  position: absolute;
  top: 50%;
  left: 0;
  height: 3px;
  background-color: var(--primary-color);
  transform: translateY(-50%);
  transition: width 0.3s ease;
  z-index: 1;
}


.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--border-color);
  display: flex;
  margin-right: 4px;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: all 0.3s ease;
  z-index: 2;
}

.step-circle.active {
  border-color: var(--primary-color);
}

.step-circle.completed {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: white;
}

/* Advisor Layout */
.advisor-content {
  display: flex;
  overflow: visible;
  gap: 30px;
}

.steps-column {
  flex: 3;
}

.summary-column {
  flex: 1;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 3px 10px var(--shadow-color);
}

/* Step Content */
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.step-content {
  background: var(--background-light);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 3px 10px var(--shadow-color);
  scroll-margin-top: calc(var(--header-height-desktop) + 100px);
  transition: all 0.3s ease;
}

.step-content.active {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  transform: translateY(-3px);
}

.step-content.follow-up {
  margin-top: 2rem;
  padding: 0;
  box-shadow: none;
  background: none;
  border: none;
}

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

.step-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.step-description {
  font-size: 14px;
  margin-bottom: 20px;
  color: #666;
}

.step-image {
  margin-bottom: 25px;
}

.step-image img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.selection-summary-container {
  position: sticky;
  top: calc(var(--header-height-desktop, 100px) + 150px);
  z-index: 99;
}

/* Help Icon & Tooltip */
.help-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  margin-left: 8px;
}

.help-icon:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
}

/* Tooltip bubble */
.help-tooltip {
  position: absolute;
  top: 100%;
  right: 0;
  width: 300px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 5px 20px var(--shadow-color);
  padding: 15px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  transform: translateY(10px);
  display: inline-block;
}

.help-icon:hover .help-tooltip {
  opacity: 1;
  pointer-events: all;
  transform: translateY(5px);
}

/* Styling for content inside the tooltip */
.help-content {
  font-size: 14px;
  line-height: 1.5;
}

/* Image inside tooltip (optional) */
.help-image {
  max-width: 100%;
  margin-top: 10px;
  border-radius: 4px;
}

/* 🟠 Question-specific: small version next to headings */
.help-icon.small {
  width: 22px;
  height: 22px;
  font-size: 12px;
  vertical-align: middle;
  margin-left: 6px;
}

/* 🟢 Answer-specific: inline with label */
.help-icon.inline {
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  position: relative;
  top: 0;
  flex-shrink: 0;
}
/* Option Cards */
.option-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

/* Ensure follow-up block doesn't collapse or break layout */
.follow-up-question {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px dashed var(--border-color);
  width: 100%;
  display: none; /* stays hidden by default */
  animation: fadeIn 0.3s ease;
}

/* Make sure it's displayed in the flow, not inside an option card */
.option-card .follow-up-question {
  position: static;
  margin-left: 0;
  margin-right: 0;
}

/* Prevent shrinking of option buttons when follow-up appears */
.option-card {
  flex: 0 1 calc(50% - 15px);
  max-width: calc(50% - 15px);  
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Make sure follow-up options look the same */
.follow-up-question .option-card {
  flex: 1 1 calc(50% - 15px);
  min-width: 150px;
}

.option-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  transition: all 0.2s ease;
  gap: 6px;
}

.option-card label:hover {
  border-color: var(--primary-color);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.option-label {
  font-size: 14px;
  margin-top: 10px;
  text-align: center;
  font-weight: 500;
  display: block;
}

.option-label-with-tooltip {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;   /* Ensures horizontal centering */
  text-align: center;    /* Ensures lines align center inside */
}

.option-image {
  width: 100%;
  max-width: 200px;
  height: 200px;
  margin: 0 auto 5px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.option-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* Selection States */
.option-input:checked + label,
.option-card.selected-option label {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
  box-shadow: 0 3px 15px rgba(242, 100, 37, 0.15);
}

.multiple-select .option-card:not(.selected-option) label {
  border-color: var(--border-color);
  background: white;
}

/* Conditional Content */
.conditional-content {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed var(--border-color);
  animation: fadeIn 0.3s ease;
}

.conditional-content:empty {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.additional-info {
  font-size: 14px;
  color: var(--text-color);
}

.additional-info:empty {
  display: none;
}

/* Summary Panel */
.selection-panel h3 {
  margin: 0 0 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
}

.selection-summary {
  max-height: calc(100vh - 370px);
  overflow-y: auto;
  padding: 16px;
}

.summary-column {
  position: relative;
  max-height: none;
  overflow: visible;
}

.summary-toggle {
  display: none;                     /* hidden unless mobile query matches */
}

.selection-item {
  margin-bottom: 12px; /* was 20px — chill out */
}

.selection-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-color); /* keep this if you want that orange pop */
  margin-bottom: 2px; /* was 5px */
  line-height: 1.2;
}

.selection-title {
  font-size: 13px;
  line-height: 1.3;
  opacity: 0.7;
}

.selection-value ul {
  margin: 5px 0;
  padding-left: 20px;
}

.empty-state {
  color: #555;
  font-style: italic;
  text-align: center;
}

/* Collapsible logic */
.collapsible-header {
  display: none; /* hidden by default (desktop) */
}

/* Results Section */
.results-section {
  margin-top: 40px;
  padding: 30px;
  background: transparent;
  border-radius: 0; 
  box-shadow: none;
}

.results-section h2 {
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
}

.product-results {
  min-height: 200px;
}

.empty-results {
  text-align: center;
  color: #555;
  padding: 40px 0;
}

/* WooCommerce Products in Advisor - Salient Theme Structure */
.product-results .products.advisor-products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 20px;
  list-style: none;
  padding: 0;
}

.product-results .products.advisor-products li.product {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
  margin: 0;
  padding: 15px;
}

.product-results .products.advisor-products li.product:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* Salient product wrapper structure */
.product-results .products.advisor-products .product-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-results .products.advisor-products .product-image-wrap {
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: 15px;
  position: relative;
  border-radius: 4px;
}

.product-results .products.advisor-products .product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hide hover gallery images in advisor */
.product-results .products.advisor-products .hover-gallery-image {
  display: none !important;
}

/* Product meta (title and price) */
.product-results .products.advisor-products .product-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-results .products.advisor-products .product-main-meta {
  flex: 1;
}

.product-results .products.advisor-products .woocommerce-loop-product__title,
.product-results .products.advisor-products h2.woocommerce-loop-product__title {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-color);
  line-height: 1.3;
}

.product-results .products.advisor-products .price {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 10px;
}

.product-results .products.advisor-products .price .amount {
  color: var(--primary-color);
}

/* Add to cart button */
.product-results .products.advisor-products .product-add-to-cart {
  margin-top: 10px;
}

/* Ensure no unwanted transforms affect text readability in advisor */
.product-results .products.advisor-products li.product * {
  transform: none !important;
}

/* Hide any extra product elements that might cause layout issues */
.product-results .products.advisor-products .product-image-wrap .product-add-to-cart {
  display: none;
}

.product-results .products.advisor-products .woocommerce-product-gallery,
.product-results .products.advisor-products li.product .additional-images,
.product-results .products.advisor-products .product-thumbnail-wrap {
  display: none !important;
}

.product-results .products.advisor-products .button,
.product-results .products.advisor-products .add_to_cart_button,
.product-results .products.advisor-products .product-add-to-cart a {
  width: 100%;
  padding: 12px;
  background-color: white !important;
  color: black !important;
  border: 1px solid #ddd !important;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 4px;
  text-align: center;
  margin-top: 10px;
  text-decoration: none;
  display: block;
  box-sizing: border-box;
}

.product-results .products.advisor-products .button:hover,
.product-results .products.advisor-products .add_to_cart_button:hover,
.product-results .products.advisor-products .product-add-to-cart a:hover {
  background-color: #f5f5f5 !important;
  color: black !important;
  border-color: #999 !important;
}

/* Ensure button text is always visible regardless of theme overrides */
.product-results .products.advisor-products .product-add-to-cart .button,
.product-results .products.advisor-products .product-add-to-cart .add_to_cart_button {
  background: white !important;
  color: black !important;
  border: 1px solid #ddd !important;
}

.product-results .products.advisor-products .product-add-to-cart .button:hover,
.product-results .products.advisor-products .product-add-to-cart .add_to_cart_button:hover {
  background: #f5f5f5 !important;
  color: black !important;
  border-color: #999 !important;
}

/* Loading Spinner */
.loading-spinner {
  text-align: center;
  padding: 40px 0;
}

.loading-spinner span {
  display: inline-block;
  position: relative;
  padding-left: 30px;
}

.loading-spinner span:before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes spin {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}

/* Uses breakpoint defined in :root as --max-width-tablet (900px) */
@media (max-width: 900px) {
  .advisor-content {
    flex-direction: column;
  }

  .summary-column {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    z-index: 100;
    border-radius: 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.12);
    padding: 0;                /* remove desktop padding */
  }

  .summary-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 18px 22px;
    font-size: 16px;
    font-weight: normal;
    line-height: 1.2;
    background: transparent;
    border: none;
    cursor: pointer;
  }

  .summary-title {
    text-align: center;
    pointer-events: none;       /* optional: make sure it's not clickable */
  }

  .summary-icon {
    position: absolute;
    right: 22px;                /* ⬅️ aligns with toggle padding */
    top: 50%;
    transform: translateY(-50%); /* ⬅️ vertical centering */
    transition: transform 0.25s ease;
  }

  /* little arrow rotates when closed */
  .summary-toggle[aria-expanded="false"] .summary-icon {
    transform: translateY(-50%) rotate(-90deg);
  }

  /* Expanded state */
  .summary-toggle[aria-expanded="true"] + .selection-summary {
    max-height: 60vh;
    opacity: 1;
    pointer-events: auto;
    padding: 16px;
  }

  .selection-summary {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    overflow-y: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    padding: 0 16px;  /* no padding when collapsed */
  }

  .selection-summary:not(.collapsed) {
    max-height: 60vh;
    opacity: 1;
    pointer-events: auto;
    overflow-y: auto;
    padding: 16px;
  }
  
  .desktop-heading { 
    display: none; 
  }

  .option-card {
    flex: 1 1 100%;
  }

  .product-results .products.advisor-products {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  /* Adjust image height for tablet */
  .product-results .products.advisor-products .product-image-wrap {
    height: 180px;
  }
}

/* Uses breakpoint defined in :root as --max-width-mobile (600px) */
@media (max-width: 600px) {
  .advisor-content {
    padding: 20px 15px;
  }

  .step-content {
    padding: 20px 15px;
  }

  .step-header h2 {
    font-size: 18px;
  }

  .help-tooltip {
    width: 250px;
    right: -100px;
  }

  .option-card {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .option-cards {
    gap: 12px;
    width: 100%;
  }

  .option-card label {
    padding: 16px;
  }

  .product-results .products.advisor-products {
    grid-template-columns: 1fr;
  }

  /* Mobile adjustments for product cards */
  .product-results .products.advisor-products li.product {
    padding: 12px;
  }

  .product-results .products.advisor-products .product-image-wrap {
    height: 160px;
  }

  .product-results .products.advisor-products .woocommerce-loop-product__title,
  .product-results .products.advisor-products h2.woocommerce-loop-product__title {
    font-size: 14px;
  }

  .product-results .products.advisor-products .price {
    font-size: 16px;
  }
}




body {
  overflow-y: visible !important;
}
html {
  overflow: visible !important;
}

/* Fix border-radius for all WooCommerce buttons site-wide */
.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce .product .button,
.woocommerce .product .add_to_cart_button,
.woocommerce .product .product_type_simple,
.woocommerce .product .product_type_variable,
.woocommerce-page .product .button {
  border-radius: 4px !important;
  -webkit-border-radius: 4px !important;
  -moz-border-radius: 4px !important;
}