/* Layout structure */
.custom-bundle-builder-header {
  display: flex;
  gap: 1rem; 
  max-width: 1140px;
  margin: 0 auto;
  margin-top: 48px;
  margin-bottom: 16px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.bundleH1 {
  font-family: Futura, sans-serif;
  color: #41525a;
  font-weight: 700;
  text-wrap: balance;
  font-size: clamp(2.027rem, -0.208rem + 7.152vw, 6rem);
  line-height: clamp(1.1em, 0.9em + 0.5vw, 1.3em);
  margin-top: 12rem;
  margin-bottom: 0;
  text-align: center;
}

.bundleP {
    text-align: center;
  font-family: Futura, sans-serif;
  color: #41525a;
  font-weight: 500;
  text-wrap: balance;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.4rem);
  line-height: clamp(1.2em, 1em + 0.2vw, 1.4em);
 
}
.custom-bundle-builder {
  display: flex;
  gap: 2rem;
  flex-wrap: nowrap;
  max-width: 1140px;
  margin: 0 auto;
  margin-top: 48px;
  margin-bottom: 48px;
  align-items: flex-start;
}

.bundle-left {
  width: 66%;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1rem 0;
}

.bundle-right {
  width: 33%;
  padding: 1rem 0;
  background: transparent;
  border-radius: 10px;
  position: sticky;
  top: 80px;
  font-family: Futura, sans-serif;
  color: #41525a;
  border: none;
  align-self: flex-start;
  height: fit-content;
}

/* Product card styling */
.product-card {
  width: calc(45% - 1rem);
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  font-family: Futura, sans-serif;
  color: #41525a;
  border: none;
  max-width: 300px;
  margin: 0 auto;
}

.product-image img {
  max-width: 100%;
  height: auto;
  margin-bottom: 1rem;
  border-radius: 10px;
}

.product-meta {
  margin-bottom: 0.5rem;
}

.product-category {
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  text-align: left !important;
  color: #41525a !important;
  margin-bottom: 0.25rem !important;
  font-family: Futura, sans-serif !important;
}

.product-category a {
  color: #41525a !important;
  text-decoration: none !important;
}

.product-title {
  font-size: clamp(0.85rem, 0.5rem + 1vw, 1.1rem) !important;
  font-weight: 700 !important;
  color: #41525a !important;
  margin: 0.25rem 0 !important;
  font-family: Futura, sans-serif !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
  text-align: left !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.product-price {
  font-size: clamp(1rem, 0.8rem + 0.7vw, 1.3rem) !important;
  font-weight: 700 !important;
  color: #41525a !important;
  font-family: Futura, sans-serif !important;
  line-height: 1.3 !important;
  text-align: left !important;
}

.product-actions {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.product-actions input.product-qty,
.product-actions .decrease-qty,
.product-actions .increase-qty {
  display: none !important;
}

.add-to-bundle,
#bundle-add-to-cart {
  background-color: #2e3c3f !important;
  color: #f8c5a3 !important;
  border: none !important;
  border-radius: 2rem !important;
  font-size: 0.95rem !important;
  padding: 0.5rem 1.8rem !important;
  font-weight: 600 !important;
  font-family: Futura, sans-serif !important;
  transition: background-color 0.3s ease !important;
  cursor: pointer !important;
}

.add-to-bundle:hover,
#bundle-add-to-cart:hover {
  background-color: #1f2a2c !important;
}

#bundle-clear {
  padding: 0.5rem 1.5rem !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  border: 1px solid #d35b9b !important;
  border-radius: 1rem !important;
  background-color: transparent !important;
  color: #d35b9b !important;
  font-family: Futura, sans-serif !important;
  cursor: pointer !important;
  margin-left: 0.5rem !important;
}

#selected-products {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.bundle-item {
  width: 80px;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.3s ease-in-out;
}

.bundle-thumb {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 1rem;
  overflow: visible;
  background-color: #fff;
}

.bundle-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
}

.bundle-thumb .remove-product {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #41525a;
  border: 1px solid #41525a;
  color: #fff;
  font-size: 0.85rem;
  font-weight: bold;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  line-height: 1;
  padding: 0;
}

.bundle-slot {
  width: 80px;
  height: 80px;
  border-radius: 1rem;
  border: 2px dashed #41525a;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: slotFadeIn 0.4s ease-in-out;
  position: relative;
}

.slot-plus {
  font-size: 1.5rem;
  color: #41525a;
  font-weight: bold;
  opacity: 0.5;
}

.bundle-item-title {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  text-align: center;
  color: #41525a;
  font-family: Futura, sans-serif;
  font-weight: 500;
  line-height: 1.2;
  max-width: 80px;
  word-wrap: break-word;
}

#bundle-error {
  color: red;
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 10px;
  font-family: Futura, sans-serif;
}

.bundle-right h2 {
  font-family: Futura, sans-serif !important;
  color: #41525a !important;
  font-size: clamp(1.1rem, 0.9rem + 0.8vw, 1.4rem) !important;
  font-weight: 700 !important;
  margin-bottom: 1rem !important;
  line-height: 1.4 !important;
}

@media (max-width: 768px) {
  .custom-bundle-builder {
    flex-direction: column;
  }

  .bundle-left,
  .bundle-right {
    width: 100%;
  }

  .product-card {
    width: 100%;
  }

  #selected-products {
    justify-content: flex-start;
  }
}

@keyframes fadeIn {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes slotFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}