/* Prestigio — estrellas + modal opiniones (estilo carrito) */

.prestigio-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  line-height: 1;
  vertical-align: middle;
}

.prestigio-star {
  position: relative;
  width: 12px;
  height: 12px;
  display: inline-block;
  background: #e8e4dc;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.prestigio-star::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--fill, 0%);
  background: #f0a020;
  background: linear-gradient(90deg, #f5b942 0%, #e8901a 100%);
  clip-path: inherit;
}

.prestigio-rating-row {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  min-width: 0;
  text-align: left;
}

.prestigio-rating-row:hover .prestigio-rating-score {
  color: #111;
}

.prestigio-rating-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  pointer-events: none;
}

.prestigio-rating-score {
  font-size: 11px;
  font-weight: 600;
  color: #777;
  letter-spacing: 0;
  line-height: 1;
  transition: color 0.15s ease;
}

.prestigio-rating-count {
  display: none;
}

.prestigio-rating-open {
  display: none !important;
}

/* —— PC boutique: bloque info compacto —— */
@media (min-width: 981px) {
  .am-product-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .am-product-card .am-product-media {
    margin-bottom: 0;
    flex: 0 0 auto;
  }

  .am-product-card .am-product-info {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin: 0;
    padding: 0;
    min-width: 0;
  }

  .am-product-card .am-product-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
  }

  .am-product-card .am-product-name {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--sh-ink, #111);
    letter-spacing: 0;
    line-height: 1.3;
  }

  .am-product-card .am-product-price {
    margin: 0;
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 600;
    color: var(--sh-ink, #444);
    line-height: 1.2;
    white-space: nowrap;
  }

  .am-product-card .prestigio-rating-row {
    margin: 2px 0 0;
    padding: 0;
    border: 0;
    width: auto;
    justify-content: flex-start;
    gap: 6px;
  }

  .am-product-card .prestigio-star {
    width: 10px;
    height: 10px;
  }

  .am-product-card .prestigio-stars {
    gap: 1px;
  }

  .am-product-card .prestigio-rating-score {
    font-size: 11px;
    font-weight: 600;
    color: var(--sh-muted, #777);
  }

  .sh-card .prestigio-rating-row {
    margin-top: 4px;
    padding-top: 0;
    border-top: 0;
    justify-content: flex-start;
    gap: 6px;
  }

  .sh-card .prestigio-star {
    width: 10px;
    height: 10px;
  }

  .sh-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .sh-card-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
  }

  .sh-card-name {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--sh-ink, #111);
    line-height: 1.3;
  }

  .sh-card-price {
    margin: 0;
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 600;
    color: var(--sh-ink, #444);
    white-space: nowrap;
  }
}

.am-product-card .prestigio-rating-row {
  margin-top: 4px;
}

.am-product-card .prestigio-star {
  width: 10px;
  height: 10px;
}

.sh-app-card .prestigio-rating-row {
  margin: 4px 0 2px;
  justify-content: flex-start;
  gap: 8px;
}

.product-buybox-prestigio {
  margin: 0 0 14px;
}

.product-buybox-prestigio .prestigio-rating-row {
  justify-content: flex-start;
  gap: 8px;
  border-top: 0;
  padding-top: 0;
}

.product-buybox-prestigio .prestigio-star {
  width: 14px;
  height: 14px;
}

.product-buybox-prestigio .prestigio-rating-score {
  font-size: 13px;
  font-weight: 700;
  color: #111;
}

.am-testimonial-stars {
  margin-bottom: 10px;
}

.am-testimonial-stars .prestigio-star {
  width: 14px;
  height: 14px;
  /* Vacías = muted del tema; llenas = acento (botón) */
  background: color-mix(in srgb, var(--sh-muted, #c8c0b4) 35%, transparent);
}

.am-testimonial-stars .prestigio-star::after {
  background: var(--sh-btn-bg, #c4a574);
}

.am-product-stars {
  display: none !important;
}

/* Modal lateral (como carrito) — por encima del backdrop (10000) y del carrito (10001) */
.prestigio-modal {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10025;
  width: min(400px, 100vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--sh-cream, #fff);
  color: var(--sh-ink, #111);
  border-left: 1px solid var(--sh-line, rgba(0, 0, 0, 0.1));
  transform: translateX(105%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -18px 0 40px rgba(0, 0, 0, 0.08);
}

body.prestigio-open .prestigio-modal {
  transform: translateX(0);
}

body.prestigio-open {
  overflow: hidden;
}

body.prestigio-open .site-modal-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 10020;
}

.prestigio-modal[hidden] {
  display: flex !important;
  visibility: hidden;
  pointer-events: none;
}

body.prestigio-open .prestigio-modal[hidden] {
  visibility: visible;
  pointer-events: auto;
}

.prestigio-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.prestigio-modal-close {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.prestigio-modal-close:hover {
  color: #666;
  transform: rotate(90deg);
}

.prestigio-modal-close svg {
  display: block;
}

.prestigio-modal-header .main-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.prestigio-modal-summary {
  padding: 16px 18px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.prestigio-modal-summary-avg {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 6px;
}

.prestigio-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 0 24px;
  min-height: 0;
}

.prestigio-modal-loading,
.prestigio-modal-empty {
  margin: 24px 18px;
  color: #888;
  font-size: 14px;
}

.prestigio-review {
  padding: 14px 18px;
  border-bottom: 1px solid #f3f3f3;
}

.prestigio-review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.prestigio-review-author {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #111;
}

.prestigio-review-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #333;
}

.prestigio-modal-footer {
  flex-shrink: 0;
  padding: 14px 18px 20px;
  border-top: 1px solid #eee;
  background: #fafafa;
}

.prestigio-modal-footer p {
  margin: 0 0 10px;
  font-size: 13px;
  color: #666;
}

.prestigio-form label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: #888;
}

.prestigio-form select,
.prestigio-form textarea {
  width: 100%;
  border: 1px solid #ddd;
  background: #fff;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.prestigio-form textarea {
  min-height: 88px;
  resize: vertical;
}

.prestigio-form .sh-btn {
  width: 100%;
}

.prestigio-form-msg {
  margin: 8px 0 0;
  font-size: 13px;
}

.prestigio-form-msg.is-ok { color: #111; }
.prestigio-form-msg.is-err { color: #b33b3b; }
