/* 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: linear-gradient(160deg, rgba(240,248,250,.98), rgba(221,238,243,.97));
  border: 1px solid rgba(140,205,222,.54);
  box-shadow: -7px 11px 16px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.72);
  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) scale(1.008);
  border-color: rgba(64,217,255,.72);
  box-shadow: -12px 18px 24px rgba(0,0,0,.54), 0 0 0 1px rgba(64,217,255,.1);
}
.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:
    radial-gradient(circle at 78% 10%, rgba(116,205,235,.18), transparent 32%),
    linear-gradient(145deg, rgba(247,251,252,.98), rgba(218,235,241,.96));
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.thr-product .thr-img::after {
  content: "Quick view";
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 3;
  min-width: 84px;
  padding: 6px 10px;
  border: 1px solid rgba(116,205,235,.42);
  border-radius: 999px;
  color: #eaffff;
  background: rgba(3,24,38,.84);
  box-shadow: 0 8px 18px rgba(0,0,0,.28);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .03em;
  text-align: center;
  transform: translate(-50%, 8px);
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
.thr-product:hover .thr-img::after,
.thr-product:focus-visible .thr-img::after {
  transform: translate(-50%, 0);
  opacity: 1;
}
.thr-product .thr-img::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(112deg, transparent 18%, rgba(255,255,255,.36) 45%, transparent 68%);
  transform: translateX(-120%);
  transition: transform .54s cubic-bezier(.22,.8,.25,1);
  pointer-events: none;
}
.thr-product:hover .thr-img::before {
  transform: translateX(120%);
}
.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);
}
.thr-product .thr-sale-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  z-index: 5;
  max-width: calc(100% - 12px);
  padding: 3px 8px;
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 5px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), transparent 38%),
    linear-gradient(135deg, #ff451f, #d71912 56%, #960d0a);
  box-shadow: 0 4px 12px rgba(0,0,0,.34);
  font-size: 9px;
  font-weight: 1000;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 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: linear-gradient(180deg, rgba(240,248,250,.98), rgba(223,238,243,.98));
}

.thr-product .thr-detail {
  display: block;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  color: #355b69;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.28;
  opacity: 0;
  transform: translateY(4px);
  transition: max-height .2s ease, margin-top .2s ease, opacity .16s ease, transform .2s ease;
}

.thr-product:hover .thr-detail,
.thr-product:focus-visible .thr-detail {
  max-height: 3.2em;
  margin-top: 5px;
  opacity: 1;
  transform: translateY(0);
}
.thr-product .thr-price {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 4px;
  background: linear-gradient(135deg, #ff7b32, #e86520);
  color: #04121d;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(255,123,50,.3);
}
.thr-product .thr-price-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.thr-product .thr-price--sale {
  background: linear-gradient(135deg, #e32219, #a9120d);
  box-shadow: 0 2px 8px rgba(227,34,25,.28);
  color: #fff;
}
.thr-product .thr-old-price {
  color: #667a86;
  font-size: 11px;
  font-weight: 900;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
.thr-product .thr-name {
  margin: 0;
  color: #102f43;
  font-size: 12.25px;
  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;
}
.thr-product .thr-sale-meta {
  display: -webkit-box;
  margin-top: 2px;
  color: #8a3a24;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.22;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@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;
  }
  .thr-product .thr-img::before {
    display: none;
  }
  .thr-product .thr-detail {
    transition: 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-old-price { font-size: 9px; }
  .thr-product .thr-sale-badge { bottom: 4px; left: 4px; max-width: calc(100% - 8px); padding: 2px 6px; font-size: 8px; }
  .thr-product .thr-sale-meta { font-size: 9px; -webkit-line-clamp: 2; }
  .thr-product .thr-name { font-size: 11px; line-height: 1.22; -webkit-line-clamp: 2; min-height: 2.44em; }
  .thr-product .thr-detail {
    max-height: 2.6em;
    margin-top: 4px;
    font-size: 8.5px;
    opacity: .88;
    transform: none;
  }
  .thr-product .thr-img::after { display: none; }
}
@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; }
}
