*{
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: Arial, sans-serif;
  background: #fafafa;
  color: #333;
  padding: 20px;
}

.bundle-builder {
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
  gap: 30px;
  flex-wrap: wrap;
}

.products-section {
  flex: 2;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(180px,1fr));
  gap: 24px;
}

.product-card {
  background: white;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.3s ease;
}
.product-card:hover {
  box-shadow: 0 6px 16px rgb(0 0 0 / 0.15);
}
.product-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
}
.product-title {
  font-weight: 700;
  font-size: 1.1rem;
}
.product-price {
  color: #666;
  margin-bottom: 8px;
}

.toggle-btn {
  padding: 10px 18px;
  border: none;
  border-radius: 24px;
  background-color: #ddd;
  color: #555;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  user-select: none;
  min-width: 140px;
  position: relative;
  overflow: hidden;
}
.toggle-btn.active {
  background-color: #007acc;
  color: white;
}
.toggle-btn.active::after {
  content: '✓';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  animation: checkAnim 0.4s forwards;
  font-weight: bold;
}
@keyframes checkAnim {
  to {
    transform: translateY(-50%) scale(1);
  }
}


.bundle-sidebar {
  flex: 1;
  background: white;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  position: sticky;
  top: 20px;
  height: fit-content;
}


.progress-container {
  margin-bottom: 20px;
}
.progress-text {
  font-weight: 600;
  margin-bottom: 7px;
  font-size: 1.1rem;
}
.progress-bar {
  background: #ddd;
  height: 14px;
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
}
.progress-fill {
  height: 100%;
  background: #007acc;
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 10px 0 0 10px;
}


.selected-products {
  list-style: none;
  max-height: 260px;
  overflow-y: auto;
  padding-top: 12px;
  border-top: 1px solid #ccc;
  margin-bottom: 20px;
}
.selected-product-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.selected-product-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
}
.selected-product-info {
  flex-grow: 1;
}
.selected-product-name {
  font-weight: 700;
}
.selected-product-price {
  color: #555;
  font-size: 0.9rem;
}


.quantity-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}
.stepper-btn {
  width: 26px;
  height: 26px;
  border: 1px solid #aaa;
  border-radius: 4px;
  background: white;
  color: #333;
  font-weight: 700;
  font-size: 18px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.2s;
}
.stepper-btn:hover {
  background-color: #e5e5e5;
}
.stepper-input {
  width: 38px;
  text-align: center;
  border: 1px solid #aaa;
  border-radius: 4px;
  font-size: 1rem;
  padding: 2px 6px;
}

.discount-info {
  font-weight: 700;
  color: #b53014;
  margin-bottom: 10px;
}
.subtotal-info {
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.cta-button {
  width: 100%;
  padding: 14px 0;
  background: #ccc;
  border: none;
  border-radius: 30px;
  font-size: 1.1rem;
  color: white;
  font-weight: 700;
  cursor: not-allowed;
  transition: background-color 0.3s ease;
}
.cta-button.enabled {
  background: #007acc;
  cursor: pointer;
}
.cta-button:focus-visible {
  outline: 3px solid #005f99;
  outline-offset: 3px;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal.hidden {
  display: none;
}
.modal-content {
  background: white;
  padding: 24px;
  border-radius: 12px;
  width: 90%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}
.modal-content h2 {
  margin-bottom: 16px;
  font-weight: 700;
}
#cartItemsList {
  list-style: none;
  margin-bottom: 20px;
  padding-left: 0;
}
#cartItemsList li {
  margin-bottom: 10px;
  font-size: 1rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 6px;
  display: flex;
  justify-content: space-between;
}
.total {
  font-weight: 700;
  font-size: 1.2rem;
}
#closeCartBtn {
  padding: 10px 20px;
  background: #007acc;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
#closeCartBtn:hover {
  background: #005f99;
}

/* Responsive */
@media (max-width: 768px) {
  .bundle-builder {
    flex-direction: column;
  }
  .bundle-sidebar {
    position: relative;
    top: auto;
    margin-top: 30px;
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .bundle-builder {
    flex-direction: column; 
  }
  .products-grid {
    grid-template-columns: 1fr; 
  }
  .bundle-sidebar {
    position: relative; 
    top: auto;
    margin-top: 30px; 
  }
}




.bundle-heading {
  width: 100%;
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

