.printed-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 3vw, 34px);
  background: rgba(28, 22, 18, 0.84);
  backdrop-filter: blur(18px);
}

.printed-gallery-modal.is-open {
  display: flex;
}

.printed-gallery-dialog {
  position: relative;
  width: min(1160px, 100%);
  max-height: min(92svh, 920px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 20px;
  padding: clamp(12px, 2vw, 18px);
  background: #fbf7ef;
  border: 1px solid rgba(212, 184, 150, 0.42);
  border-radius: 8px;
  box-shadow: 0 32px 110px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

.printed-gallery-stage {
  position: relative;
  min-height: 0;
  background: #211b18;
  border-radius: 7px;
  overflow: hidden;
}

.printed-gallery-stage img {
  display: block;
  width: 100%;
  height: min(78svh, 820px);
  object-fit: contain;
  background: #211b18;
}

.printed-gallery-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 2px 0;
}

.printed-gallery-kicker {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #b8956a;
}

.printed-gallery-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 400;
  line-height: 1.05;
  color: #2c2420;
}

.printed-gallery-count {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a7568;
}

.printed-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: auto;
}

.printed-gallery-thumb {
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 1px solid rgba(184, 149, 106, 0.22);
  border-radius: 6px;
  overflow: hidden;
  background: #efe7da;
  cursor: pointer;
  opacity: 0.72;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.printed-gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.printed-gallery-thumb.is-active {
  opacity: 1;
  border-color: #b8956a;
  transform: translateY(-2px);
}

.printed-gallery-close,
.printed-gallery-nav {
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(34, 27, 23, 0.56);
  color: #fff9f2;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.printed-gallery-close:hover,
.printed-gallery-nav:hover {
  background: rgba(184, 149, 106, 0.82);
}

.printed-gallery-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 26px;
  line-height: 1;
}

.printed-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  font-size: 30px;
  line-height: 1;
  transform: translateY(-50%);
}

.printed-gallery-prev {
  left: 14px;
}

.printed-gallery-next {
  right: 14px;
}

.print-card {
  position: relative;
}

.print-card .card-img-wrap {
  aspect-ratio: 4 / 5 !important;
  padding: 0 !important;
  background: #efe7da;
}

.print-card .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.print-card:focus-visible {
  outline: 2px solid #b8956a;
  outline-offset: 4px;
}

body.printed-gallery-lock {
  overflow: hidden;
}

@media (max-width: 780px) {
  .printed-gallery-modal {
    padding: 0;
  }

  .printed-gallery-dialog {
    width: 100%;
    height: 100svh;
    max-height: none;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 12px;
    border-radius: 0;
  }

  .printed-gallery-stage img {
    height: calc(100svh - 190px);
  }

  .printed-gallery-side {
    padding: 0 4px 2px;
  }

  .printed-gallery-thumbs {
    grid-template-columns: repeat(5, 1fr);
  }

  .printed-gallery-nav {
    width: 42px;
    height: 42px;
    font-size: 27px;
  }
}
