/* Penny's Litter 5 photo page — page-specific styles (only loaded by penny-litter-5.html).
   Everything is scoped under .p5-* classes; shared styles.css is untouched. */

.p5-section { padding-bottom: clamp(2.5rem, 6vw, 4rem); }

.p5-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  text-align: center;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.p5-title { margin: 0 0 0.35rem; }
.p5-subline {
  margin: 0 0 0.35rem;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  font-weight: 600;
  color: var(--ink);
}
.p5-hint { margin: 0; font-size: 0.92rem; color: var(--muted); }
.p5-reserve { white-space: nowrap; }

/* ——— Layout: one column, 2 photos per row (one puppy per row), Boys section then Girls — all screen sizes ——— */
.p5-wrap { width: min(900px, calc(100% - 2.5rem)); }
.p5-grid { display: block; }
.p5-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 0.75rem;
  align-items: start;
}
.p5-group + .p5-group { margin-top: 2rem; }
.p5-group-h {
  grid-column: 1 / -1;
  margin: 0;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--line);
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 1.1;
}
.p5-count {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
  vertical-align: middle;
}

/* ——— Photo slot ——— */
.p5-photo { margin: 0; min-width: 0; }
.p5-frame {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1; /* phones: square frame; every photo shown whole (contain) */
  overflow: hidden;
  border-radius: 14px;
  background: var(--cream);
  border: 1.5px dashed var(--line);
  box-shadow: var(--shadow);
}
.p5-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;      /* never crop: whole photo always visible (no heads/faces cut) */
  object-position: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.p5-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.5rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  line-height: 1.1;
  letter-spacing: 0.03em;
  color: var(--nav);
}
.p5-ph-dot {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--swatch, #ccc);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.1), 0 0 0 4px #fff;
  opacity: 0.85;
}
/* No photo yet: slot isn't a link target */
.p5-photo:not(.has-photo) .p5-frame { pointer-events: none; cursor: default; }
/* Photo present */
.p5-photo.has-photo .p5-frame { border: 1px solid #e6dccf; background: linear-gradient(180deg, #f6efe6 0%, #efe4d6 100%); }
.p5-photo.has-photo .p5-frame img { opacity: 1; }
.p5-photo.has-photo .p5-placeholder { display: none; }
.p5-photo.has-photo .p5-frame:hover { border-color: var(--accent); }
.p5-frame:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ——— Caption ——— */
.p5-photo figcaption {
  margin-top: 0.5rem;
  text-align: center;
  line-height: 1.25;
}
.p5-swatch {
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  margin-right: 0.35rem;
  vertical-align: -0.1rem;
  border-radius: 50%;
  background: var(--swatch, #ccc);
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.18);
}
.p5-cap-main { font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.p5-cap-sub { display: block; font-size: 0.78rem; color: var(--muted); }

.p5-cta { margin-top: clamp(1.75rem, 4vw, 2.5rem); display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }

/* ——— Wider screens: same single column, 2 photos per row, capped width ——— */
@media (min-width: 700px) {
  .p5-frame { aspect-ratio: 4 / 3; } /* wider screens: 4:3 frame, still contain (uncropped) */
  .p5-group { gap: 1.5rem 1.25rem; }
  .p5-group + .p5-group { margin-top: 2.75rem; }
  .p5-cap-main { font-size: 1rem; }
  .p5-cap-sub { font-size: 0.84rem; }
}
