/* ============================================================
   PoP! Imports - Estilos de Avaliações da Loja
   assets/css/avaliacoes.css
   ============================================================ */

/* --- 1. Seção de Avaliações na Home Page (.site-reviews) --- */
.site-reviews {
  width: 100%;
  background: #ffffff;
  padding: 48px 20px 56px;
  border-top: 1px solid #ebebeb;
  box-sizing: border-box;
}

.site-reviews-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.site-reviews-title-box {
  flex: 1;
  min-width: 280px;
}

.site-reviews-title {
  font-size: 28px;
  font-weight: 800;
  color: #111111;
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.site-reviews-subtitle {
  font-size: 15px;
  color: #666666;
  margin: 0;
  line-height: 1.5;
}

/* Card de Resumo de Avaliações no Cabeçalho */
.site-reviews-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  background: #fafafa;
  border: 1px solid #ebebeb;
  border-radius: 12px;
  padding: 14px 22px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.site-rating-overview {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-rating-avg {
  font-size: 34px;
  font-weight: 800;
  color: #111111;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}

.site-rating-stars-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.site-rating-stars {
  color: #f59e0b;
  font-size: 16px;
  line-height: 1;
}

.site-rating-total {
  font-size: 12px;
  color: #71717a;
  font-weight: 500;
  white-space: nowrap;
}

/* Botão "Avaliar a Loja" */
.btn-avaliar-loja {
  background: #ff6600;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.25);
  white-space: nowrap;
  font-family: inherit;
  text-decoration: none;
}

.btn-avaliar-loja:hover {
  background: #e65c00;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 102, 0, 0.35);
}

.btn-avaliar-loja:active {
  transform: translateY(0);
}

.btn-avaliar-loja:focus-visible {
  outline: 2px solid #ff6600;
  outline-offset: 2px;
}

.btn-avaliar-loja i {
  font-size: 13px;
}

/* --- 2. Grid de Depoimentos (.site-reviews-grid) --- */
.site-reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 600px) and (max-width: 999px) {
  .site-reviews-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1000px) and (max-width: 1359px) {
  .site-reviews-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1360px) {
  .site-reviews-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
  }
}

/* Card Individual de Depoimento */
.site-review-card {
  background: #ffffff;
  border: 1px solid #ebebeb;
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
  box-sizing: border-box;
}

.site-review-card:hover {
  border-color: #dcdcdc;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

/* Linha de Autor do Card — cabeçalho: avatar + nome + data */
.site-review-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 12px;
}

.site-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}

.site-review-stars {
  font-size: 15px;
  color: #f59e0b;
  line-height: 1;
}

.site-review-date {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
}

.site-review-comment {
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  margin: 0 0 16px 0;
  flex-grow: 1;
  word-break: break-word;
  white-space: pre-line;
}

/* Miniaturas de Fotos do Card */
.site-review-photos {
  display: flex;
  gap: 8px;
  margin-bottom: 0;   /* é o último bloco do card: a sobra virava vão embaixo */
  flex-wrap: wrap;
}

.site-review-photo-btn {
  background: none;
  border: 1px solid #e5e7eb;
  padding: 0;
  margin: 0;
  font: inherit;
  width: 62px;
  height: 62px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: block;
}

.site-review-photo-btn:hover {
  transform: scale(1.06);
  border-color: #ff6600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.site-review-photo-btn:focus-visible {
  outline: 2px solid #ff6600;
  outline-offset: 2px;
}

.site-review-photo-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Avatar e informações do autor (o bloco .site-review-author-row está definido acima,
   junto do card: é o cabeçalho — avatar + nome + data) */
.site-review-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.site-review-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.site-review-author {
  font-weight: 700;
  font-size: 14px;
  color: #1f2937;
  line-height: 1.2;
}

/* --- Botão Carregar Mais Avaliações --- */
.site-reviews-more-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 32px;
  width: 100%;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.site-reviews-more-wrap.is-hiding {
  opacity: 0;
  transform: translateY(-6px);
}

/* Entrada dos cards de avaliação (cascata definida no JS via animation-delay).
   A classe .is-new é removida no fim da animação para não travar o hover do card. */
@keyframes reviewCardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.site-review-card.is-new {
  animation: reviewCardIn 0.42s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .site-review-card.is-new { animation: none; }
  .site-reviews-more-wrap { transition: none; }
}

.btn-carregar-mais-avaliacoes {
  background: #ffffff;
  color: #222222;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  padding: 11px 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-carregar-mais-avaliacoes:hover {
  background: #fff8f3;
  color: #ff6600;
  border-color: #ff6600;
  box-shadow: 0 4px 10px rgba(255, 102, 0, 0.15);
  transform: translateY(-1px);
}

.btn-carregar-mais-avaliacoes:active {
  transform: translateY(0);
}

.btn-carregar-mais-avaliacoes:focus-visible {
  outline: 2px solid #ff6600;
  outline-offset: 2px;
}

/* --- 3. Estrelas Genéricas --- */
.stars-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #f59e0b;
  line-height: 1;
}

.stars-group .star-filled {
  color: #f59e0b;
}

.stars-group .star-empty {
  color: #d1d5db;
}

/* --- 4. Empty State --- */
.avaliacoes-empty {
  grid-column: 1 / -1;
  background: #fafafa;
  border: 2px dashed #e5e7eb;
  border-radius: 14px;
  padding: 48px 24px;
  text-align: center;
  margin: 10px 0;
  width: 100%;
  box-sizing: border-box;
}

.avaliacoes-empty-icon {
  font-size: 42px;
  color: #d1d5db;
  margin-bottom: 14px;
}

.avaliacoes-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: #374151;
  margin: 0 0 8px 0;
}

.avaliacoes-empty-desc {
  font-size: 14px;
  color: #6b7280;
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.55;
}

/* --- 5. Modal de Avaliação --- */
.avaliacoes-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.avaliacoes-modal {
  background: #ffffff;
  border-radius: 14px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.avaliacoes-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  font-size: 20px;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  line-height: 1;
}

.avaliacoes-modal-close:hover {
  background: #e5e7eb;
  color: #111111;
  transform: rotate(90deg);
}

.avaliacoes-modal-close:focus-visible {
  outline: 2px solid #ff6600;
  outline-offset: 2px;
}

.avaliacoes-modal-header {
  margin-bottom: 22px;
  padding-right: 36px;
}

.avaliacoes-modal-title {
  font-size: 22px;
  font-weight: 800;
  color: #111111;
  margin: 0 0 6px 0;
}

.avaliacoes-modal-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

.avaliacoes-form-group {
  margin-bottom: 20px;
}

.avaliacoes-label {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  display: block;
  margin-bottom: 6px;
}

.avaliacoes-label .required {
  color: #ef4444;
}

.avaliacoes-label .optional {
  font-weight: 400;
  color: #9ca3af;
  font-size: 12px;
}

/* Star Rating Picker interativo */
.avaliacoes-star-picker {
  display: flex;
  align-items: center;
  gap: 4px;
}

.avaliacoes-star-picker .star-btn {
  background: none;
  border: none;
  font-size: 32px;
  line-height: 1;
  color: #d1d5db;
  cursor: pointer;
  padding: 2px;
  transition: color 0.15s ease, transform 0.15s ease;
  outline: none;
}

.avaliacoes-star-picker .star-btn:hover {
  transform: scale(1.18);
}

.avaliacoes-star-picker .star-btn.is-active,
.avaliacoes-star-picker .star-btn.is-hovered {
  color: #f59e0b;
}

.avaliacoes-star-picker .star-btn:focus-visible {
  outline: 2px solid #ff6600;
  outline-offset: 2px;
  border-radius: 4px;
}

.star-picker-text {
  margin-left: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}

/* Textarea & Contador */
.avaliacoes-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.avaliacoes-char-counter {
  font-size: 12px;
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.avaliacoes-char-counter.is-valid {
  color: #10b981;
}

.avaliacoes-char-counter.is-invalid {
  color: #ef4444;
}

.avaliacoes-textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 96px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.avaliacoes-textarea:focus {
  border-color: #ff6600;
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.12);
}

.avaliacoes-hint {
  font-size: 11px;
  color: #6b7280;
  display: block;
  margin-top: 5px;
}

/* Dropzone de Upload de Fotos */
.avaliacoes-upload-dropzone {
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  background: #fafafa;
  transition: border-color 0.2s ease, background 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.avaliacoes-upload-dropzone:hover,
.avaliacoes-upload-dropzone.is-dragover {
  border-color: #ff6600;
  background: #fff8f5;
}

.avaliacoes-upload-dropzone:focus-visible {
  outline: 2px solid #ff6600;
  outline-offset: 2px;
}

.avaliacoes-upload-icon {
  font-size: 26px;
  color: #ff6600;
  margin-bottom: 2px;
}

.avaliacoes-upload-text {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.avaliacoes-upload-subtext {
  font-size: 11px;
  color: #9ca3af;
}

.avaliacoes-photo-previews {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.photo-preview-item {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.photo-preview-remove:hover {
  background: #ef4444;
}

.photo-preview-remove:focus-visible {
  outline: 2px solid #ff6600;
  outline-offset: 1px;
}

/* Alertas do Formulário */
.avaliacoes-form-alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 18px;
  line-height: 1.45;
}

.avaliacoes-form-alert.is-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.avaliacoes-form-alert.is-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Ações do Modal */
.avaliacoes-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.btn-cancelar-avaliacao {
  background: #f3f4f6;
  color: #4b5563;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-cancelar-avaliacao:hover {
  background: #e5e7eb;
}

.btn-cancelar-avaliacao:focus-visible {
  outline: 2px solid #ff6600;
  outline-offset: 2px;
}

.btn-enviar-avaliacao {
  background: #ff6600;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-enviar-avaliacao:hover:not(:disabled) {
  background: #e65c00;
  transform: translateY(-1px);
}

.btn-enviar-avaliacao:focus-visible {
  outline: 2px solid #ff6600;
  outline-offset: 2px;
}

.btn-enviar-avaliacao:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- 6. Lightbox Modal --- */
.avaliacoes-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
  animation: lightboxFadeIn 0.15s ease;
  box-sizing: border-box;
}

@keyframes lightboxFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.avaliacoes-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
  z-index: 2;
}

.avaliacoes-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

.avaliacoes-lightbox-close:focus-visible {
  outline: 2px solid #ff6600;
  outline-offset: 2px;
}

.avaliacoes-lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.avaliacoes-lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: block;
}

/* --- 7. Responsividade --- */
@media (max-width: 768px) {
  .site-reviews {
    padding: 32px 16px 40px;
  }

  .site-reviews-header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 16px;
    margin-bottom: 24px;
  }

  .site-reviews-title {
    font-size: 22px;
    line-height: 1.25;
    margin: 0 0 6px 0;
  }

  .site-reviews-subtitle {
    font-size: 13.5px;
    line-height: 1.45;
  }

  .site-reviews-summary {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 16px;
    width: 100%;
    box-sizing: border-box;
  }

  .site-rating-overview {
    justify-content: center;
    gap: 12px;
  }

  .site-rating-avg {
    font-size: 32px;
  }

  .site-rating-stars-box {
    align-items: flex-start;
    gap: 2px;
  }

  .site-rating-stars {
    font-size: 15px;
  }

  .site-rating-total {
    font-size: 12px;
  }

  .btn-avaliar-loja {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
    font-size: 14px;
    box-sizing: border-box;
  }

  .site-reviews-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .site-review-card {
    padding: 16px 14px;
    border-radius: 12px;
    box-sizing: border-box;
  }

  .site-review-header {
    margin-bottom: 10px;
  }

  .site-review-stars {
    font-size: 14px;
  }

  .site-review-date {
    font-size: 11.5px;
  }

  .site-review-comment {
    font-size: 13.5px;
    line-height: 1.55;
    margin: 0 0 12px 0;
  }

  .site-review-photos {
    gap: 8px;
    margin-bottom: 12px;
  }

  .site-review-photo-btn {
    width: 64px;
    height: 64px;
    border-radius: 8px;
  }

  .site-review-author-row {
    padding-bottom: 10px;
    margin-bottom: 10px;
    gap: 10px;
  }

  .site-review-avatar {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .site-review-author {
    font-size: 13px;
  }

  .site-reviews-more-wrap {
    margin-top: 20px;
    width: 100%;
  }

  .btn-carregar-mais-avaliacoes {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 13.5px;
    box-sizing: border-box;
  }

  .avaliacoes-modal-overlay {
    padding: 12px;
  }

  .avaliacoes-modal {
    padding: 20px 16px;
    border-radius: 12px;
    max-height: 92vh;
    width: 100%;
  }

  .avaliacoes-modal-close {
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .avaliacoes-modal-header {
    margin-bottom: 16px;
    padding-right: 32px;
  }

  .avaliacoes-modal-title {
    font-size: 19px;
  }

  .avaliacoes-modal-subtitle {
    font-size: 12px;
  }

  .avaliacoes-star-picker {
    gap: 2px;
    flex-wrap: wrap;
  }

  .avaliacoes-star-picker .star-btn {
    font-size: 30px;
    padding: 4px;
  }

  .star-picker-text {
    display: block;
    width: 100%;
    margin-left: 0;
    margin-top: 4px;
    font-size: 12px;
  }

  .avaliacoes-textarea {
    font-size: 14px;
    padding: 10px 12px;
    min-height: 80px;
  }

  .avaliacoes-upload-dropzone {
    padding: 16px 12px;
  }

  .avaliacoes-upload-icon {
    font-size: 22px;
  }

  .avaliacoes-upload-text {
    font-size: 12px;
  }

  .photo-preview-item {
    width: 64px;
    height: 64px;
  }

  .avaliacoes-modal-actions {
    flex-direction: column-reverse;
    gap: 8px;
    margin-top: 16px;
  }

  .btn-cancelar-avaliacao,
  .btn-enviar-avaliacao {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 14px;
    box-sizing: border-box;
  }

  .avaliacoes-lightbox-overlay {
    padding: 12px;
  }

  .avaliacoes-lightbox-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .avaliacoes-lightbox-img {
    max-width: 96vw;
    max-height: 80vh;
  }
}

@media (max-width: 480px) {
  .site-reviews {
    padding: 24px 12px 32px;
  }

  .site-reviews-title {
    font-size: 20px;
  }

  .site-reviews-subtitle {
    font-size: 12.5px;
  }

  .site-reviews-summary {
    padding: 14px 12px;
    gap: 12px;
  }

  .site-rating-avg {
    font-size: 28px;
  }

  .site-rating-stars {
    font-size: 14px;
  }

  .site-rating-total {
    font-size: 11.5px;
  }

  .site-review-card {
    padding: 14px 12px;
  }

  .site-review-comment {
    font-size: 13px;
    line-height: 1.5;
  }

  .site-review-photo-btn {
    width: 58px;
    height: 58px;
  }

  .photo-preview-item {
    width: 58px;
    height: 58px;
  }
}

/* ==========================================================================
   Carrossel de avaliações (index) + foto maior no card + ferramentas do topo
   ========================================================================== */

.site-reviews-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.btn-ver-todas-avaliacoes,
.btn-pausar-carrossel {
  background: #ffffff;
  color: #222222;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 9px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  white-space: nowrap;
}

.btn-pausar-carrossel {
  padding: 9px 11px;
}

.btn-ver-todas-avaliacoes:hover,
.btn-pausar-carrossel:hover {
  background: #fff8f3;
  color: #ff6600;
  border-color: #ff6600;
  transform: translateY(-1px);
}

.btn-ver-todas-avaliacoes:focus-visible,
.btn-pausar-carrossel:focus-visible {
  outline: 2px solid #ff6600;
  outline-offset: 2px;
}

.site-reviews-carousel-wrap {
  position: relative;
}

/* Trilho do carrossel: rolagem horizontal com encaixe (scroll-snap) */
.site-reviews-grid.is-carousel {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 6px 2px 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.site-reviews-grid.is-carousel::-webkit-scrollbar {
  display: none;
}

.site-reviews-grid.is-carousel .site-review-card {
  flex: 0 0 86%;
  max-width: 86%;
  scroll-snap-align: start;
  min-width: 0;
}

.site-reviews-grid.is-carousel .avaliacoes-empty {
  flex: 1 1 100%;
  max-width: 100%;
}

@media (min-width: 600px) {
  .site-reviews-grid.is-carousel .site-review-card {
    flex: 0 0 calc((100% - 20px) / 2);
    max-width: calc((100% - 20px) / 2);
  }
}

@media (min-width: 1000px) {
  .site-reviews-grid.is-carousel .site-review-card {
    flex: 0 0 calc((100% - 40px) / 3);
    max-width: calc((100% - 40px) / 3);
  }
}

/* Setas (desktop; no celular o arrasto resolve) */
.carrossel-seta {
  display: none;
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 40px;
  height: 40px;
  margin-top: -28px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #222222;
  font-size: 14px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.carrossel-seta:hover {
  color: #ff6600;
  border-color: #ff6600;
  transform: scale(1.06);
}

.carrossel-seta:focus-visible {
  outline: 2px solid #ff6600;
  outline-offset: 2px;
}

.carrossel-seta.is-prev { left: -14px; }
.carrossel-seta.is-next { right: -14px; }

@media (min-width: 1000px) {
  .site-reviews-grid.is-carousel ~ .carrossel-seta,
  .site-reviews-carousel-wrap .carrossel-seta { display: flex; }
}

/* Modo "ver todas": volta a ser grade e esconde as setas */
.site-reviews-carousel-wrap.is-grid-mode .carrossel-seta { display: none; }
.site-reviews-carousel-wrap.is-grid-mode .site-reviews-grid.is-carousel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  overflow: visible;
  scroll-snap-type: none;
  padding: 0;
}

/* No modo grade valem as regras de grade: os limites de largura do carrossel
   saem do caminho. Em item de grade, `max-width` em % é resolvido contra a
   COLUNA, então o card herdava 1/3 dela e aparecia espremido. */
.site-reviews-carousel-wrap.is-grid-mode .site-reviews-grid.is-carousel .site-review-card {
  flex: 0 1 auto;
  width: auto;
  max-width: none;
  scroll-snap-align: none;
}

/* Foto maior no card: 1 foto vira destaque; 2-3 ficam em miniaturas maiores */
.site-review-photos.is-hero .site-review-photo-btn {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
}

.site-review-photos.is-hero .site-review-photo-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-review-photos:not(.is-hero) .site-review-photo-btn {
  width: 96px;
  height: 96px;
  border-radius: 10px;
}

@media (max-width: 599px) {
  .site-review-photos:not(.is-hero) .site-review-photo-btn {
    width: 78px;
    height: 78px;
  }
}
