/* Buy X Get Y - Akthar Style Layout V3.0 */
.fbt-container {
  /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e1e5e9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); */
  padding: 14px;
  margin-bottom: 30px;
}

.fbt-header {
  margin-bottom: 24px;
}

.fbt-title {
  font-size: 20px;
  font-weight: 600;
  color: #0f1419;
  margin-bottom: 12px;
}

.fbt-subtitle {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  opacity: 0.6;
}

.fbt-discount-tags {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.fbt-discount-tag {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
}

.fbt-active-tag {
  background-color: #3f3f3f;
  color: #fff;
}

.fbt-inactive-tag {
  background-color: #f1f1f1;
  color: #303030;
  font-weight: 400;
}

.fbt-layout {
  display: flex;
  padding: 4px 0px 12px;
  border-radius: 10px;
  flex-wrap: wrap;
  gap: 25px;
}

/* New Horizontal Layout */
.fbt-horizontal-layout {
  display: flex;
  gap: 12px;
  align-items: stretch;
  width: auto;
  flex: 65%;
  scrollbar-width: none;
  align-items: center;
  /*margin-right: 12px; */
}

.fbt-main-product {
  flex: 30%;
  display: flex;
  /* width: 100%; */
  height: 100%;
}

.fbt-plus-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  flex: auto;
}

.fbt-plus-icon path {
  fill: rgba(164, 163, 163, 1);
}

.fbt-offer-products {
  background-color: #fff;
  border: 1px solid #cfcfcf;
  border-radius: 12px;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex: 61%;
}

/* Product Cards */
.fbt-product-card {
  background: #fff;
  border: 1px solid #303030;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  height: 100%;
  width: 100%;
  position: relative;
}

.fbt-main-card {
  border-color: #303030;
}

.fbt-offer-product-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  align-items: flex-start;
  flex-direction: column;
  position: relative;
  flex: 50%;
}

.fbt-product-divider {
  border-right: 1px solid #cfcfcf;
  margin-top: 10px;
  margin-bottom: 10px;
}

.fbt-main-checkbox {
  display: none !important;;
}

.fbt-product-checkbox-container {
  position: absolute;
  z-index: 11;
  top: 10px;
}

.fbt-product-checkbox {
  height: 19px !important;
  width: 19px !important;
  margin: 0;
  pointer-events: auto;
  border-radius: 4px !important;
  color: var(--color-primary) !important;
  border-radius: 2px !important;
}

.fbt-product-checkbox:focus {
  --tw-ring-color: var(--color-primary) !important;
}

/* Product Images - 50% of card space */
.fbt-product-image-container {
  display: flex;
  width: 100%;
  justify-content: center;
  align-self: center;
  flex: 100%;
  max-width: 183px;
  max-height: 183px;
}

.fbt-product-image {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.fbt-product-details {
  flex: 50%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.fbt-product-name {
  font-size: 16px;
  font-weight: 400;
  color: #0f1419;
  line-height: 1.3;
}

.fbt-product-price {
  display: flex;
  flex-direction: row;
  gap: 4px;
  line-height: normal;
  align-items: end;
}

.fbt-current-price {
  font-size: 16px;
  font-weight: 600;
  color: rgba(153, 27, 27, 1);
}

.fbt-original-price {
  font-size: 12px;
  color: #565959;
  text-decoration: line-through;
  font-weight: 400;
}

.fbt-discount-badge {
  background: #b31818;
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 400;
  display: inline-block;
  width: fit-content;
}

/* Integrated Pricing Section */
.fbt-pricing-section {
  display: flex;
  flex: 30%;
}

.fbt-pricing-section-div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.fbt-total-section {
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  width: 100%;
  padding-inline-start: 10px;
  padding-inline-end: 10px;
  text-wrap: nowrap;
}

.fbt-total-description {
  display: flex;
  flex-direction: column;
}

.fbt-total-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #0f1419;
}

.fbt-total-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: #565959;
}

.fbt-total-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.fbt-total-price-discount {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.fbt-discount-percent {
  background: #b31818;
  color: #fff;
  padding: 1px 12px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  align-self: end;
}

.fbt-strike-price {
  font-size: 14px;
  color: #565959;
  text-decoration: line-through;
  font-weight: 400;
}

.fbt-final-price {
  font-size: 18px;
  font-weight: 600;
  color: #0f1419;
}

/* Product Options */
.product-options .s-product-options-wrapper {
  display: flex;
  margin-bottom: 0rem;
  border-radius: 0rem;
  --tw-bg-opacity: 0;
  background-color: transparent;
  padding: 0;
  margin-inline-start: 0;
}

.product-options .s-product-options-wrapper salla-conditional-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-options .s-product-options-option-container {
  margin-bottom: 0rem;
}

.product-options select {
  background-image: unset;
  background-position: unset;
  background-size: unset;
  background-repeat: unset;
  background-attachment: unset;
  background-origin: unset;
  background-clip: unset;
  padding: 4px 8px;
  border-color: #e4e7ec;
  margin: 0px;
  border-radius: 6px;
  border-width: 1px;
  border-style: solid;
  font-size: 14px;
  font-weight: 400;
  width: 100%;
  max-width: 120px;
}

/* Legacy Card Template Styles */
.temp2-fbt-container {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  text-align: left;
  border: 1px solid #e1e5e9;
  margin-top: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.fbt-header,
.temp2-fbt-container .fbt-header {
  font-size: 20px;
  font-weight: 600;
  color: #0f1419;
  margin-bottom: 8px;
}

.fbt-subtext {
  margin-top: 0;
  margin-bottom: 20px;
  display: inline-block;
  font-size: 14px;
  font-weight: 400;
  color: #565959;
  padding: 0;
  text-decoration: none;
  text-transform: none;
}

.fbt-content {
  display: flex;
  gap: 24px;
  margin-top: 0;
}

.products-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  border: 1px solid #d5d9dd;
  border-radius: 8px;
  background: #fff;
  transition: all 0.2s ease;
}

.product-item:hover {
  border-color: #007185;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.product-image-container {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e1e5e9;
}

.fbt-product-checkbox-overlay:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.product-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-name {
  font-size: 14px;
  font-weight: 500;
  color: #0f1419;
  line-height: 1.3;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #0f1419;
}

.original-price {
  font-size: 12px;
  color: #565959;
  text-decoration: line-through;
  font-weight: 400;
}

.discount-percent {
  background: #cc0c39;
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}

.price-container {
  margin: 0;
  min-width: 280px;
  background: #f7f8fa;
  border: 1px solid #d5d9dd;
  border-radius: 8px;
  padding: 20px;
  height: fit-content;
}

.price-container > div:first-child {
  font-size: 16px;
  font-weight: 400;
  color: #0f1419;
  margin-bottom: 8px;
}

.offer-total-price {
  font-size: 20px;
  font-weight: 700;
  color: #cc0c39;
}

.strike-price {
  text-decoration: line-through;
  color: #565959;
  font-size: 16px;
  margin-left: 8px;
}

.price-container > div:nth-child(2) {
  font-size: 12px;
  color: #007600;
  margin-bottom: 20px;
  font-weight: 500;
}

.fbt-product-checkbox {
  margin: 0;
}

.temp2-fbt-container .fbt-subtext {
  color: #565959;
  font-size: 14px;
  margin-top: 0;
  margin-bottom: 20px;
}

.temp2-fbt-container .fbt-products {
  border: 1px solid #d5d9dd;
  padding: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 90px;
  margin-bottom: 16px;
  background: #fafafa;
}

.temp2-fbt-container .fbt-products img {
  width: 75px;
  height: 75px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid #d5d9dd;
}

.temp2-fbt-container .product-info {
  flex-grow: 1;
  font-size: 14px;
}

.temp2-fbt-container .product-info a {
  color: #007185;
  text-decoration: none;
  font-weight: 500;
}

.temp2-fbt-container .product-info a:hover {
  color: #cc0c39;
  text-decoration: underline;
}

.temp2-fbt-container .product-price {
  font-weight: 600;
  color: #0f1419;
  margin-top: 4px;
}

.temp2-fbt-container .offer-total-price {
  font-size: 18px;
  font-weight: 700;
  color: #cc0c39;
  margin-top: 16px;
}

.fbt-container .add-to-cart,
.temp2-fbt-container .add-to-cart {
  width: 100%;
  padding: 12px 20px;
  border: none;
  cursor: pointer;
  margin-top: 0;
  background: #ff9900;
  color: #0f1419;
  font-size: 14px;
  font-weight: 600;
  border-radius: 20px;
  transition: all 0.2s ease;
}

.fbt-container .add-to-cart:hover,
.temp2-fbt-container .add-to-cart:hover {
  background: #fa8900;
  transform: translateY(-1px);
}

.temp2-fbt-container .strike-price {
  text-decoration: line-through;
  color: #565959;
  font-size: 14px;
  margin-left: 8px;
}

.temp2-fbt-container .checkbox {
  width: 16px;
  height: 16px;
  accent-color: #007185;
}

.temp2-plus {
  text-align: center;
  font-size: 20px;
  font-weight: 300;
  color: #565959;
  margin: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.temp2-fbt-subtext {
  color: #565959;
  font-size: 14px;
  margin-top: 0;
  margin-bottom: 20px;
}

.temp2-fbt-container .product-info a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  line-height: 1.3;
}

/* Discount percentage badge */
.discount-badge {
  background: #cc0c39;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}

/* Product selection styling */
.product.selected {
  border-color: #007185;
  background: #f0f8ff;
}

.fbt-product-checkbox:checked + .product {
  border-color: #007185;
  background: #f0f8ff;
}

/* Enhanced button states */
.add-to-cart:disabled {
  background: #d5d9dd !important;
  color: #565959 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.add-to-cart:active {
  transform: translateY(0);
}

/* Bundle offer highlight */
.bundle-offer-text {
  background: linear-gradient(90deg, #ff9900 0%, #ffad33 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

/* Button loading state */
.s-button-loader {
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff3d;
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

/* Loading and interaction states */
.loader {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 3px solid #fff;
  width: 18px;
  height: 18px;
  animation: 0.7s linear infinite spin;
  display: inline-block;
  vertical-align: middle;
}

.fbt-product-details .product-options select {
  max-width: 100%;
}

@keyframes spin {
  0% {
    transform: rotate(0);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
  .fbt-horizontal-layout {
    flex-direction: column;
    gap: 7px;
  }

  .fbt-total-subtitle {
    font-size: 14px;
  }

  .fbt-plus-icon {
    width: auto;
  }

  .fbt-product-card {
    flex-direction: row;
    gap: 21px;
  }

  .fbt-product-card .fbt-product-details {
    margin-top: 10px;
  }

  .fbt-main-card .fbt-product-image-container {
    flex: 30%;
  }

  .fbt-product-image-container {
    flex: auto;
  }
}
