.public-product-detail {
  width:
    min(
      1450px,
      calc(100% - 40px)
    );

  margin:
    0 auto;

  padding:
    38px 0 80px;
}


.public-product-detail__back {
  min-height: 36px;

  margin-bottom: 26px;

  display: inline-flex;
  align-items: center;

  gap: 7px;

  color: var(--text);

  font-size: 12px;
  font-weight: 700;
}


.public-product-detail__back svg {
  width: 15px;
  height: 15px;
}


.public-product-detail__grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1.08fr)
    minmax(380px, 0.92fr);

  gap: 60px;

  align-items: start;
}


.public-product-detail__media {
  min-height: 560px;

  border:
    1px solid
    var(--border);

  border-radius: 16px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  background:
    var(--border);

  color:
    var(--text-soft);
}


.public-product-detail__media img {
  width: 100%;
  height: 100%;

  max-height: 680px;

  padding: 28px;

  object-fit: contain;
}


.public-product-detail__media > svg {
  width: 70px;
  height: 70px;
}


.public-product-detail__content {
  padding-top: 26px;
}


.public-product-detail__category {
  color: var(--primary);

  font-size: 11px;
  font-weight: 800;

  letter-spacing: 0.1em;

  text-transform: uppercase;
}


.public-product-detail__content h1 {
  margin:
    10px 0 8px;

  color: var(--text);

  font-size:
    clamp(
      38px,
      4.5vw,
      66px
    );

  font-weight: 800;

  line-height: 1.02;

  letter-spacing: -0.055em;
}


.public-product-detail__sku {
  color: var(--text-soft);

  font-size: 11px;
  font-weight: 700;
}


.public-product-detail__lead {
  margin:
    28px 0 0;

  color: var(--text);

  font-size: 16px;
  font-weight: 500;

  line-height: 1.7;
}


.public-product-detail__price {
  margin-top: 28px;

  display: grid;

  gap: 2px;
}


.public-product-detail__price del {
  color: var(--text-soft);

  font-size: 13px;
}


.public-product-detail__price strong {
  color: var(--primary);

  font-size: 30px;
  font-weight: 800;
}


.public-product-detail__buy {
  min-height: 50px;

  margin-top: 24px;

  padding:
    0 21px;

  border:
    1px solid
    var(--primary);

  border-radius: 10px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 8px;

  background: var(--primary);

  color: #ffffff;

  font-size: 13px;
  font-weight: 800;

  cursor: pointer;
}


.public-product-detail__buy svg {
  width: 17px;
  height: 17px;
}


.public-product-detail__description {
  max-width: 960px;

  margin-top: 60px;

  padding-top: 38px;

  border-top:
    1px solid
    var(--border);
}


.public-product-detail__description > span {
  color: var(--primary);

  font-size: 10px;
  font-weight: 800;

  letter-spacing: 0.1em;

  text-transform: uppercase;
}


.public-product-detail__description h2 {
  margin:
    6px 0 14px;

  color: var(--text);

  font-size: 28px;
  font-weight: 800;
}


.public-product-detail__description p {
  margin: 0;

  color: var(--text);

  font-size: 15px;
  font-weight: 500;

  line-height: 1.8;

  white-space: pre-line;
}


.public-product-detail-loading,
.public-product-detail-error {
  width:
    min(
      1450px,
      calc(100% - 40px)
    );

  margin:
    0 auto;

  padding:
    80px 0;

  color: var(--text);
}


@media (max-width: 900px) {

  .public-product-detail__grid {
    grid-template-columns:
      1fr;

    gap: 28px;
  }


  .public-product-detail__media {
    min-height: 380px;
  }


  .public-product-detail__content {
    padding-top: 0;
  }

}


/* =========================================================
   PRODUCTO DETALLE · GALERÍA / STOCK / CANTIDAD
   ========================================================= */

.public-product-detail {
  width: 100%;
  padding: 40px 24px 90px;
  background: var(--bg-soft);
  color: var(--text);
}

.public-product-detail__container {
  width: min(1440px, 100%);
  margin: 0 auto;
}

.public-product-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 800;
}

.public-product-detail__back svg {
  width: 18px;
  height: 18px;
}

.product-detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(380px, .88fr);
  gap: 48px;
  padding: 30px;
  background: var(--surface, #fff);
  border: 1px solid color-mix(in srgb, var(--primary) 10%, transparent);
  border-radius: 22px;
}

.product-gallery {
  min-width: 0;
}

.product-gallery__main {
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 18px;
  background: var(--border);
}

.product-gallery__main img {
  width: 100%;
  height: 100%;
  max-height: 620px;
  object-fit: contain;
}

.product-gallery__placeholder {
  color: var(--text-soft);
}

.product-gallery__placeholder svg {
  width: 72px;
  height: 72px;
}

.product-gallery__thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.product-gallery__thumb {
  flex: 0 0 78px;
  width: 78px;
  height: 78px;
  padding: 5px;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, transparent);
  border-radius: 12px;
  background: var(--surface, #fff);
  cursor: pointer;
}

.product-gallery__thumb.is-active {
  border-color: var(--primary);
  box-shadow: none; outline: 2px solid var(--primary); outline-offset: 1px;
}

.product-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.product-detail-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.product-detail-info__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-detail-info__meta span {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.product-detail-info h1 {
  margin: 18px 0 10px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.04;
  letter-spacing: -.035em;
  color: var(--primary);
}

.product-detail-info__sku {
  font-size: 13px;
  color: var(--text);
}

.product-detail-info__lead {
  margin: 24px 0 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}

.product-detail-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 28px;
}

.product-detail-price del {
  color: var(--text-soft);
  font-size: 14px;
}

.product-detail-price strong {
  color: var(--primary);
  font-size: 32px;
  line-height: 1;
}

.product-stock {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 14px 16px;
  border-radius: 14px;
}

.product-stock.is-available {
  background: color-mix(in srgb, var(--primary) 9%, transparent);
  color: var(--primary);
}

.product-stock.is-unavailable {
  background: rgba(185, 28, 28, .08);
  color: #b42323;
}

.product-stock svg {
  width: 22px;
  height: 22px;
}

.product-stock div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-stock strong {
  font-size: 14px;
}

.product-stock span {
  font-size: 12px;
}

.product-buy-box {
  width: 100%;
  margin-top: 24px;
}

.product-buy-box__label {
  display: block;
  margin-bottom: 9px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.product-quantity {
  display: grid;
  grid-template-columns: 46px 90px 46px;
  gap: 6px;
}

.product-quantity button,
.product-quantity input {
  height: 46px;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, transparent);
  border-radius: 10px;
  background: var(--surface, #fff);
}

.product-quantity button {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.product-quantity button svg {
  width: 18px;
  height: 18px;
}

.product-quantity input {
  text-align: center;
  font-weight: 800;
  color: var(--text);
  appearance: textfield;
}

.product-add-cart {
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--primary);
  color: #fff;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.product-add-cart:hover:not(:disabled) {
  background: var(--primary);
}

.product-add-cart:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.product-add-cart.is-added {
  background: var(--primary);
}

.product-add-cart svg {
  width: 18px;
  height: 18px;
}

.product-detail-sections {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.product-detail-section {
  padding: 28px 30px;
  border: 1px solid color-mix(in srgb, var(--primary) 10%, transparent);
  border-radius: 18px;
  background: var(--surface, #fff);
}

.product-detail-section > span,
.product-manual > div > span {
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.product-detail-section h2 {
  margin: 7px 0 14px;
  color: var(--text);
  font-size: 22px;
}

.product-detail-section__text {
  color: var(--text);
  font-size: 15px;
  line-height: 1.8;
}

.product-manual {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.product-manual p {
  margin: 0;
  color: var(--text);
}

.product-manual__download {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.product-manual__download svg {
  width: 17px;
  height: 17px;
}

.public-product-detail-loading,
.public-product-detail-error {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.public-product-detail-loading svg {
  animation: productSpin .8s linear infinite;
}

@keyframes productSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .product-detail-main {
    grid-template-columns: 1fr;
  }

  .product-gallery__main {
    min-height: 420px;
  }
}

@media (max-width: 620px) {
  .public-product-detail {
    padding: 22px 14px 70px;
  }

  .product-detail-main {
    padding: 16px;
    gap: 24px;
    border-radius: 16px;
  }

  .product-gallery__main {
    min-height: 320px;
  }

  .product-detail-info h1 {
    font-size: 32px;
  }

  .product-detail-section {
    padding: 21px;
  }

  .product-manual {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-manual__download {
    width: 100%;
    justify-content: center;
  }
}


/* =========================================================
   AVISO "VOLVIÓ EL STOCK"
   ========================================================= */

.product-stock-alert {
  width: 100%;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  display: grid;
  gap: 12px;
}

.product-stock-alert__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.product-stock-alert__head > svg {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--primary);
}

.product-stock-alert__head div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-stock-alert__head span {
  color: var(--text-soft);
  font-size: 14px;
}

.product-stock-alert__row {
  display: flex;
  gap: 8px;
}

.product-stock-alert__row input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.product-stock-alert__row input:focus {
  outline: 2px solid var(--primary);
  outline-offset: -1px;
}

.product-stock-alert__btn {
  height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: var(--primary-text, #fff);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.product-stock-alert__btn:disabled {
  opacity: .6;
  cursor: wait;
}

.product-stock-alert__msg {
  margin: 0;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
}

.product-stock-alert__msg.is-error {
  color: #b42323;
}

html[data-theme="dark"] .product-stock-alert__msg.is-error {
  color: #ff8f85;
}

.product-stock-alert.is-done .product-stock-alert__row {
  display: none;
}

@media (max-width: 480px) {
  .product-stock-alert__row {
    flex-direction: column;
  }

  .product-stock-alert__btn {
    width: 100%;
  }
}


/* =========================================================
   Videos, etiquetas y relacionados elegidos desde el admin
   ========================================================= */

.product-videos {
  display: grid;
  gap: 22px;
}

.product-video-item {
  margin: 0;
}

.product-video__title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.product-video--file video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.product-tags {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-tags a {
  display: inline-block;
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease;
}

.product-tags a:hover {
  border-color: var(--accent);
  color: var(--text);
}

.product-rel {
  margin-top: 48px;
}

.product-rel h2 {
  margin: 0 0 18px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.product-rel__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.product-rel__card {
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--text);
  text-decoration: none;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.product-rel__card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.product-rel__img {
  display: block;
  aspect-ratio: 4 / 3;
  background: color-mix(in srgb, var(--text) 5%, var(--bg));
  overflow: hidden;
}

.product-rel__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-rel__name {
  padding: 12px 14px 4px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.product-rel__price {
  padding: 0 14px 14px;
  font-size: 16px;
  color: var(--text);
}

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


/* =========================================================
   Reseñas de productos (prefijo res-pub-)
   ========================================================= */

.res-pub-stars {
  position: relative;
  display: inline-block;
  line-height: 1;
  font-size: 16px;
  letter-spacing: 1px;
  white-space: nowrap;
  vertical-align: middle;
}

.res-pub-stars--lg { font-size: 22px; }
.res-pub-stars__base { color: var(--border); }

.res-pub-stars__fill {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  color: #f0a500;
}

.res-pub-titulo-stars {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 10px;
  color: var(--text-soft);
  font-size: 14px;
}

.res-pub-titulo-stars strong { color: var(--text); }
.res-pub-titulo-stars:hover { text-decoration: underline; }
.res-pub-titulo-stars--vacio { text-decoration: underline; }

.res-pub-card-stars {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 4px;
  color: var(--text-soft);
  font-size: 12.5px;
}

.res-pub-card-stars .res-pub-stars { font-size: 14px; }

.res-pub { scroll-margin-top: 90px; }

.res-pub__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.res-pub__head h2 { margin: 0; }
.res-pub-muted { margin: 0; color: var(--text-soft); font-size: 14px; }
.res-pub-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.res-pub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.res-pub-btn:hover:not(:disabled) { border-color: var(--text); }
.res-pub-btn:disabled { opacity: .55; cursor: not-allowed; }
.res-pub-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.res-pub-btn--primary { border-color: var(--primary); background: var(--primary); color: var(--primary-text, #fff); }
.res-pub-btn--primary:hover:not(:disabled) { background: var(--primary-hover); }

.res-pub-resumen {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 18px;
}

.res-pub-resumen__nota { display: grid; justify-items: start; gap: 4px; }
.res-pub-resumen__nota strong { font-size: 46px; line-height: 1; letter-spacing: -.03em; }
.res-pub-resumen__nota > span:last-child { color: var(--text-soft); font-size: 13px; }

.res-pub-dist { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }

.res-pub-dist li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.res-pub-dist b { text-align: right; color: var(--text-soft); font-weight: 600; }

.res-pub-dist__bar { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; }
.res-pub-dist__bar i { display: block; height: 100%; border-radius: 99px; background: #f0a500; }

.res-pub-orden { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; }

.res-pub-orden select {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.res-pub-lista { margin: 0 0 14px; padding: 0; list-style: none; }

.res-pub-item { padding: 16px 0; border-top: 1px solid var(--border); }
.res-pub-item h3 { margin: 6px 0 2px; font-size: 16px; }
.res-pub-item p { margin: 4px 0 6px; line-height: 1.55; overflow-wrap: anywhere; }
.res-pub-item small { color: var(--text-soft); }
.res-pub-item__top { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }

.res-pub-verif {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #1b7a46;
  font-size: 12.5px;
  font-weight: 800;
}

:root[data-theme="dark"] .res-pub-verif { color: #6fd39a; }
.res-pub-verif svg { width: 15px; height: 15px; }

.res-pub-resp {
  margin-top: 10px;
  padding: 10px 14px;
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  background: var(--bg-soft);
  font-size: 14px;
}

.res-pub-resp p { margin: 2px 0 0; }

.res-pub-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.res-pub-form h3 { margin: 0; font-size: 18px; }
.res-pub-form label { display: grid; gap: 5px; font-size: 14px; font-weight: 700; }
.res-pub-form label small { font-weight: 500; color: var(--text-soft); }

.res-pub-form input:not([type="radio"]),
.res-pub-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 400;
}

.res-pub-form input:focus-visible,
.res-pub-form textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }

.res-pub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.res-pub-estrellas { margin: 0; padding: 0; border: 0; }
.res-pub-estrellas legend { padding: 0; margin-bottom: 4px; font-size: 14px; font-weight: 700; }

/* estrellas con radios nativos: se navegan con flechas y Tab */
.res-pub-estrellas__radios { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.res-pub-estrellas__radios input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.res-pub-estrellas__radios label {
  padding: 0 2px;
  color: var(--border);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.res-pub-estrellas__radios label:hover,
.res-pub-estrellas__radios label:hover ~ label,
.res-pub-estrellas__radios input:checked ~ label { color: #f0a500; }

.res-pub-estrellas__radios input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.res-pub-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.res-pub-form__acciones { display: flex; flex-wrap: wrap; gap: 10px; }

.res-pub-error {
  padding: 10px 14px;
  border-radius: 8px;
  background: color-mix(in srgb, #b42318 14%, transparent);
  color: #b42318;
  font-weight: 700;
  font-size: 14px;
}

:root[data-theme="dark"] .res-pub-error { color: #ff8b80; }

.res-pub-ok { display: flex; align-items: center; gap: 12px; color: #1b7a46; }
:root[data-theme="dark"] .res-pub-ok { color: #6fd39a; }
.res-pub-ok svg { width: 28px; height: 28px; flex: none; }
.res-pub-ok p { margin: 0; }

@media (max-width: 640px) {
  .res-pub-resumen { grid-template-columns: 1fr; gap: 14px; }
  .res-pub-grid { grid-template-columns: 1fr; }
}

.product-detail-section.res-pub { background: var(--surface); color: var(--text); }


/* =========================================================
   PREGUNTAS Y RESPUESTAS (pq-) · sin sombras ni brillos
   ========================================================= */

.pq { scroll-margin-top: 90px; background: var(--surface); color: var(--text); }

.pq__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.pq__head h2 { margin: 0; }
.pq-muted { margin: 0; color: var(--text-soft); font-size: 14px; }
.pq-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.pq-btn:hover:not(:disabled) { border-color: var(--text); }
.pq-btn:disabled { opacity: .55; cursor: not-allowed; }
.pq-btn:focus-visible,
.pq-util:focus-visible,
.pq select:focus-visible,
.pq-form input:focus-visible,
.pq-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pq-btn--primary { border-color: var(--primary); background: var(--primary); color: var(--primary-text, #fff); }
.pq-btn--primary:hover:not(:disabled) { background: var(--primary-hover); }

.pq-vacio {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.pq-vacio svg { width: 30px; height: 30px; flex: none; color: var(--text-soft); }
.pq-vacio p { margin: 4px 0 0; color: var(--text-soft); font-size: 14px; }

.pq-orden {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}

.pq-orden label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }

.pq-orden select {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 400;
}

.pq-lista { margin: 0 0 14px; padding: 0; list-style: none; }
.pq-item { padding: 16px 0; border-top: 1px solid var(--border); }
.pq-item p { display: flex; gap: 10px; margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
.pq-item__q { font-weight: 700; }
.pq-item__a { margin-top: 10px !important; padding: 10px 14px; border-left: 3px solid var(--primary); border-radius: 0 8px 8px 0; background: var(--bg-soft); font-size: 15px; }
.pq-item__a small { display: block; margin-top: 4px; color: var(--text-soft); font-size: 12.5px; }

.pq-item__tag {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--text);
  color: var(--surface);
  font-size: 12px;
  font-weight: 800;
}

.pq-item__tag--a { background: var(--primary); color: var(--primary-text, #fff); }

.pq-item__pie {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.pq-item__pie small { color: var(--text-soft); font-size: 12.5px; }

.pq-util {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.pq-util svg { width: 15px; height: 15px; }
.pq-util:hover:not(:disabled) { border-color: var(--text); }
.pq-util.is-on { border-color: var(--primary); color: var(--primary); cursor: default; }
.pq-util:disabled { cursor: default; }

.pq-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.pq-form[hidden],
.pq-error[hidden] { display: none; }
.pq-form h3 { margin: 0; font-size: 18px; }
.pq-form label { display: grid; gap: 5px; font-size: 14px; font-weight: 700; }
.pq-form label small { font-weight: 500; color: var(--text-soft); }

.pq-form input,
.pq-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
}

.pq-form textarea { resize: vertical; }
.pq-contador { justify-self: end; }

.pq-aviso {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 13.5px;
}

.pq-aviso svg { width: 18px; height: 18px; flex: none; }

.pq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pq-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pq-form__acciones { display: flex; flex-wrap: wrap; gap: 10px; }

.pq-error {
  padding: 10px 14px;
  border: 1px solid #b42318;
  border-radius: 8px;
  background: color-mix(in srgb, #b42318 12%, var(--surface));
  color: #b42318;
  font-weight: 700;
  font-size: 14px;
}

:root[data-theme="dark"] .pq-error { color: #ff8b80; border-color: #ff8b80; }

.pq-ok { display: flex; align-items: center; gap: 12px; color: #1b7a46; }
:root[data-theme="dark"] .pq-ok { color: #6fd39a; }
.pq-ok svg { width: 28px; height: 28px; flex: none; }
.pq-ok p { margin: 0; }

@media (max-width: 640px) {
  .pq-grid { grid-template-columns: 1fr; }
  .pq-btn { flex: 1 1 auto; }
  .pq__head .pq-btn { width: 100%; }
}
