.product-bundle-section {
  --bundle-gap: var(--bundle-column-gap, 20px);
  background-color: var(--section-bg-color, #f5f5f5) !important;
  display: block;
  width: 100%;
  padding-top: var(--padding-section-top, 60px);
  padding-bottom: var(--padding-section-bottom, 60px);
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

.product-bundle-heading {
  margin-bottom: 30px;
}

.product-bundle-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: flex-start;
}

.product-bundle-products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--bundle-gap);
}

.product-bundle-item {
  position: relative;
}

.product-bundle-item.active-bundle .product-bundle-card {
  border-color: var(--color-primary) !important;
  background: var(--card-bg-color, #ffffff) !important;
  box-shadow: 0 0 0 2px var(--color-primary);
}

.product-bundle-card {
  display: flex;
  align-items: flex-start;
  padding: 15px;
  background: var(--card-bg-color, #ffffff);
  border-radius: var(--block-border-radius);
  border: 1px solid var(--color-border);
  height: 100%;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.product-bundle-media {
  width: 80px;
  min-width: 80px;
  margin-right: 15px;
}

.product-bundle-media a {
  display: block;
}

.product-bundle-media img,
.product-bundle-media svg {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--block-border-radius);
}

.product-bundle-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.product-bundle-title {
  font-size: var(--font-size-small);
  font-weight: 500;
  line-height: 1.3;
}

.product-bundle-title a {
  color: inherit;
  text-decoration: none;
}

.product-bundle-title a:hover {
  text-decoration: underline;
}

.product-bundle-price {
  font-size: var(--font-size-small);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.product-compare-price {
  text-decoration: line-through;
  opacity: 0.6;
}

.product-bundle-buttons {
  margin-top: auto;
}

.product-bundle-button:has(.hidden) {
  display: none;
}

.product-bundle-button .btn {
  padding: 10px 20px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-bundle-button .btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.product-bundle-amount {
  padding: 30px;
  background: var(--card-bg-color, #ffffff);
  border-radius: var(--block-border-radius);
  border: 1px solid var(--color-border);
}

.product-bundle--sticky {
  position: sticky;
  top: 100px;
  text-align: center;
}

.product-bundle--title {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 10px;
  font-family: var(--font-heading);
}

.product-bundle--description {
  font-size: var(--font-size-small);
  opacity: 0.8;
  margin-bottom: 20px;
}

.progress {
  margin: 25px auto;
  padding: 0;
  width: 100%;
  height: 6px;
  overflow: hidden;
  background: #e0e0e0;
  border-radius: 3px;
  display: block !important;
}

.progressbar {
  position: relative;
  display: block;
  min-width: 0%;
  width: 0%;
  height: 100%;
  background: var(--color-primary, #242424);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.product-bundle-discount-badge {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-primary-contrast, #fff);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 15px;
}

.product-bundle-count {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.product-bundle-prices {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-bundle-count-label {
  font-size: var(--font-size-base);
  font-weight: 400;
}

.product-bundle-original-price {
  font-size: var(--font-size-base);
  text-decoration: line-through;
  opacity: 0.6;
  margin: 0;
}

.product-bundle-count-price {
  font-size: 28px;
  font-weight: 600;
  margin: 0;
}

.product-bundle-savings {
  font-size: var(--font-size-small);
  color: var(--color-success, #28a745);
  margin-bottom: 15px;
}

.product-bundle--button {
  margin-top: 20px;
}

.product-bundle--button .btn {
  width: 100%;
}

.product-bundle--button .loading--spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.product-bundle--button .loading--spinner svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.product-form-error-message-wrapper {
  margin-bottom: 10px;
  color: var(--color-error, #dc3545);
  font-size: var(--font-size-small);
}

.hidden {
  display: none !important;
}

/* Image Size Classes */
.image-size--small .product-bundle-media {
  width: 70px;
  min-width: 70px;
}

.image-size--medium .product-bundle-media {
  width: 100px;
  min-width: 100px;
}

.image-size--large .product-bundle-media {
  width: 130px;
  min-width: 130px;
}

/* Desktop Styles */
@media (min-width: 992px) {
  .product-bundle-grid {
    grid-template-columns: 1fr 320px;
    gap: 30px;
  }

  .product-bundle-products {
    grid-template-columns: repeat(3, 1fr);
  }

  .image-size--small .product-bundle-media {
    width: 80px;
    min-width: 80px;
  }

  .image-size--medium .product-bundle-media {
    width: 120px;
    min-width: 120px;
  }

  .image-size--large .product-bundle-media {
    width: 150px;
    min-width: 150px;
  }

  .product-bundle-amount {
    padding: 40px 30px;
  }
}

@media (min-width: 1200px) {
  .image-size--small .product-bundle-media {
    width: 90px;
    min-width: 90px;
  }

  .image-size--medium .product-bundle-media {
    width: 140px;
    min-width: 140px;
  }

  .image-size--large .product-bundle-media {
    width: 170px;
    min-width: 170px;
  }
}

/* Tablet Styles */
@media (max-width: 991px) {
  .product-bundle-products {
    margin-bottom: 20px;
    grid-template-columns: repeat(2, 1fr);
  }

  .product-bundle-amount {
    max-width: 400px;
    margin: 0 auto;
  }
}

/* Mobile Styles */
@media (max-width: 767px) {
  .product-bundle-section {
    --bundle-gap: var(--bundle-column-gap-mobile, 15px);
  }

  .product-bundle-products {
    display: flex;
    overflow-x: auto;
    padding-bottom: 15px;
    gap: var(--bundle-gap);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .product-bundle-item {
    flex: 0 0 85%;
    max-width: 85%;
    scroll-snap-align: start;
  }

  .product-bundle-card {
    flex-direction: row;
  }

  .product-bundle-media {
    width: 80px;
    min-width: 80px;
    margin-right: 15px;
    margin-bottom: 0;
  }

  .product-bundle-amount {
    padding: 25px 20px;
  }

  .product-bundle--title {
    font-size: 20px;
  }

  .product-bundle-count-price {
    font-size: 24px;
  }
}
