body {
  font-family: sans-serif;
}
html {
  max-width: 100vw;
  overflow-x: hidden;
}
.result-count {
  margin: 8px 0 12px 0;
  font-size: 14px;
  opacity: 0.8;
}
#thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.thumb-wrapper {
  position: relative;
  width: 150px;
  
}

.thumb {
  width: 100%;
  display: block;
}

.thumb-id {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  color: #222;
  background: transparent;
  opacity: 1;
  pointer-events: auto;
  position: static;
  padding: 0;
  border-radius: 0;
}

.thumb-wrapper:hover .thumb-id {
  opacity: 1;
}

.viewer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  color: white;

  display: none;              /* 🔑 THIS MUST BE HERE */
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.viewer .content {
  max-width: 600px;
  text-align: center;
}

.viewer .content .price {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  text-align: center;
  color: white;
}

.viewer button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

#prev, #next {
  font-size: 36px;
}

.viewer img {
  max-width: 100%;
}

.viewer .close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 28px;
}
.description {
  margin-top: 4px;
  margin-bottom: 12px;
  font-size: 15px;
  opacity: 0.9;
}

#search {
  width: 100%;
  max-width: 320px;
  padding: 8px 10px;
  margin-bottom: 16px;
  font-size: 16px;
}

.thumb-wrapper {
  position: relative;
}


.sku {
  font-size: 18px;
  opacity: 0.6;
  margin-top: -6px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #ddd;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  height: 64px;
  width: auto;
}

.brand-text {
  font-size: 1.25rem;
  font-weight: bold;
}

.site-nav a {
  text-decoration: none;
  font-weight: 500;
}

#croc-app #thumbnails {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

#croc-app .thumb-wrapper {
  width: 240px;
}

#croc-app .thumb-id {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.image-wrap {
  position: relative;
  background: #111; /* fallback behind image */
}

.image-loading {
  position: absolute;
  inset: 0;
  display: none;

  align-items: center;
  justify-content: center;

  font-size: 1rem;
  letter-spacing: 0.5px;

  color: #e5e5e5;
  background: rgba(0, 0, 0, 0.75); /* dark overlay */
  z-index: 2;
}

/* Optional: subtle animation */
.image-loading::after {
  content: " …";
  animation: dots 1.2s infinite;
}

@keyframes dots {
  0% { content: " ."; }
  33% { content: " .."; }
  66% { content: " ..."; }
}

.image-wrap.loading .image-loading {
  display: flex;
}

.image-wrap.loading .image {
  visibility: hidden;
}

#caps-app #thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#caps-app .thumb-wrapper {
  width: 175px;
  margin: 0;
}

#caps-app .thumb {
  width: 175px;
  height: 175px;
  object-fit: cover;
  display: block;
}

#caps-app .thumb-id {
  margin-top: 4px;
  font-size: 0.9rem;
  line-height: 1.2;
  text-align: center;
}