.dp-bundle-wrap {
  width: 100%;
}

.dp-bundle-items {
  display: grid;
  grid-template-columns: repeat(var(--dp-bundle-columns, 3), minmax(0, 1fr));
  gap: 16px;
}

.dp-bundle-layout-list .dp-bundle-items {
  display: flex;
  flex-direction: column;
}

.dp-bundle-item {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 14px;
  padding-right: 52px;
  background: #fff;
  transition: opacity 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.dp-bundle-layout-grid .dp-bundle-item {
  flex-direction: column;
}

.dp-bundle-layout-list .dp-bundle-item {
  align-items: stretch;
}

.dp-bundle-item-image {
  display: block;
  width: 100%;
  max-width: 180px;
  flex: 0 0 auto;
  line-height: 0;
}

.dp-bundle-layout-grid .dp-bundle-item-image {
  width: 100%;
  max-width: none;
}

.dp-bundle-layout-list .dp-bundle-item-image {
  width: 120px;
  max-width: 120px;
  align-self: stretch;
}

.dp-bundle-item-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

.dp-bundle-layout-list .dp-bundle-item-image img {
  height: 100%;
  min-height: 100%;
}

.dp-bundle-item-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.dp-bundle-item-title {
  font-weight: 700;
  text-decoration: none;
  color: inherit;
  line-height: 1.25;
}

.dp-bundle-item-qty {
  font-size: 13px;
  opacity: 0.75;
}

.dp-bundle-item-price {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.dp-bundle-item-price del {
  opacity: 0.55;
}

.dp-bundle-item-price ins {
  text-decoration: none;
  font-weight: 700;
}

.dp-bundle-discount-badge,
.dp-bundle-cart-parent-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  background: #111;
  color: #fff;
}

.dp-bundle-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.dp-bundle-total {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dp-bundle-total span {
  opacity: 0.75;
}

.dp-bundle-total strong {
  font-size: 1.1em;
}

.dp-bundle-empty,
.dp-bundle-notice {
  padding: 12px 14px;
  border: 1px dashed rgba(0, 0, 0, 0.18);
  border-radius: 10px;
}

.dp-bundle-cart-child-name {
  font-size: 12px;
  opacity: 0.7;
}

.dp-bundle-cart-parent-label {
  margin-left: 6px;
  vertical-align: middle;
}

.dp-bundle-cart-items {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.025);
  font-size: 13px;
  line-height: 1.45;
}

.dp-bundle-cart-items-title {
  margin-bottom: 6px;
  font-weight: 700;
  color: inherit;
}

.dp-bundle-cart-items ul {
  margin: 0;
  padding-left: 18px;
  list-style: disc;
}

.dp-bundle-cart-items li {
  margin: 4px 0;
}

.dp-bundle-cart-item-name {
  font-weight: 600;
}

.dp-bundle-cart-item-meta {
  opacity: 0.75;
}

.dp-bundle-cart-item-data-list {
  margin: 6px 0 0;
  padding-left: 18px;
  list-style: disc;
}

.dp-bundle-cart-item-data-list li {
  margin: 3px 0;
}

.woocommerce-cart-form .product-name .dp-bundle-cart-items,
.woocommerce-checkout-review-order-table .product-name .dp-bundle-cart-items {
  margin-top: 8px;
}

.dp-bundle-selector {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dp-bundle-selector input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dp-bundle-selector-box {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 999px;
  background: #fff;
  color: #111;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.dp-bundle-selector-box::before {
  content: '+';
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-1px);
}

.dp-bundle-selector input:checked + .dp-bundle-selector-box {
  border-color: #111;
  background: #111;
  color: #fff;
}

.dp-bundle-selector input:checked + .dp-bundle-selector-box::before {
  content: '×';
  font-size: 18px;
}

.dp-bundle-selector:hover .dp-bundle-selector-box {
  transform: scale(1.04);
}

.dp-bundle-item.is-selected {
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.dp-bundle-item.is-deselected {
  opacity: 0.55;
}

.dp-bundle-item.is-deselected .dp-bundle-item-image,
.dp-bundle-item.is-deselected .dp-bundle-item-content {
  filter: grayscale(0.25);
}

@media (max-width: 767px) {
  .dp-bundle-items {
    grid-template-columns: 1fr;
  }

  .dp-bundle-layout-grid .dp-bundle-item {
    flex-direction: column;
  }

  .dp-bundle-layout-grid .dp-bundle-item-image {
    width: 100%;
    max-width: none;
  }

  .dp-bundle-layout-list .dp-bundle-item-image {
    width: 90px;
    max-width: 90px;
  }
}


/* v1.0.12: Grid image full-width, optional selection controls, and Bricks Query Loop support. */
.dp-bundle-layout-grid .dp-bundle-item {
  padding: 0;
  overflow: visible;
}

.dp-bundle-layout-grid .dp-bundle-item-image {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  flex-basis: auto;
  margin: 0;
  line-height: 0;
}

.dp-bundle-layout-grid .dp-bundle-item-image img {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto;
  border-radius: 12px 12px 0 0;
}

.dp-bundle-layout-grid .dp-bundle-item-content {
  width: 100%;
  padding: 0 14px 14px;
  box-sizing: border-box;
}

.dp-bundle-layout-grid .dp-bundle-selector {
  top: -12px;
  right: -12px;
}

.dp-bundle-layout-list .dp-bundle-item-image {
  align-self: stretch;
}

.dp-bundle-layout-list .dp-bundle-item-image img {
  height: 100% !important;
  min-height: 100%;
}

.dp-bundle-locked-quantity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 4px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  color: #111827;
  font-weight: 600;
}
