.tmm-bb {
  --tmm-bb-accent: #de9b4a;
  --tmm-bb-dark: #333;
  --tmm-bb-bg: #fff2e3;
  --tmm-bb-border: rgba(0, 0, 0, 0.15);
  --tmm-bb-backorder: #fff3bf;
  --tmm-bb-radius: 0px;
  font-size: 16px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 960px) {
  .tmm-bb {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.tmm-bb__main {
  background: var(--tmm-bb-bg);
  padding: 18px;
  border: 1px solid var(--tmm-bb-border);
  border-radius: var(--tmm-bb-radius);
}

.tmm-bb__header {
  background: var(--tmm-bb-dark);
  color: #fff;
  padding: 10px 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: -18px -18px 18px -18px;
}

.tmm-bb__title {
  font-weight: 700;
  line-height: 1.2;
}

.tmm-bb__step-indicator {
  font-size: 0.95em;
  opacity: 0.9;
  white-space: nowrap;
}

.tmm-bb__group-title {
  font-weight: 700;
  font-size: 1.25em;
  margin-bottom: 6px;
  line-height: 1.25;
}

.tmm-bb__bundle-name {
  margin: 0 0 14px 0;
}

.tmm-bb__bundle-name-label {
  display: block;
  font-weight: 700;
  margin: 0 0 6px 0;
}

.tmm-bb__bundle-name-input {
  width: 100%;
  max-width: 520px;
  border: 1px solid var(--tmm-bb-border);
  padding: 10px 12px;
  border-radius: 0;
}

.tmm-bb__sidebar-item--bundle-name .tmm-bb__sidebar-item-title {
  color: var(--tmm-bb-accent);
}

.tmm-bb__group-desc {
  margin-bottom: 10px;
}

.tmm-bb__group-optional {
  display: inline-block;
  background: rgba(0, 0, 0, 0.08);
  padding: 3px 8px;
  font-size: 0.9em;
}

.tmm-bb__products {
  display: grid;
  gap: 12px;
}

.tmm-bb__product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
}

.tmm-bb__product-row--selected {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.tmm-bb__product-row .tmm-bb__product {
  min-width: 0;
}

.tmm-bb__step-hint {
  margin: 10px 0 0 0;
  font-size: 0.9em;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.65);
  max-width: 40em;
}

.tmm-bb__product {
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--tmm-bb-border);
  background: #fff;
  cursor: pointer;
  border-radius: var(--tmm-bb-radius);
  transition: background 0.2s ease-in-out;
}

.tmm-bb__product:hover, .tmm-bb__product:focus {
background: #fff;
  border: 1px solid var(--tmm-bb-accent);
}

.tmm-bb__product.is-selected {
  /*
  color: #fff;
  border-color: rgba(0, 0, 0, 0.25);
  */
  border: 3px solid var(--tmm-bb-accent);
}

.tmm-bb__product.is-selected .tmm-bb__product-price,
.tmm-bb__product.is-selected .tmm-bb__product-desc {
 /* color: #fff;
 */
}

.tmm-bb__product.is-backorder {
  background: var(--tmm-bb-backorder);
}

.tmm-bb__product.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.tmm-bb__img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--tmm-bb-radius);
}

.tmm-bb__img--placeholder {
  background: rgba(0, 0, 0, 0.08);
  aspect-ratio: 1 / 1;
}

.tmm-bb__product-body {
  min-width: 0;
}

.tmm-bb__product-title {
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.25;
  color:#000;
}

.tmm-bb__badge {
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 2px 6px;
  font-size: 0.85em;
  margin-left: 6px;
  border-radius: var(--tmm-bb-radius);
}

.tmm-bb__product-desc {
  color: rgba(0, 0, 0, 0.75);
  line-height: 1.35;
}

.tmm-bb__product-price {
  font-weight: 700;
  margin-top: 8px;
  color:#958e09;
}

.tmm-bb__stock--out {
  margin-top: 6px;
  font-weight: 700;
}

.tmm-bb__qty {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: start;
}

.tmm-bb__qty-label {
  font-weight: 700;
  padding-top: 8px;
}

.tmm-bb__qty-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.tmm-bb__qty-btn {
  border: 1px solid var(--tmm-bb-border);
  background: #fff;
  padding: 10px 0;
  cursor: pointer;
  border-radius: var(--tmm-bb-radius);
  color:#000;
}

.tmm-bb__qty-btn.is-active {
  background: var(--tmm-bb-accent);
  color: #fff;
  border-color: rgba(0, 0, 0, 0.25);
}

.tmm-bb__clear-selection {
  border: 1px solid var(--tmm-bb-border);
  background: #fff;
  cursor: pointer;
  border-radius: var(--tmm-bb-radius);
  font: inherit;
  line-height: 1.2;
  color: var(--tmm-bb-dark);
}

.tmm-bb__clear-selection--inline {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 8px 12px;
  min-height: 44px;
  min-width: 52px;
  flex-shrink: 0;
}

.tmm-bb__clear-selection--inline .tmm-bb__clear-label {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
}

.tmm-bb__clear-selection:hover,
.tmm-bb__clear-selection:focus {
  border-color: var(--tmm-bb-accent);
  outline: none;
}

.tmm-bb__clear-selection:focus-visible {
  outline: 2px solid var(--tmm-bb-accent);
  outline-offset: 2px;
}

.tmm-bb__clear-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35em;
  height: 1.35em;
  font-size: 1.5em;
  line-height: 1;
  font-weight: 700;
  color: var(--tmm-bb-dark);
}

.tmm-bb__clear-selection--inline .tmm-bb__clear-icon {
  margin-bottom: 2px;
}

.tmm-bb__nav {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  align-items: center;
  flex-wrap: wrap;
}

/*
 * Finish ("Add to basket") button: visually distinct so customers know it's the final action.
 * Brand green #66d36b with dark text (white-on-#66d36b only reaches ~1.9:1 — fails WCAG;
 * dark text reaches ~11:1 which passes AAA for normal text).
 */
.tmm-bb__btn.tmm-bb__btn--finish,
.tmm-bb .tmm-bb__btn--finish {
  background: #66d36b;
  color: #0a2a0c;
  border: 1px solid #4ea552;
  font-weight: 700;
}

.tmm-bb__btn.tmm-bb__btn--finish:hover,
.tmm-bb__btn.tmm-bb__btn--finish:focus,
.tmm-bb .tmm-bb__btn--finish:hover,
.tmm-bb .tmm-bb__btn--finish:focus {
  background: #57c25c;
  color: #0a2a0c;
  border-color: #2f7a33;
}

.tmm-bb__btn.tmm-bb__btn--finish:focus-visible,
.tmm-bb .tmm-bb__btn--finish:focus-visible {
  outline: 3px solid #0a2a0c;
  outline-offset: 2px;
}

.tmm-bb__notice {
  margin-top: 12px;
  font-weight: 700;
}

.tmm-bb__sidebar {
  border: 1px solid var(--tmm-bb-border);
  background: #fff;
  border-radius: var(--tmm-bb-radius);
}

.tmm-bb__sidebar-title {
  background: var(--tmm-bb-dark);
  color: #fff;
  padding: 10px 12px;
  font-weight: 700;
}

.tmm-bb__sidebar-items {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.tmm-bb__sidebar-item {
  border-bottom: 1px solid var(--tmm-bb-border);
  padding-bottom: 10px;
}

.tmm-bb__sidebar-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.tmm-bb__sidebar-item-title {
  font-weight: 700;
  line-height: 1.25;
}

.tmm-bb__sidebar-item-sub {
  font-size: 0.9em;
  opacity: 0.8;
}

.tmm-bb__sidebar-item-qty {
  margin-top: 6px;
  font-weight: 700;
}

.tmm-bb__sidebar-empty {
  opacity: 0.7;
}

.tmm-bb__sidebar-total {
  padding: 12px;
  background: var(--tmm-bb-bg);
  border-top: 1px solid var(--tmm-bb-border);
}

.tmm-bb__sidebar-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Mobile typography + spacing tightening */
@media (max-width: 767px) {
  .tmm-bb {
    font-size: 14px;
  }

  .tmm-bb__main {
    padding: 14px;
  }

  .tmm-bb__header {
    margin: -14px -14px 14px -14px;
    padding: 9px 10px;
  }

  .tmm-bb__title {
    font-size: 1.05em;
  }

  .tmm-bb__group-title {
    font-size: 1.15em;
  }

  .tmm-bb__product {
    grid-template-columns: 92px 1fr;
    gap: 10px;
    padding: 10px;
  }

  .tmm-bb__product-row--selected {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
  }

  .tmm-bb__clear-selection--inline {
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    width: 100%;
    padding: 10px 14px;
  }

  .tmm-bb__clear-selection--inline .tmm-bb__clear-icon {
    margin-bottom: 0;
    font-size: 1.35em;
  }

  .tmm-bb__clear-selection--inline .tmm-bb__clear-label {
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: normal;
  }

  .tmm-bb__qty {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tmm-bb__qty-label {
    padding-top: 0;
  }

  .tmm-bb__qty-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
  }

  .tmm-bb__qty-btn {
    padding: 9px 0;
    font-size: 0.95em;
  }

  .tmm-bb__sidebar-items {
    padding: 10px;
    gap: 8px;
  }
}

