.hqb-shortcode-shell {
  --hqb-accent: #ce3e2b;
  --hqb-accent-dark: #9d2d20;
  --hqb-ink: #1f2937;
  --hqb-soft-ink: #5b6472;
  --hqb-border: #e5e7eb;
  --hqb-surface: #ffffff;
  --hqb-surface-alt: #f7f7f8;
  --hqb-success: #0f766e;
  --hqb-error: #b42318;
  margin: 40px 0;
  color: var(--hqb-ink);
  font-family: "Roboto", sans-serif;
}

.hqb-shortcode-title {
  margin-bottom: 18px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.hqb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.9fr);
  gap: 24px;
}

.hqb-panel {
  background: var(--hqb-surface);
  border: 1px solid var(--hqb-border);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
}

.hqb-panel--builder {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hqb-panel--summary {
  position: sticky;
  top: 24px;
  align-self: start;
}

.hqb-panel-section {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hqb-border);
}

.hqb-panel-section:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.hqb-section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.hqb-section-heading h2 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.2;
}

.hqb-section-heading p,
.hqb-slot__header p,
.hqb-empty-state,
.hqb-item-card__body span,
.hqb-summary-row span,
.hqb-quote-meta span {
  margin: 0;
  color: var(--hqb-soft-ink);
  font-size: 14px;
  line-height: 1.5;
}

.hqb-system-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hqb-system-chip,
.hqb-secondary-button,
.hqb-icon-button,
.hqb-primary-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  transition: 0.2s ease;
}

.hqb-system-chip {
  background: var(--hqb-surface-alt);
  color: var(--hqb-ink);
  padding: 12px 18px;
  font-weight: 600;
}

.hqb-system-chip.is-active {
  background: var(--hqb-accent);
  color: #fff;
}

.hqb-slot-list {
  display: grid;
  gap: 18px;
}

.hqb-slot {
  padding: 18px;
  border: 1px solid var(--hqb-border);
  border-radius: 22px;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
}

.hqb-slot__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.hqb-slot__header h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.hqb-badge {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hqb-badge.is-required {
  background: rgba(206, 62, 43, 0.12);
  color: var(--hqb-accent);
}

.hqb-badge.is-optional {
  background: rgba(15, 118, 110, 0.12);
  color: var(--hqb-success);
}

.hqb-item-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.hqb-item-entry {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.hqb-item-entry.is-selected {
  flex-direction: row;
}

.hqb-item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--hqb-border);
  border-radius: 18px;
  background: #fff;
  text-align: left;
  min-width: 0;
  flex: 1 1 auto;
}

.hqb-item-card:hover,
.hqb-item-card.is-selected {
  border-color: rgba(206, 62, 43, 0.45);
  box-shadow: 0 10px 25px rgba(206, 62, 43, 0.12);
  transform: translateY(-1px);
}

.hqb-item-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #f7d4ce, #f8efe4);
  flex-shrink: 0;
}

.hqb-item-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hqb-item-card__media.is-placeholder span {
  font-size: 26px;
  font-weight: 700;
  color: var(--hqb-accent);
}

.hqb-item-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.hqb-item-card__body strong {
  font-size: 15px;
  line-height: 1.4;
  word-break: break-word;
}

.hqb-item-card__body span {
  word-break: break-word;
}

.hqb-item-card__price {
  color: var(--hqb-accent);
  font-weight: 700;
}

.hqb-item-entry__qty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 14px 12px;
  border: 1px solid rgba(206, 62, 43, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff7f4 0%, #fff 100%);
  align-self: stretch;
  flex: 0 0 156px;
  width: 156px;
  box-sizing: border-box;
}

.hqb-item-entry__qty-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hqb-soft-ink);
  text-align: center;
}

.hqb-qty {
  display: grid;
  grid-template-columns: 30px minmax(64px, 1fr) 30px;
  gap: 6px;
  align-items: center;
  width: 100%;
  max-width: none;
}

.hqb-qty__button {
  width: 30px;
  min-height: 42px;
  border: 1px solid var(--hqb-border);
  border-radius: 12px;
  background: #fff;
  color: var(--hqb-accent);
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: 0.2s ease;
}

.hqb-qty__button:hover {
  border-color: rgba(206, 62, 43, 0.45);
  background: #fff4f1;
}

.hqb-qty__input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--hqb-border);
  border-radius: 12px;
  padding: 8px 6px;
  background: #fff;
  color: var(--hqb-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  box-sizing: border-box;
  appearance: textfield;
  -moz-appearance: textfield;
}

.hqb-qty__input:focus {
  outline: none;
  border-color: rgba(206, 62, 43, 0.55);
  box-shadow: 0 0 0 4px rgba(206, 62, 43, 0.12);
}

.hqb-qty__input::-webkit-outer-spin-button,
.hqb-qty__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.hqb-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hqb-field span {
  font-size: 14px;
  font-weight: 600;
}

.hqb-field input,
.hqb-additional-row input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--hqb-border);
  border-radius: 16px;
  padding: 12px 14px;
  background: #fff;
  color: var(--hqb-ink);
  font: inherit;
}

.hqb-field input:focus,
.hqb-additional-row input:focus {
  outline: none;
  border-color: rgba(206, 62, 43, 0.55);
  box-shadow: 0 0 0 4px rgba(206, 62, 43, 0.12);
}

.hqb-field--quantity {
  max-width: 170px;
  margin-top: 14px;
}

.hqb-additional-list {
  display: grid;
  gap: 12px;
}

.hqb-additional-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px auto;
  gap: 12px;
}

.hqb-additional-picker {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hqb-additional-trigger {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--hqb-border);
  border-radius: 16px;
  background: #fff;
  color: var(--hqb-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.hqb-additional-trigger:focus,
.hqb-additional-trigger[aria-expanded="true"] {
  outline: none;
  border-color: rgba(206, 62, 43, 0.55);
  box-shadow: 0 0 0 4px rgba(206, 62, 43, 0.12);
}

.hqb-additional-trigger__placeholder {
  color: var(--hqb-ink);
}

.hqb-additional-selection,
.hqb-additional-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 100%;
}

.hqb-additional-selection__media,
.hqb-additional-option__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #f7d4ce, #f8efe4);
  flex-shrink: 0;
}

.hqb-additional-selection__media img,
.hqb-additional-option__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hqb-additional-selection__media.is-placeholder span,
.hqb-additional-option__media.is-placeholder span {
  font-size: 18px;
  font-weight: 700;
  color: var(--hqb-accent);
}

.hqb-additional-selection__body,
.hqb-additional-option__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hqb-additional-selection__name,
.hqb-additional-option__name {
  color: var(--hqb-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}

.hqb-additional-selection__price,
.hqb-additional-option__price {
  color: var(--hqb-soft-ink);
  font-size: 12px;
  line-height: 1.4;
}

.hqb-additional-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  border: 1px solid var(--hqb-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.hqb-additional-dropdown__search {
  padding: 10px 10px 0;
}

.hqb-additional-search {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--hqb-border);
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff;
  color: var(--hqb-ink);
  font: inherit;
}

.hqb-additional-search:focus {
  outline: none;
  border-color: rgba(206, 62, 43, 0.55);
  box-shadow: 0 0 0 4px rgba(206, 62, 43, 0.12);
}

.hqb-additional-dropdown__list {
  max-height: 360px;
  overflow-y: auto;
  padding: 10px;
}

.hqb-additional-option {
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #fff;
  color: var(--hqb-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.hqb-additional-option:hover,
.hqb-additional-option.is-selected {
  border-color: rgba(206, 62, 43, 0.32);
  background: #fff7f4;
}

.hqb-additional-option + .hqb-additional-option {
  margin-top: 6px;
}

.hqb-additional-selection__name {
  color: var(--hqb-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}

.hqb-customer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hqb-primary-button {
  background: var(--hqb-accent);
  color: #fff;
  padding: 14px 22px;
  font-weight: 700;
}

.hqb-primary-button:hover:not(:disabled) {
  background: var(--hqb-accent-dark);
}

.hqb-primary-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.hqb-secondary-button,
.hqb-icon-button {
  background: var(--hqb-surface-alt);
  color: var(--hqb-ink);
  padding: 12px 16px;
  font-weight: 600;
}

.hqb-secondary-button--full {
  width: 100%;
  margin-top: 18px;
}

.hqb-actions {
  padding-top: 6px;
}

.hqb-summary-list {
  display: grid;
  gap: 14px;
}

.hqb-summary-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hqb-border);
}

.hqb-summary-row strong {
  display: block;
  margin-bottom: 4px;
}

.hqb-summary-price {
  text-align: right;
}

.hqb-total-row,
.hqb-quote-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

.hqb-total-row strong,
.hqb-quote-meta strong {
  font-size: 18px;
}

.hqb-empty-state {
  padding: 14px 0;
}

.hqb-message {
  border-radius: 18px;
  padding: 14px 16px;
  font-weight: 600;
}

.hqb-message--error {
  background: rgba(180, 35, 24, 0.08);
  color: var(--hqb-error);
}

.hqb-message--success {
  background: rgba(15, 118, 110, 0.08);
  color: var(--hqb-success);
}

.hqb-loading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hqb-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(206, 62, 43, 0.18);
  border-top-color: var(--hqb-accent);
  border-radius: 50%;
  animation: hqb-spin 0.8s linear infinite;
}

@keyframes hqb-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 991px) {
  .hqb-layout {
    grid-template-columns: 1fr;
  }

  .hqb-panel--summary {
    position: static;
  }

  .hqb-customer-grid {
    grid-template-columns: 1fr;
  }

  .hqb-item-entry.is-selected {
    flex-direction: row;
  }
}

@media (max-width: 767px) {
  .hqb-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .hqb-section-heading,
  .hqb-slot__header {
    flex-direction: column;
  }

  .hqb-item-grid,
  .hqb-additional-row {
    grid-template-columns: 1fr;
  }

  .hqb-item-entry.is-selected {
    flex-direction: column;
  }

  .hqb-item-card {
    align-items: start;
  }

  .hqb-item-entry__qty {
    align-items: stretch;
  }

  .hqb-qty {
    grid-template-columns: 36px minmax(72px, 1fr) 36px;
  }

  .hqb-qty__button,
  .hqb-qty__input {
    min-height: 46px;
  }

  .hqb-item-entry__qty {
    width: 100%;
    flex: 0 0 auto;
  }
}
