/* Wrapper card */
#cbr-wrap {
  max-width: 1000px;
  margin: 2rem auto 4rem auto;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #0f172a;
}

.cbr-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(15,23,42,.08);
  padding: 1.5rem 1.5rem 2rem;
  margin-bottom: 2rem;
  border: 1px solid #e2e8f0;
}

.cbr-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: .2px;
  margin: 0 0 1.5rem;
  text-transform: uppercase;
  text-align: left;
  color: #0f172a;
}

/* Campi form */
.cbr-field {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}
.cbr-label {
  font-size: .9rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: .4rem;
}
.cbr-select,
.cbr-input-date {
  width: 100%;
  font-size: 1rem;
  line-height: 1.4;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: .8rem 1rem;
  color: #0f172a;
  outline: none;
  transition: box-shadow .15s, border-color .15s;
}
.cbr-select:focus,
.cbr-input-date:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgb(59 130 246 / 20%);
}

/* Testo aiuto */
.cbr-hint {
  font-size: .9rem;
  color: #475569;
  line-height: 1.4;
  margin: .5rem 0 1rem;
}

/* Pulsanti */
.cbr-actions {
  text-align: right;
}
.cbr-btn-primary {
  display: inline-block;
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  letter-spacing: .2px;
  border: 0;
  border-radius: 12px;
  padding: .8rem 1rem;
  cursor: pointer;
  transition: filter .15s, transform .15s;
}
.cbr-btn-primary:hover:not([disabled]) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.cbr-btn-primary[disabled],
.cbr-btn-primary.cbr-btn-loading {
  opacity: .5;
  cursor: not-allowed;
}

/* Step 2 header */
.cbr-results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  row-gap: .75rem;
  column-gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.cbr-summary {
  font-size: .95rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
}

.cbr-btn-ghost {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: .6rem .9rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  transition: background-color .15s, box-shadow .15s;
}
.cbr-btn-ghost:hover {
  background: #f8fafc;
  box-shadow: 0 8px 22px rgba(2,6,23,.07);
}

/* Griglia prodotti */
.cbr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px,100%),1fr));
  gap: 1rem 1rem;
}

.cbr-empty {
  text-align: center;
  font-size: .95rem;
  font-weight: 600;
  color: #64748b;
  padding: 2rem 0;
}

/* Card prodotto singolo */
.cbr-prod-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 16px 32px rgba(15,23,42,.06);
  padding: 1rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cbr-prod-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.cbr-prod-photo {
  width: 96px;
  min-width: 96px;
  height: 96px;
  border-radius: 14px;
  background-color: #e2e8f0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.8),
    0 4px 16px rgba(15,23,42,.15);
}

.cbr-prod-main {
  flex: 1;
  min-width: 0;
}
.cbr-prod-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: .25rem;
}
.cbr-prod-brand {
  font-size: .9rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: .25rem;
}
.cbr-prod-height {
  font-size: .8rem;
  font-weight: 500;
  color: #64748b;
  margin-bottom: .25rem;
}
.cbr-prod-desc {
  font-size: .8rem;
  font-weight: 500;
  color: #1e293b;
  margin-bottom: .4rem;
}
.cbr-prod-stock {
  font-size: .8rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: .4rem;
}
.cbr-prod-meta {
  font-size: .75rem;
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .4rem;
}

/* Badges stile catalogo */
.cbr-badge {
  display: inline-flex;
  align-items: center;
  font-size: .7rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: .6rem;
  padding: .3rem .5rem;
  color: #fff;
  background: #1e40af;
}
.cbr-badge-type {
  background: #0ea5e9;
}
.cbr-badge-age {
  background: #64748b;
}
.cbr-badge-level {
  background: #1d4ed8;
}

/* prezzi */
.cbr-prod-prices {
  margin-top: .75rem;
  font-size: .8rem;
  font-weight: 500;
  color: #0f172a;
  line-height: 1.4;
}
.cbr-prod-priceline {
  word-break: break-word;
}

/* CTA */
.cbr-prod-cta {
  margin-top: 1rem;
  text-align: center;
}
.cbr-btn-secondary {
  display: inline-block;
  background: #0f172a;
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: .6rem .9rem;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s, transform .15s;
  width: 100%;
}
.cbr-btn-secondary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
