/* ============================================================
   Mac3D — producto-posts.css  v2
   Sección comunidad en página de producto — tema claro
   ============================================================ */

/* ── SECCIÓN ── */
.pcom-section {
  padding: 72px 0 80px;
  background: #f5f5f7;
  border-top: 1px solid rgba(0,0,0,.06);
}
.pcom-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── HEADER ── */
.pcom-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}
.pcom-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 800;
  color: #1a1b18;
  letter-spacing: -.025em;
  margin-bottom: 4px;
  line-height: 1.15;
}
.pcom-sub {
  font-size: .84rem;
  color: #86868b;
}
.pcom-btn-share {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .84rem;
  font-weight: 600;
  color: #fff;
  background: var(--orange, #D94F1E);
  border: none;
  border-radius: 100px;
  padding: 10px 18px;
  cursor: pointer;
  transition: background .18s, transform .14s;
  white-space: nowrap;
  font-family: inherit;
  flex-shrink: 0;
}
.pcom-btn-share:hover { background: #c2451a; transform: translateY(-1px); }

/* ── CARRUSEL ── */
.pcom-carousel-wrap {
  position: relative;
  padding: 0 0px;
}

/* Flechas */
.pcom-arrow {
  position: absolute;
  top: 38%;                      /* centro de la zona de imagen */
  transform: translateY(-50%);
  z-index: 10;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid rgba(0,0,0,.1);
  color: #1a1b18;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  transition: box-shadow .18s, transform .18s, opacity .18s;
}
.pcom-arrow:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
  transform: translateY(-50%) scale(1.06);
}
.pcom-arrow:disabled { opacity: .3; cursor: default; transform: translateY(-50%); }
.pcom-arrow-prev { left: -20px; }
.pcom-arrow-next { right: -20px; }

/* Track */
.pcom-track-viewport {
  overflow: hidden;
}
.pcom-track {
  display: flex;
  gap: 16px;
  transition: transform .45s cubic-bezier(.16,1,.3,1);
  align-items: flex-start;
}

/* ── CARD ── */
.pcom-card {
  flex: 0 0 320px;
  width: 320px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: box-shadow .22s, transform .22s;
}
.pcom-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

/* ── TIRA DE IMÁGENES ──
   CRÍTICO: overflow hidden + flex sin wrap
   para que las fotos queden en fila horizontal */
.pcom-imgs-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;           /* ← oculta las fotos que no están en vista */
  background: #f0efe8;
}

.pcom-imgs-strip {
  display: flex;              /* ← fila horizontal */
  flex-wrap: nowrap;          /* ← nunca apilar */
  width: 100%;
  height: 100%;
  transition: transform .35s cubic-bezier(.16,1,.3,1);
  cursor: grab;
  user-select: none;
  will-change: transform;
}
.pcom-imgs-strip:active { cursor: grabbing; }

.pcom-img-slide {
  flex: 0 0 100%;             /* ← cada slide ocupa exactamente el 100% */
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.pcom-img-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;          /* ← llena sin distorsión */
  display: block;
  transition: transform .35s ease;
}

/* Dots indicadores */
.pcom-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 2;
}
.pcom-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: background .2s, transform .2s;
  border: 1px solid rgba(0,0,0,.1);
}
.pcom-dot.is-active {
  background: #fff;
  transform: scale(1.25);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

/* Contador de fotos */
.pcom-img-count {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 100px;
  backdrop-filter: blur(6px);
  z-index: 2;
  letter-spacing: .02em;
}

/* ── BODY DE CARD ── */
.pcom-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Autor */
.pcom-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pcom-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(0,0,0,.06);
}
.pcom-avatar-initials {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--orange, #D94F1E);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pcom-author-info { flex: 1; min-width: 0; }
.pcom-author-name {
  font-size: .86rem;
  font-weight: 600;
  color: #1a1b18;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pcom-bandera { font-size: .95rem; flex-shrink: 0; }
.pcom-author-time { font-size: .73rem; color: #86868b; }

/* Descripción */
.pcom-desc {
  font-size: .86rem;
  color: #424245;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Chips */
.pcom-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.pcom-chip {
  font-size: .7rem;
  font-weight: 500;
  color: #52524a;
  background: #f0efe8;
  border-radius: 100px;
  padding: 3px 9px;
}

/* ── ACCIONES ── */
.pcom-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,.06);
}

.pcom-like-btn,
.pcom-comment-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .84rem;
  font-weight: 600;
  color: #86868b;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  transition: color .16s;
  font-family: inherit;
}
.pcom-like-btn:hover { color: #e03030; }
.pcom-like-btn.liked { color: #e03030; }
.pcom-like-icon { transition: fill .16s; }
.pcom-like-btn.liked .pcom-like-icon { fill: #e03030; stroke: #e03030; }
.pcom-like-btn.liked { animation: pcom-pop .25s cubic-bezier(.34,1.56,.64,1); }
@keyframes pcom-pop { 0%{transform:scale(1)} 50%{transform:scale(1.35)} 100%{transform:scale(1)} }

.pcom-comment-toggle:hover { color: #1a1b18; }
.pcom-comment-toggle.is-active { color: #1a1b18; }

/* ── COMENTARIOS ── */
.pcom-comments {
  border-top: 1px solid rgba(0,0,0,.06);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: pcom-slide-down .2s ease;
}
@keyframes pcom-slide-down {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pcom-comments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.1) transparent;
}
.pcom-comments-list::-webkit-scrollbar { width: 3px; }
.pcom-comments-list::-webkit-scrollbar-thumb { background: rgba(0,0,0,.12); border-radius: 2px; }

.pcom-comments-loading {
  display: flex; justify-content: center; padding: 10px 0;
}
.pcom-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(0,0,0,.08);
  border-top-color: #86868b;
  border-radius: 50%;
  animation: pcom-spin .7s linear infinite;
}
@keyframes pcom-spin { to { transform: rotate(360deg); } }

.pcom-empty-msg {
  font-size: .8rem;
  color: #86868b;
  text-align: center;
  padding: 8px 0;
}

/* Comentario individual */
.pcom-cmt {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.pcom-cmt-av {
  width: 24px; height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,.06);
}
.pcom-cmt-av-i {
  display: flex; align-items: center; justify-content: center;
  background: var(--orange, #D94F1E);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
}
.pcom-cmt-body {
  flex: 1; min-width: 0;
  background: #f5f5f7;
  border-radius: 10px;
  padding: 7px 10px;
}
.pcom-cmt-name {
  font-size: .76rem;
  font-weight: 700;
  color: #1a1b18;
  margin-right: 4px;
}
.pcom-cmt-txt {
  font-size: .82rem;
  color: #424245;
  line-height: 1.45;
  word-break: break-word;
}
.pcom-cmt-time {
  display: block;
  font-size: .68rem;
  color: #86868b;
  margin-top: 3px;
}

/* Input comentario */
.pcom-comment-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pcom-comment-avatar,
.pcom-comment-avatar-initials {
  width: 26px; height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.pcom-comment-avatar { border: 1px solid rgba(0,0,0,.06); }
.pcom-comment-avatar-initials {
  background: var(--orange, #D94F1E);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.pcom-comment-field {
  flex: 1;
  display: flex;
  align-items: center;
  background: #f5f5f7;
  border: 1.5px solid rgba(0,0,0,.08);
  border-radius: 20px;
  padding: 5px 5px 5px 12px;
  gap: 6px;
  transition: border-color .18s, background .18s;
}
.pcom-comment-field:focus-within {
  border-color: rgba(217,79,30,.4);
  background: #fff;
}
.pcom-comment-input {
  flex: 1;
  border: none; outline: none;
  background: transparent;
  font-size: .84rem;
  color: #1a1b18;
  font-family: inherit;
  min-width: 0;
}
.pcom-comment-input::placeholder { color: #c7c7cc; }
.pcom-comment-send {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--orange, #D94F1E);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
  transition: background .16s, transform .14s;
}
.pcom-comment-send:hover { background: #c2451a; transform: scale(1.1); }
.pcom-comment-send:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Login CTA */
.pcom-login-cta {
  display: block;
  text-align: center;
  font-size: .82rem;
  font-weight: 600;
  color: var(--orange, #D94F1E);
  text-decoration: none;
  padding: 4px 0;
  transition: opacity .16s;
}
.pcom-login-cta:hover { opacity: .75; }

/* ── FOOTER ── */
.pcom-footer { text-align: center; margin-top: 28px; }
.pcom-ver-mas {
  font-size: .86rem;
  font-weight: 600;
  color: var(--orange, #D94F1E);
  text-decoration: none;
  transition: opacity .16s;
}
.pcom-ver-mas:hover { opacity: .75; }

/* ── LIGHTBOX ── */
.pcom-lb {
  position: fixed; inset: 0; z-index: 9500;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .22s;
}
.pcom-lb.open { opacity: 1; pointer-events: all; }
.pcom-lb-bg {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.9);
  backdrop-filter: blur(12px);
}
.pcom-lb-stage {
  position: relative; z-index: 1;
  max-width: 90vw; max-height: 88vh;
  display: flex; align-items: center; justify-content: center;
}
.pcom-lb-img {
  max-width: 90vw; max-height: 88vh;
  object-fit: contain; border-radius: 8px;
  box-shadow: 0 32px 80px rgba(0,0,0,.5);
  display: block;
}
.pcom-lb-close {
  position: absolute; top: 20px; right: 20px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); transition: background .16s;
}
.pcom-lb-close:hover { background: rgba(255,255,255,.22); }
.pcom-lb-prev, .pcom-lb-next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); transition: background .16s;
}
.pcom-lb-prev { left: 20px; }
.pcom-lb-next { right: 20px; }
.pcom-lb-prev:hover, .pcom-lb-next:hover { background: rgba(255,255,255,.2); }
.pcom-lb-counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 2;
  color: rgba(255,255,255,.7); font-size: .8rem; font-weight: 600;
  background: rgba(0,0,0,.4); padding: 4px 12px; border-radius: 100px;
  backdrop-filter: blur(6px);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .pcom-card { flex: 0 0 280px; width: 280px; }
  .pcom-arrow-prev { left: -14px; }
  .pcom-arrow-next { right: -14px; }
}
@media (max-width: 600px) {
  .pcom-wrap { padding: 0 20px; }
  .pcom-section { padding: 52px 0 60px; }
  .pcom-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .pcom-btn-share { width: 100%; justify-content: center; }
  .pcom-card { flex: 0 0 calc(100vw - 56px); width: calc(100vw - 56px); }
  .pcom-arrow-prev { left: -8px; width: 32px; height: 32px; }
  .pcom-arrow-next { right: -8px; width: 32px; height: 32px; }
  .pcom-lb-prev { left: 8px; }
  .pcom-lb-next { right: 8px; }
}

/* ══════════════════════════════════════════════════════════
   RESEÑAS — compradores verificados
   ══════════════════════════════════════════════════════════ */

.pcom-resenas-section {
  padding: 60px 0 80px;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,.06);
}

.pcom-resenas-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 800;
  color: #1a1b18;
  letter-spacing: -.02em;
  margin-bottom: 4px;
}
.pcom-resenas-sub { font-size: .84rem; color: #86868b; margin-bottom: 28px; }

/* Login / locked */
.pcom-resena-login a {
  font-size: .9rem; font-weight: 600; color: var(--orange, #D94F1E);
  text-decoration: none;
}
.pcom-resena-locked {
  text-align: center; padding: 36px 24px;
  background: #f9f9f9; border-radius: 16px; margin-bottom: 32px;
}
.pcom-resena-locked-icon { font-size: 2rem; margin-bottom: 10px; }
.pcom-resena-locked p { font-size: .9rem; color: #6e6e73; margin-bottom: 16px; }
.pcom-resena-cta {
  display: inline-block; background: var(--orange, #D94F1E); color: #fff;
  font-size: .88rem; font-weight: 700; padding: 11px 24px;
  border-radius: 100px; text-decoration: none; transition: background .16s;
}
.pcom-resena-cta:hover { background: #c2451a; }

/* Formulario */
.pcom-resena-form {
  background: #f9f9f9; border-radius: 16px;
  padding: 20px; margin-bottom: 36px;
  display: flex; flex-direction: column; gap: 16px;
  border: 1px solid rgba(0,0,0,.06);
}

/* Zona de fotos */
.pcom-resena-photos { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pcom-resena-dropzone {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: #fff;
  border: 1.5px dashed rgba(0,0,0,.15); border-radius: 10px;
  cursor: pointer; font-size: .84rem; color: #86868b;
  transition: border-color .18s, background .18s;
}
.pcom-resena-dropzone:hover,
.pcom-resena-dropzone.drag-over {
  border-color: var(--orange, #D94F1E);
  background: rgba(217,79,30,.03);
  color: var(--orange, #D94F1E);
}
.pcom-resena-dropzone small { opacity: .65; }
.pcom-resena-dropzone svg { flex-shrink: 0; }

.pcom-resena-previews { display: flex; gap: 8px; flex-wrap: wrap; }
.pcom-resena-preview {
  position: relative; width: 72px; height: 72px; border-radius: 10px;
  background-size: cover; background-position: center;
  background-color: #f0efe8;
  border: 1px solid rgba(0,0,0,.08);
}
.pcom-resena-preview-rm {
  position: absolute; top: -6px; right: -6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #1a1b18; color: #fff; border: none;
  cursor: pointer; font-size: .6rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.pcom-resena-preview-add {
  width: 72px; height: 72px; border-radius: 10px;
  border: 1.5px dashed rgba(0,0,0,.15); background: transparent;
  cursor: pointer; font-size: 1.4rem; color: #86868b;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .16s, color .16s;
}
.pcom-resena-preview-add:hover { border-color: var(--orange); color: var(--orange); }

/* Textarea */
.pcom-resena-text-wrap { display: flex; flex-direction: column; gap: 10px; }
.pcom-resena-textarea {
  width: 100%; border: 1.5px solid rgba(0,0,0,.1); border-radius: 12px;
  padding: 12px 14px; font-size: .9rem; color: #1a1b18;
  font-family: inherit; resize: vertical; min-height: 90px;
  outline: none; background: #fff; transition: border-color .16s;
  line-height: 1.55;
}
.pcom-resena-textarea:focus { border-color: var(--orange, #D94F1E); }
.pcom-resena-textarea::placeholder { color: #c7c7cc; }

.pcom-resena-actions {
  display: flex; align-items: center; justify-content: space-between;
}
.pcom-resena-chars { font-size: .76rem; color: #86868b; }
.pcom-resena-submit {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--orange, #D94F1E); color: #fff;
  font-size: .88rem; font-weight: 700; border: none;
  border-radius: 100px; padding: 10px 22px; cursor: pointer;
  font-family: inherit; transition: background .16s;
}
.pcom-resena-submit:hover:not(:disabled) { background: #c2451a; }
.pcom-resena-submit:disabled { opacity: .6; cursor: not-allowed; }
.pcom-resena-spinner { animation: pcom-spin .75s linear infinite; }

.pcom-resena-msg {
  font-size: .82rem; padding: 8px 12px; border-radius: 8px; display: none;
}
.pcom-resena-msg.ok  { background: #e8f5e9; color: #2e7d32; display: block; }
.pcom-resena-msg.err { background: #fdecea; color: #c62828; display: block; }

/* Lista de reseñas */
.pcom-resenas-list { display: flex; flex-direction: column; gap: 20px; }

.pcom-resena-item {
  padding: 20px; background: #f9f9f9; border-radius: 14px;
  border: 1px solid rgba(0,0,0,.05);
  display: flex; flex-direction: column; gap: 12px;
}

.pcom-resena-header {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.pcom-resena-avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  flex-shrink: 0; border: 1.5px solid rgba(0,0,0,.06);
}
.pcom-resena-avatar-i {
  display: flex; align-items: center; justify-content: center;
  background: var(--orange, #D94F1E); color: #fff;
  font-size: .72rem; font-weight: 700;
}
.pcom-resena-name { font-size: .88rem; font-weight: 700; color: #1a1b18; display: block; }
.pcom-resena-time { font-size: .73rem; color: #86868b; }
.pcom-resena-badge {
  margin-left: auto; font-size: .72rem; font-weight: 600;
  color: #2e7d32; background: #e8f5e9;
  padding: 3px 10px; border-radius: 100px;
}
.pcom-resena-texto {
  font-size: .9rem; color: #424245; line-height: 1.6; margin: 0;
}

.pcom-resena-imgs {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.pcom-resena-img-thumb {
  width: 88px; height: 88px; border-radius: 10px;
  object-fit: cover; cursor: zoom-in;
  border: 1px solid rgba(0,0,0,.06);
  transition: transform .2s; display: block;
}
.pcom-resena-img-thumb:hover { transform: scale(1.04); }

@media (max-width: 600px) {
  .pcom-resena-form { padding: 16px; }
  .pcom-resena-actions { flex-direction: column; align-items: flex-start; gap: 10px; }
  .pcom-resena-submit { width: 100%; justify-content: center; }
}