body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #ffffff;
    color: #000000;
  }

	p.copy { font: normal 9px Verdana; color: #c5c5c5; margin: 2px 0px 5px 5px;}


	
  /* -------------------------------
     GRID LAYOUT (5–6 columns)
     ------------------------------- */

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
  padding: 20px;

  /* 👇 cap at 5 columns */
  max-width: calc(5 * 180px + 4 * 22px);
  margin: 0 auto;
}


  @media (max-width: 600px) {
    .thumb-grid {
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
  }

  .thumb-card {
    cursor: pointer;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.15s ease;
    border: 1px solid #ddd;
  }

  .thumb-card:hover {
    transform: scale(1.03);
  }
  
.thumb-card:hover .thumb-image-wrap img{
  transform: scale(1.04);
}  

.thumb-image-wrap img {
  width: 100%;
  height: 160px;
  object-fit: cover;    
  object-position: top;
  display: block;
  transition: transform 180ms ease;
  will-change: transform;
}

  .thumb-caption {
    padding: 10px;
    text-align: center;
    font-size: 0.9em;
  }

  .thumb-caption strong {
    font-weight: bold;
    color: #c37777;
  }
  
  h2.books { font: normal 14px Verdana; font-weight: bold; color: #fff; background-color: #c73333; border: 1px solid #222222; padding: 2px 5px 2px 5px; margin: 12px 0px 12px 0px; }

  /* -------------------------------
     LIGHTBOX (Pinterest / Instagram)
     ------------------------------- */

  .lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 20, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    animation: fadeIn 0.25s ease-out;
  }

.lightbox-close {
	  position: absolute;
	  top: 10px;
	  right: 14px;
	  background: rgba(0,0,0,0.55);
	  color: #fff;
	  border: none;
	  font-size: 28px;
	  line-height: 28px;
	  padding: 6px 10px;
	  border-radius: 6px;
	  cursor: pointer;
	  z-index: 6000;
	  transition: background 0.2s ease;
	}

.lightbox-close:hover {
  background: rgba(0,0,0,0.75);
}

@media (hover: none) {
  .lightbox-close {
    padding: 10px 14px;
    font-size: 34px;
  }
}
	/* image stays responsive */
#lightboxImage {
  display: block;
  margin: 0 auto 15px auto;
  border-radius: 8px;

  /* Automatically fit phone screens */
  max-width: 100%;
  height: auto;

  /* But never exceed 600px on bigger screens */
  width: auto;
  max-height: 70vh;
  transform-origin: center center;
}



  .lightbox-text h2 {
    margin: 0;
    color: #000;
    font-size: 1.4em;
  }

.lightbox-text {
  width: 100%;
  max-width: 100%;
  min-width: 0; /* ✅ correct place */
}

.lightbox-text p {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.lightbox-content {
  position: relative;
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  animation: scaleIn 0.25s ease-out;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
  text-align: center;
  touch-action: none;

  /* ✅ key: size to content (the image), not to the viewport */
  width: fit-content !important;
  max-width: 95vw !important;
  max-height: 90vh !important;

  /* keep children stacked */
  display: flex;
  flex-direction: column;
  align-items: center;
}


  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
  }