/* ============================================================
   SINGLE PRODUCT — CTA: modal "Contáctenme" + botón cotización YITH
   Tokens compartidos con style.css (--pt-ink/--pt-brand/--pt-bg/etc.)
   ============================================================ */

/* --- Botón YITH "Añadir a mi cotización" → look pt-btn outline brand --- */
.pt-raq-wrap { width: 100%; }
.pt-raq-wrap .yith-ywraq-add-button,
.pt-raq-wrap form { margin: 0; width: 100%; }
.pt-raq-wrap a.add-request-quote-button,
.pt-raq-wrap button.add-request-quote-button {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; box-sizing: border-box;
  padding: 14px 20px;
  background: var(--pt-surface);
  color: var(--pt-ink) !important;
  border: 2px solid var(--pt-brand);
  border-radius: var(--pt-radius);
  font-family: var(--pt-font-head);
  font-size: 16px; font-weight: 700; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.pt-raq-wrap a.add-request-quote-button:hover,
.pt-raq-wrap button.add-request-quote-button:hover {
  background: var(--pt-brand); color: var(--pt-ink) !important;
}
/* Estado "ya está en la lista": enlace para ver la cotización */
.pt-raq-wrap .ywraq-link,
.pt-raq-wrap a.added {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; box-sizing: border-box; padding: 10px;
  color: var(--pt-ink); font-weight: 600; text-decoration: underline;
}

/* --- Botón "Contáctenme" en tinta de marca → contraste con el verde de WhatsApp --- */
body .pt-btn--ink {
  background: var(--pt-ink) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(4, 47, 61, .22);
}
body .pt-btn--ink:hover,
body .pt-btn--ink:focus-visible {
  background: #0b617e !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(4, 47, 61, .3);
}
body .pt-btn--ink svg { color: #fff; }

/* --- Modal --- */
.pt-modal-open { overflow: hidden; }
.pt-quote-modal {
  position: fixed; inset: 0; z-index: 100000;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.pt-quote-modal[aria-hidden="false"] { display: flex; }
.pt-quote-modal__overlay {
  position: absolute; inset: 0;
  background: rgba(4, 47, 61, 0.6);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.pt-quote-modal__dialog {
  position: relative; z-index: 1;
  width: 100%; max-width: 540px;
  max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: 16px;
  padding: 32px 28px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  animation: ptQuoteIn .2s ease-out;
}
@keyframes ptQuoteIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.pt-quote-modal__close {
  position: absolute; top: 14px; right: 14px;
  background: none; border: 0; cursor: pointer;
  color: var(--pt-muted); padding: 4px; line-height: 0; border-radius: 8px;
  transition: color .15s ease, background-color .15s ease;
}
.pt-quote-modal__close:hover { color: var(--pt-ink); background: var(--pt-bg); }
.pt-quote-modal__title {
  font-family: var(--pt-font-head);
  font-size: 24px; font-weight: 800; color: var(--pt-ink);
  margin: 0 0 6px; padding-right: 32px;
}
.pt-quote-modal__sub { font-size: 14px; color: var(--pt-muted); margin: 0 0 14px; }
.pt-quote-modal__product {
  font-size: 14px; color: var(--pt-ink);
  background: var(--pt-bg); border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius); padding: 10px 12px; margin: 0 0 18px;
}

/* --- Form --- */
.pt-quote-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pt-quote-field { display: block; margin-bottom: 14px; }
.pt-quote-field > span {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--pt-ink); margin-bottom: 5px;
}
.pt-quote-field input,
.pt-quote-field textarea {
  width: 100%; box-sizing: border-box;
  padding: 11px 13px; font-size: 15px; font-family: inherit;
  color: var(--pt-ink); background: #fff;
  border: 1.5px solid var(--pt-border); border-radius: var(--pt-radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pt-quote-field input:focus,
.pt-quote-field textarea:focus {
  outline: none; border-color: var(--pt-brand);
  box-shadow: 0 0 0 3px rgba(165, 200, 63, 0.25);
}
.pt-quote-field textarea { resize: vertical; min-height: 72px; }
.pt-quote-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pt-quote-form__submit { margin-top: 6px; }
.pt-quote-form__status { margin: 12px 0 0; font-size: 14px; text-align: center; min-height: 1em; }
.pt-quote-form__status.is-ok { color: var(--pt-success, #16a34a); font-weight: 600; }
.pt-quote-form__status.is-error { color: #c0392b; font-weight: 600; }

@media (max-width: 520px) {
  .pt-quote-form__row { grid-template-columns: 1fr; gap: 0; }
  .pt-quote-modal__dialog { padding: 28px 20px 22px; }
}

/* ============================================================
   RELACIONADOS — carrusel (3 visibles, ~10 productos, auto-rotación)
   ============================================================ */
.pt-related-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: var(--pt-space-6, 24px);
}
.pt-related-head .pt-product-related__title { margin: 0; }
.pt-related-nav { display: flex; gap: 8px; flex: 0 0 auto; }
.pt-related-nav[hidden] { display: none; }
.pt-related-arrow {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--pt-ink);
  border: 1.5px solid var(--pt-border); cursor: pointer; line-height: 0;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.pt-related-arrow:hover,
.pt-related-arrow:focus-visible {
  background: var(--pt-ink); color: #fff; border-color: var(--pt-ink); outline: none;
}

.pt-related-carousel { overflow: hidden; }
.pt-related-track {
  display: flex; align-items: stretch;
  gap: var(--pt-space-6, 24px);
  transition: transform .5s ease;
  will-change: transform;
}
.pt-related-slide {
  flex: 0 0 calc((100% - 2 * var(--pt-space-6, 24px)) / 3);
  min-width: 0;
}
@media (max-width: 1023px) {
  .pt-related-slide { flex-basis: calc((100% - var(--pt-space-6, 24px)) / 2); }
}
@media (max-width: 639px) {
  .pt-related-slide { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .pt-related-track { transition: none; }
}
