/* ── Layout principal ────────────────────────────────────────── */
.pdet-main {
  padding-top: 64px;
  background: var(--color-bg, #faf8f5);
}

/* ── Header ──────────────────────────────────────────────────── */
.pdet-header {
  padding: 40px 64px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pdet-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted, #8a7d72);
  text-decoration: none;
  transition: color 0.2s ease;
}

.pdet-back:hover { color: #5d807a; }

.pdet-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pdet-cat {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: #5d807a;
  text-transform: uppercase;
}

.pdet-title {
  font-family: var(--font-sans);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--color-text, #2a2a2a);
  margin: 0;
  line-height: 1.2;
}

.pdet-info {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.pdet-info__item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--color-text-muted, #8a7d72);
  white-space: nowrap;
}

/* ── Descripción ─────────────────────────────────────────────── */
.pdet-description {
  padding: 0 64px 8px;
}

.pdet-description__text {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: #555;
  line-height: 1.85;
  margin: 0;
}

/* ── Galería en columnas ─────────────────────────────────────── */
.pdet-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 24px 64px 80px;
}

.pdet-gallery__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pdet-gallery__item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.pdet-gallery__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 10px;
  font-family: var(--font-sans, sans-serif);
  font-size: 1.2rem;
  /* font-weight: 600; */
  letter-spacing: 0.12em;
  border-radius: 4px;
  pointer-events: none;
  background: var(--color-accent, #5d807a);
  color: #fff;
}

.pdet-gallery__item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pdet-gallery__item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* ── Lightbox ────────────────────────────────────────────────── */
.pdet-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.pdet-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.pdet-lightbox__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 60px 80px;
  box-sizing: border-box;
}

.pdet-lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  display: block;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.pdet-lightbox__close {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pdet-lightbox__close:hover { background: rgba(255,255,255,0.25); }

.pdet-lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.pdet-lightbox__nav:hover  { background: rgba(255,255,255,0.25); }
.pdet-lightbox__nav:disabled { opacity: 0.2; cursor: not-allowed; }

.pdet-lightbox__nav--prev { left: 20px; }
.pdet-lightbox__nav--next { right: 20px; }

.pdet-lightbox__counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.55);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  pointer-events: none;
}

/* ── Sin imágenes ────────────────────────────────────────────── */
.pdet-no-images {
  padding: 40px 64px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--color-text-muted, #8a7d72);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .pdet-header      { padding: 32px 40px 24px; }
  .pdet-description { padding: 0 40px 8px; }
  .pdet-gallery     { padding: 20px 40px 60px; gap: 8px; }
}

@media (max-width: 768px) {
  .pdet-header      { padding: 24px 24px 20px; gap: 16px; }
  .pdet-description { padding: 0 24px 8px; }
  .pdet-gallery     { grid-template-columns: repeat(2, 1fr); padding: 16px 24px 48px; gap: 6px; }
  .pdet-title       { font-size: clamp(1.4rem, 5vw, 2rem); }
}

@media (max-width: 480px) {
  .pdet-header      { padding: 20px 16px 16px; }
  .pdet-description { padding: 0 16px 8px; }
  .pdet-gallery     { grid-template-columns: 1fr; padding: 14px 16px 40px; }
  .pdet-title       { font-size: clamp(1.2rem, 6vw, 1.6rem); }
}
