/* The Hidden Reef — Product Card Styles (shared across all pages)
   Image-dominant cards with brand pills, orange prices, hover lift, gradient fade */

/* Grid layout */
.thr-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

/* Card */
.thr-product {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  background: #f7fbfd;
  border: 1px solid rgba(195,222,232,.72);
  box-shadow: -8px 12px 15px rgba(0,0,0,.45);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  animation: thrCardSettle .42s ease;
}
.thr-product:hover {
  transform: translateY(-4px);
  border-color: rgba(116,205,235,.45);
  box-shadow: -12px 18px 21px rgba(0,0,0,.58);
}
.thr-product:nth-child(2n) { animation-delay: .035s; }
.thr-product:nth-child(3n) { animation-delay: .07s; }
.thr-product:nth-child(4n) { animation-delay: .105s; }

/* Image area */
.thr-product .thr-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.92;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #f7fbfd;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.thr-product .thr-img::after {
  content: none;
  pointer-events: none;
}
.thr-product .thr-img img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  filter: drop-shadow(0 10px 14px rgba(13,47,65,.16));
  transition: transform .26s ease, filter .26s ease;
}
.thr-product:hover .thr-img img {
  transform: scale(1.055);
  filter: drop-shadow(0 14px 18px rgba(13,47,65,.2)) saturate(1.04);
}

/* Brand pill */
.thr-product .thr-brand {
  position: absolute;
  top: 6px; left: 6px;
  z-index: 4;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0,167,183,.9), rgba(116,92,214,.74));
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* External link icon */
.thr-product .thr-ext {
  position: absolute;
  top: 6px; right: 6px;
  z-index: 4;
  width: 22px; height: 22px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  background: rgba(3,24,38,.75);
  border: 1px solid rgba(116,205,235,.28);
  color: #80d4e8;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.thr-product .thr-ext:hover {
  background: rgba(116,205,235,.25);
  color: #fff;
  border-color: #40d9ff;
}

/* Page badge */
.thr-product .thr-page {
  position: absolute;
  bottom: 6px; right: 6px;
  z-index: 4;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(3,24,38,.84);
  border: 1px solid rgba(116,205,235,.34);
  color: #dff8ff;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.thr-product .thr-options {
  position: absolute;
  bottom: 6px; left: 6px;
  z-index: 4;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,123,50,.94);
  border: 1px solid rgba(255,255,255,.42);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  box-shadow: 0 2px 8px rgba(0,0,0,.28);
}

/* Info bar */
.thr-product .thr-info {
  position: relative;
  z-index: 2;
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 0;
  background: #f7fbfd;
}
.thr-product .thr-price {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 4px;
  background: linear-gradient(135deg, #ff7b32, #e86520);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(255,123,50,.3);
}
.thr-product .thr-name {
  margin: 0;
  color: #102f43;
  font-size: 12px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .14s ease;
}
.thr-product:hover .thr-name {
  color: #007fa4;
}

@keyframes thrCardSettle {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .thr-product,
  .thr-product .thr-img img {
    animation: none;
    transition: none;
  }
  .thr-product:hover,
  .thr-product:hover .thr-img img {
    transform: none;
  }
}

/* Mobile */
@media (max-width: 760px) {
  .thr-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 7px;
  }
  .thr-product .thr-img { aspect-ratio: 1 / 0.82; margin: 0; width: 100%; }
  .thr-product .thr-img img { padding: 8px; }
  .thr-product .thr-info { padding: 6px 7px 7px; }
  .thr-product .thr-brand { font-size: 8px; padding: 2px 5px; top: 4px; left: 4px; }
  .thr-product .thr-ext { width: 20px; height: 20px; top: 4px; right: 4px; font-size: 10px; }
  .thr-product .thr-price { font-size: 10px; padding: 1px 6px; }
  .thr-product .thr-name { font-size: 10.5px; line-height: 1.2; -webkit-line-clamp: 2; }
}
@media (max-width: 380px) {
  .thr-product-grid { gap: 5px; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
  .thr-product .thr-img { aspect-ratio: 1 / 0.8; }
  .thr-product .thr-info { padding: 5px 6px 7px; }
  .thr-product .thr-name { font-size: 10px; }
}
