/* ==========================================================================
   COMPONENTES — botones, selectores +/-, tarjetas, carruseles, FAQ, avisos
   ========================================================================== */

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 43px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-orange);
  color: var(--color-white);
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.2s;
}

.btn:hover {
  background: var(--color-orange-dark);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
}

.btn--block {
  width: 100%;
}

.btn--md {
  min-height: 67px;
  font-size: clamp(18px, 1.7vw, 24px);
}

.btn--lg {
  min-height: 87px;
  padding-inline: 32px;
  font-size: clamp(18px, 2.3vw, 32px);
}

.btn--neutral {
  background: var(--color-neutral);
}

.btn--neutral:hover {
  background: var(--color-neutral-dark);
}

/* ---------- Selector  −  valor  +  ---------- */

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  height: 45px;
  border-radius: var(--radius-pill);
  background: var(--color-navy);
  color: var(--color-white);
  font-size: var(--fs-body);
  font-weight: 700;
  overflow: hidden;
}

.stepper__btn {
  flex: none;
  align-self: stretch;
  width: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: 700;
  transition: background-color 0.2s;
}

.stepper__btn:hover:not(:disabled) {
  background: var(--color-navy-dark);
}

.stepper__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.stepper__value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.stepper--row {
  height: 51px;
}

.stepper--lg {
  height: 67px;
  font-size: clamp(18px, 1.7vw, 24px);
}

.stepper--lg .stepper__btn {
  width: clamp(56px, 6vw, 89px);
}

/* ---------- Tarjeta de producto ---------- */

.product-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 471px;
  padding: 19px 19px 21px;
  border-radius: var(--radius-card);
  background: var(--color-card);
}

.product-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: 226px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--color-surface);
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.media-placeholder {
  padding: 16px;
  color: var(--color-muted);
  font-size: var(--fs-small);
  text-align: center;
}

.product-card__body {
  flex: 1;
  min-height: 77px;
  margin-top: 6px;
}

.product-card__title {
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-ink-strong);
}

.product-card__title a {
  text-decoration: none;
}

.product-card__title a:hover {
  color: var(--color-navy);
  text-decoration: underline;
}

.product-card__text {
  margin-top: 4px;
  font-size: var(--fs-small);
  line-height: 1.35;
  color: #000;
}

.product-card__controls {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.product-card__controls .stepper {
  flex: 1 1 0;
  min-width: 0;
}

.product-card__controls .stepper__btn,
.quote-item__controls .stepper__btn {
  width: 34px;
}

.product-card .btn {
  margin-top: 6px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .product-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Carrusel ---------- */

.carousel {
  --per-view: 4;
  --carousel-gap: 20px;
}

.carousel__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.carousel__viewport::-webkit-scrollbar {
  display: none;
}

.carousel__track {
  display: flex;
  gap: var(--carousel-gap);
}

.carousel__track > * {
  flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--carousel-gap)) / var(--per-view));
  min-width: 0;
  scroll-snap-align: start;
}

.carousel__nav {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
}

.carousel__nav[hidden] {
  display: none;
}

.round-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52.7px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 62px;
  background: var(--color-orange);
  transition: background-color 0.2s;
}

.round-btn:hover:not(:disabled) {
  background: var(--color-orange-dark);
}

.round-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.round-btn img {
  max-height: 26px;
}

@media (max-width: 1100px) {
  .carousel {
    --per-view: 2;
  }
}

@media (max-width: 700px) {
  .carousel {
    --per-view: 1;
  }
}

/* ---------- Preguntas frecuentes (acordeón) ---------- */

.faq {
  display: flex;
  flex-direction: column;
  gap: 45px;
}

.faq-item {
  border-radius: 42px;
  background: var(--color-sky);
}

.faq-item__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 84px;
  padding: 15px 20px 15px 42px;
  list-style: none;
  cursor: pointer;
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--color-navy);
}

.faq-item__summary::-webkit-details-marker {
  display: none;
}

.faq-item__chevron {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 52.7px;
  height: 52px;
  border-radius: 62px;
  background: var(--color-navy);
  transition: transform 0.2s;
}

.faq-item__chevron img {
  max-width: 34px;
  max-height: 18px;
}

.faq-item[open] .faq-item__chevron {
  transform: rotate(180deg);
}

.faq-item__content {
  padding: 0 42px 28px;
  font-size: var(--fs-lead);
  line-height: 1.4;
  color: var(--color-ink);
}

@media (max-width: 700px) {
  .faq {
    gap: 16px;
  }

  .faq-item__summary {
    padding-left: 24px;
  }

  .faq-item__content {
    padding-inline: 24px;
  }
}

/* ---------- Formularios ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.field__label {
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--color-navy);
}

.field__control {
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--color-white);
  font-size: var(--fs-body);
  color: var(--color-ink);
}

.field__control::placeholder {
  color: var(--color-placeholder);
}

.field__control:focus {
  border-color: var(--color-navy);
  outline: none;
}

textarea.field__control {
  resize: vertical;
  min-height: 96px;
}

/* ---------- Aviso emergente ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100% - 32px);
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  background: var(--color-navy);
  color: var(--color-white);
  box-shadow: 0 10px 30px rgba(20, 50, 85, 0.35);
  transform: translate(-50%, 24px);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
}

.toast[data-visible="true"] {
  transform: translate(-50%, 0);
  opacity: 1;
}

.toast a {
  font-weight: 700;
  white-space: nowrap;
}
