.fbt-wrapper-main {
  margin: 40px auto;
  max-width: 800px;
  position: relative;
}

.fbt-pill-header {
  background: #000;
  color: #fff;
  border-radius: 50px;
  padding: 8px 30px;
  display: inline-block;
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); */
}

.fbt-pill-header h2 {
  color: #fff;
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  white-space: nowrap;
}

.fbt-container {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 15px;
  padding: 60px 20px 30px;
  text-align: center;
  /* box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05); */
}

.fbt-products-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: nowrap;
  margin-bottom: 30px;
  overflow-x: auto;
  padding: 10px 0 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #eee transparent;
}

.fbt-products-grid::-webkit-scrollbar {
  height: 6px;
}

.fbt-products-grid::-webkit-scrollbar-track {
  background: transparent;
}

.fbt-products-grid::-webkit-scrollbar-thumb {
  background-color: #eee;
  border-radius: 20px;
}

@media (max-width: 768px) {
  .fbt-products-grid {
    justify-content: flex-start;
    padding-left: 10px;
    padding-right: 10px;
  }
}

.fbt-product-column {
  flex: 0 0 160px;
  max-width: 180px;
  text-align: center;
}

.fbt-image-wrap {
  position: relative;
  margin-bottom: 12px;
  background: #fdf6f0; /* matching the tinted bg in demo if possible, or just white */
  border-radius: 8px;
  overflow: hidden;
}

.fbt-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1/1;
  object-fit: cover;
}

.fbt-checkbox {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #007bff; /* blue check */
}

.fbt-product-title {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 5px;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em;
  line-height: 1.4;
}

.fbt-product-price {
  font-size: 16px;
  font-weight: 600;
  color: #444;
}

.fbt-separator {
  font-size: 24px;
  font-weight: bold;
  color: #1a1a1a;
  padding-bottom: 50px; /* Aligns + with images approx */
  flex-shrink: 0;
}

/* Variation select — hidden after JS chip conversion */
.fbt-variation-dropdown.fbt-chips-converted {
  display: none !important;
}

/* ── FBT Variation Chips ────────────────────────────────────────────────── */
/* Chips sit inside .fbt-variations-grid which reuses .variations-grid flex  */
.fbt-variations-grid {
  justify-content: center;
  gap: 8px;
  margin-top: 8px !important;
}

/* Override the base .variation-chip sizing for the compact FBT card context */
.fbt-product-column .variation-chip.fbt-variation-chip {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.3;
  text-align: center;
}

/* Active state — brand purple, matches theme primary */
.fbt-product-column .variation-chip.fbt-variation-chip.active {
  background: rgba(123, 44, 191, 0.08);
  border-color: #7b2cbf;
  color: #7b2cbf;
}

/* Variation name line */
.fbt-chip-label {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}

.fbt-chip-price {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 500;
  color: #555;
}

.fbt-product-column .variation-chip.fbt-variation-chip.active .fbt-chip-price {
  color: #7b2cbf;
}


.fbt-chip-regular-price {
  color: #aaa;
  font-weight: 400;
  text-decoration: line-through;
}

.fbt-chip-discounted-price {
  color: #1a9c3b;
  font-weight: 700;
}

@media (max-width: 768px) {
  .fbt-product-column .variation-chip.fbt-variation-chip {
    padding: 4px 7px;
    font-size: 10px; 
  }

  .fbt-chip-label {
    max-width: 70px;
  }

  .fbt-chip-price {
    font-size: 9px;
  }
}

.fbt-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.fbt-add-to-cart-btn-new {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 2px;
  padding: 12px 20px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s;
  text-transform: none;
}

.fbt-add-to-cart-btn-new:hover {
  transform: scale(1.02);
}

.fbt-add-to-cart-btn-new .regular-amount {
  color: #888;
  font-size: 15px;
  text-decoration: line-through;
  margin-right: 5px;
}

.fbt-promo-text {
  font-size: 22px;
  font-weight: 700;
  color: #000;
}

/* Main product special styling */
.fbt-product-column.main-product .fbt-checkbox {
  cursor: default;
}

/* Mobile Responsiveness Refinements - Extra Compact */
@media (max-width: 768px) {
  .fbt-wrapper-main {
    margin: 30px 10px;
  }
  .fbt-pill-header {
    width: auto;
    padding: 6px 20px;
    top: -15px;
  }
  .fbt-pill-header h2 {
    font-size: 14px;
  }
  .fbt-container {
    padding: 40px 10px 20px;
    border-radius: 10px;
  }
  .fbt-products-grid {
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 10px;
  }
  .fbt-product-column {
    flex: 0 0 30%; /* Try to fit 3 items roughly */
    min-width: 90px;
  }
  .fbt-product-title {
    font-size: 11px;
    height: 2.6em;
    margin-bottom: 2px;
  }
  .fbt-product-price {
    font-size: 12px;
  }
  .fbt-separator {
    font-size: 18px;
    padding-bottom: 40px;
    gap: 4px;
  }
  .fbt-add-to-cart-btn-new {
    width: 90%;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 4px;
  }
  .fbt-add-to-cart-btn-new .regular-amount {
    font-size: 12px;
  }
  .fbt-promo-text {
    font-size: 16px;
    margin-top: 5px;
  }
  .fbt-checkbox {
    width: 16px;
    height: 16px;
    top: 5px;
    left: 5px;
  }
}
