/* Single product page */

.pdp { padding: 2.5rem 0 5rem; }
.pdp .crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; font-size: 1rem; margin-bottom: 2rem; }
.pdp .crumbs a { color: var(--charcoal-soft); font-weight: 500; }
.pdp .crumbs a:hover { color: var(--pink); }
.pdp .crumbs span { font-weight: 700; }
.pdp .crumbs i { font-style: normal; color: var(--line); }

.pdp__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 4.5rem; align-items: start; }

/* Gallery */
.gallery { position: sticky; top: 110px; }
.gallery__main {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}
.gallery__main .tag { top: 1.2rem; left: 1.2rem; }
.view { margin: 0; position: absolute; inset: 0; display: grid; place-items: center; }
.view.is-active { animation: fade 0.35s ease; }
@keyframes fade { from { opacity: 0; transform: scale(0.98); } }
.view--print img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }

/* "On the wall" mock-up */
.view--wall, .thumb-btn--wall { background: linear-gradient(to bottom, #ece4d8 78%, #d9cbb8 78%); }
.frame {
  background: #fff;
  padding: 7%;
  border: 10px solid var(--charcoal);
  box-shadow: 0 30px 40px -24px rgba(43, 43, 46, 0.55);
}
.view--wall .frame { width: 48%; margin-bottom: 12%; }
.frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* "Printed" card mock-up */
.view--card, .thumb-btn--card { background: var(--cream); }
.card-print {
  background: #fff;
  padding: 4%;
  border-radius: 6px;
  transform: rotate(-4deg);
  box-shadow: 0 30px 40px -26px rgba(43, 43, 46, 0.6), 0 0 0 1px var(--line);
}
.view--card .card-print { width: 58%; }
.card-print img { width: 100%; aspect-ratio: 5 / 7; object-fit: cover; border-radius: 3px; }

.gallery__thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.thumb-btn {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.thumb-btn:hover { transform: translateY(-3px); }
.thumb-btn[aria-selected="true"] { border-color: var(--charcoal); }
.thumb-btn:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.thumb-btn--print img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.thumb-btn--wall .frame { width: 46%; margin-bottom: 14%; padding: 6%; border-width: 4px; }
.thumb-btn--card .card-print { width: 50%; }
.thumb-btn span {
  position: absolute; bottom: 0.5rem; left: 50%; transform: translateX(-50%);
  background: rgba(43, 43, 46, 0.85); color: #fff;
  font: 700 0.7rem var(--body); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  padding: 0.25rem 0.6rem; border-radius: 999px;
}

/* Info */
.pdp__info { padding-top: 1rem; }
.pdp__info h1 { font-size: clamp(3rem, 6vw, 5rem); margin-bottom: 0.15em; }
.pdp__price { font: 700 2.4rem var(--display); color: var(--teal); margin-bottom: 1.6rem; }
.pdp .instant {
  display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem;
  font-size: 1.1rem; font-weight: 500;
  background: var(--paper);
  border-left: 6px solid var(--pink);
  padding: 1.1rem 1.4rem;
  border-radius: 0 16px 16px 0;
  margin: 0 0 2rem;
}
.pdp .instant strong { font-weight: 700; }
.heart { color: var(--pink); display: inline-block; animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.3); } 30% { transform: scale(1); } 45% { transform: scale(1.2); } }

/* Licence */
.licence { border: 0; padding: 0; margin: 0 0 1.4rem; display: grid; gap: 0.8rem; }
.licence legend { font: 700 1.25rem var(--display); margin-bottom: 0.8rem; padding: 0; }
.licence__opt {
  display: flex; align-items: center; gap: 1rem;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 1rem 1.3rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.licence__opt:hover { border-color: var(--charcoal-soft); }
.licence__opt:has(input:checked) { border-color: var(--charcoal); box-shadow: 0 10px 24px -18px rgba(43, 43, 46, 0.7); }
.licence__opt input {
  appearance: none; flex: none; margin: 0;
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--charcoal);
  display: grid; place-items: center;
  cursor: pointer;
}
.licence__opt input::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--pink); transform: scale(0); transition: transform 0.15s ease; }
.licence__opt input:checked { border-color: var(--pink); }
.licence__opt input:checked::after { transform: scale(1); }
.licence__opt input:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
.licence__body { flex: 1; min-width: 0; }
.licence__body strong { display: block; font-size: 1.1rem; }
.licence__body small { display: block; font-size: 0.95rem; color: var(--charcoal-soft); line-height: 1.35; }
.licence__price { font-weight: 700; font-size: 1.15rem; color: var(--teal); }

.add-main { font-size: 1.15rem; padding-block: 1.2rem; justify-content: center; }
.add-main.is-added { background: var(--teal); border-color: var(--teal); }

.pdp .desc { font-size: 1.15rem; margin: 2rem 0 1.2rem; color: var(--charcoal-soft); }
.pdp .facts { margin: 0; }
.pdp .facts li { font-size: 1.05rem; }

/* You might also like */
.also { background: var(--paper); border-top: 1px solid var(--line); }
.also__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); justify-content: center; gap: 2rem; }

@media (max-width: 980px) {
  .pdp { padding-top: 1.5rem; }
  .pdp__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .gallery { position: static; }
  .gallery__thumbs { gap: 0.7rem; }
  .thumb-btn { border-radius: 14px; }
  .thumb-btn span { font-size: 0.6rem; }
  .pdp__info { padding-top: 0; }
  .also__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .also .friend__info { flex-direction: column; align-items: flex-start; gap: 0.8rem; padding: 1rem; }
  .also .friend h3 { font-size: 1.2rem; }
  .also .friend .tag { font-size: 0.65rem; padding: 0.3rem 0.65rem; top: 0.6rem; left: 0.6rem; }
}

/* fixes: hidden views, thumb backgrounds */
.view[hidden] { display: none; }
.thumb-btn.thumb-btn--wall { background: linear-gradient(to bottom, #ece4d8 78%, #d9cbb8 78%); }
.thumb-btn.thumb-btn--card { background: var(--cream); }

.gallery__main { aspect-ratio: 4 / 5; }
.view--print img { object-position: center top; }
