/* PageSpot v0.9 - dual-device previews, scoped to the Templates page only.
   Reuses the exact desktop/mobile screenshots and device frames on the homepage. */
.ps-gallery .template-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px 52px;
}
.ps-gallery .template-card {
  min-width: 0;
}
.ps-gallery .template-mockup {
  display: block;
  width: 100%;
  min-width: 0;
  border-radius: 12px;
  -webkit-user-drag: none;
}
.ps-gallery .template-mockup:hover {
  text-decoration: none;
}
.ps-gallery .template-mockup .device-composition {
  display: block;
  position: relative;
  min-width: 0;
  padding: 0 12% 10% 0;
  opacity: 1;
  transform: none;
}
.ps-gallery .template-mockup .desktop-device {
  display: block;
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 12px 26px #29352512;
}
.ps-gallery .template-mockup .browser-chrome {
  height: 24px;
  padding-inline: 10px;
  gap: 10px;
}
.ps-gallery .template-mockup .browser-address {
  min-width: 0;
  margin-right: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}
.ps-gallery .template-mockup .phone-device {
  display: block;
  position: absolute;
  width: 25%;
  inset: auto 0 0 auto;
  padding: 3px;
  border-radius: 23px;
  box-shadow: 0 10px 22px #22292122;
  pointer-events: none;
}
.ps-gallery .template-mockup .phone-screen {
  border-radius: 19px;
}
.ps-gallery .template-mockup .phone-top {
  height: 17px;
}
.ps-gallery .template-mockup .phone-top i {
  width: 32%;
  height: 8px;
  top: 4px;
}
.ps-gallery .template-mockup .phone-home {
  height: 10px;
}
.ps-gallery .template-mockup .phone-home::after {
  width: 32%;
  height: 2px;
  top: 4px;
}
.ps-gallery .template-meta {
  padding-top: 22px;
}
.ps-gallery .card-actions {
  justify-content: space-between;
  column-gap: 18px;
  row-gap: 4px;
  margin-top: 10px;
}
@media (max-width: 1100px) {
  .ps-gallery .template-grid { column-gap: 44px; }
}
@media (max-width: 1000px) {
  .ps-gallery .template-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 54px;
  }
  .ps-gallery .template-card { width: 100%; }
}
@media (max-width: 700px) {
  /* Keep BOTH views visible on phones, unlike the homepage carousel's
     phone-first layout. The captions and links stay below the entire pair. */
  .ps-gallery .template-grid { gap: 46px; }
  .ps-gallery .template-mockup .device-composition { padding: 0 14% 12% 0; }
  .ps-gallery .template-mockup .phone-device {
    width: 29%;
    padding: 2px;
    border-radius: 18px;
  }
  .ps-gallery .template-mockup .phone-screen { border-radius: 15px; }
  .ps-gallery .template-mockup .phone-top { height: 13px; }
  .ps-gallery .template-mockup .phone-top i { height: 6px; top: 3px; }
  .ps-gallery .template-mockup .phone-home { height: 8px; }
  .ps-gallery .template-mockup .phone-home::after { top: 3px; }
  .ps-gallery .template-mockup .browser-chrome { height: 21px; padding-inline: 8px; }
  .ps-gallery .template-mockup .browser-dots { gap: 3px; }
  .ps-gallery .template-mockup .browser-dots i { width: 4px; height: 4px; }
  .ps-gallery .template-mockup .browser-address { margin-right: 12px; font-size: 9px; }
  .ps-gallery .template-meta { padding-top: 20px; }
}
@media (max-width: 430px) {
  .ps-gallery .card-actions { flex-direction: column; align-items: flex-start; gap: 0; }
}
@media print {
  .ps-gallery .template-grid { display: block; }
  .ps-gallery .template-card { break-inside: avoid; margin-bottom: 32px; }
  .ps-gallery .template-mockup .phone-device { display: block; }
}
