/* Bloque del selector opcional */
.fpbfw-components {
  margin: 16px 0;
  border: 1px solid #e6e8ee;
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.fpbfw-components legend {
  padding: 0 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #26374f;
}

.fpbfw-components-grid {
  display: grid;
  gap: 14px;
}

.fpbfw-bundle-status {
  display: grid;
  gap: 4px;
  margin: 0 0 14px;
}

.fpbfw-applied-discount {
  font-size: 0.95rem;
  font-weight: 700;
  color: #cf1f25;
}

.fpbfw-component-card {
  display: grid;
  grid-template-columns: auto 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #dbe2ea;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.fpbfw-component-card:hover {
  border-color: #9fb2c7;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
  transform: translateY(-1px);
}

.fpbfw-component-card:has(input:checked) {
  border-color: #cf1f25;
  box-shadow: 0 12px 28px rgba(207, 31, 37, 0.14);
}

.fpbfw-component-check {
  align-self: start;
  padding-top: 4px;
}

.fpbfw-component-check input {
  width: 18px;
  height: 18px;
  accent-color: #cf1f25;
}

.fpbfw-component-media {
  display: block;
}

.fpbfw-component-media img {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  background: #f3f4f6;
}

.fpbfw-component-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.fpbfw-component-title {
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 600;
  color: #213047;
}

.fpbfw-component-price {
  font-size: 0.95rem;
  color: #56657a;
}

.fpbfw-component-price .amount {
  color: #cf1f25;
  font-weight: 700;
}

.fpbfw-component-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fpbfw-component-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #d2d8e0;
  border-radius: 999px;
  color: #26374f;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  background: #fff;
}

.fpbfw-component-link:hover {
  border-color: #26374f;
  text-decoration: none;
}

/* Bloque dentro del summary (columna derecha) */
.fpbfw-carousel-summary { margin: 14px 0 10px; }
.fpbfw-carousel-title { margin: 0 0 8px; font-size: 1rem; line-height: 1.3; }

/* Carrusel horizontal */
.fpbfw-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(120px, 160px);
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
}
.fpbfw-carousel::-webkit-scrollbar { height: 6px; }
.fpbfw-carousel::-webkit-scrollbar-thumb { background: #ddd; border-radius: 8px; }

/* Tarjetas compactas para el summary */
.fpbfw-card {
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 8px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.fpbfw-card-thumb img { width: 100%; height: auto; border-radius: 8px; }
.fpbfw-card-title { display:block; margin-top:6px; color: inherit; text-decoration: none; font-size: .9rem; }
.fpbfw-card-title:hover { text-decoration: underline; }

/* Ajuste fino para temas con summary estrecho */
.single-product .product .summary .fpbfw-carousel-summary { width: 100%; }
.fpbfw-discount-progress { margin-top: 8px; font-size: .92rem; color: #56657a; }

@media (max-width: 767px) {
  .fpbfw-components {
    padding: 14px;
  }

  .fpbfw-component-card {
    grid-template-columns: auto 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .fpbfw-component-media img {
    width: 72px;
    height: 72px;
  }

  .fpbfw-component-actions {
    flex-wrap: wrap;
  }
}
