/* WebsiteBanabo — Tech Store product cards, 2026-10-15.
   Loaded after the existing build; keeps original images and commerce markup. */
.tsp .tsp-product-grid {
  align-items: stretch;
  gap: 18px;
}
.tsp .tsp-product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  border-radius: 16px;
  background: linear-gradient(155deg, #111e32, #0c1728);
  box-shadow: 0 6px 24px #00000014;
}
/* The wrapper owns the ratio; intrinsic image dimensions never size the card. */
.tsp .tsp-product-card > .tsp-product-image {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: auto;
  height: auto;
  min-height: 0;
  aspect-ratio: 1 / 1;
  margin: 8px 8px 0;
  padding: 0;
  overflow: hidden;
  border-radius: 11px;
  background: #0a1323;
  isolation: isolate;
}
.tsp .tsp-product-card > .tsp-product-image > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}
.tsp .tsp-product-card .tsp-image-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 20px;
  color: var(--tsp-muted, #abc0dc);
  font-size: 12px;
  text-align: center;
}
.tsp .tsp-product-card > .tsp-product-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 16px;
}
.tsp .tsp-product-card .tsp-product-info > .tsp-eyebrow {
  margin: 0 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tsp .tsp-product-card .tsp-product-info > h3 {
  margin: 0 0 10px;
  min-height: 2.8em;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.tsp .tsp-product-card .tsp-product-info > h3 > a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: #f7f9ff;
}
.tsp .tsp-product-card .tsp-stock {
  margin: 0 0 14px;
  font-size: 12px;
}
.tsp .tsp-product-card .tsp-product-buy {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 12px;
  margin-top: auto;
  padding-top: 2px;
}
.tsp .tsp-product-card .tsp-product-buy > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 9px;
  min-width: 0;
  min-height: 34px;
}
.tsp .tsp-product-card .tsp-product-buy strong {
  font-size: clamp(20px, 1.65vw, 25px);
  line-height: 1.35;
  letter-spacing: -.02em;
  white-space: normal;
  overflow-wrap: anywhere;
}
.tsp .tsp-product-card .tsp-product-buy del {
  display: inline;
  font-size: 12px;
  color: #95a9c5;
}
.tsp .tsp-product-card .tsp-product-buy > form {
  width: 100%;
  margin: 0;
}
.tsp .tsp-product-card .tsp-product-buy .tsp-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: auto;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.tsp .tsp-product-card .tsp-product-buy .tsp-button .tsp-icon {
  flex: none;
  width: 19px;
  height: 19px;
}
.tsp .tsp-product-card .tsp-product-buy > .tsp-muted {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--tsp-border, #20334e);
  border-radius: 10px;
  font-size: 12px;
}
.tsp .tsp-product-card > .tsp-wishlist-button {
  z-index: 2;
  top: 14px;
  right: 14px;
  margin: 0;
}
.tsp .tsp-product-card .tsp-wishlist-button .tsp-icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #ffffff24;
  border-radius: 50%;
  background: #091221d9;
  color: #f7f9ff;
  box-shadow: 0 2px 8px #00000025;
}
.tsp .tsp-product-card .tsp-wishlist-button .is-saved {
  color: #ff5d85;
}
@media (min-width: 801px) and (max-width: 1100px) {
  .tsp .tsp-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tsp .tsp-product-grid.tsp-list-grid,
  .tsp .tsp-product-grid.tsp-wishlist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .tsp .tsp-product-grid { gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tsp .tsp-product-card .tsp-product-buy strong { font-size: 22px; }
}
@media (max-width: 540px) {
  .tsp .tsp-product-grid { gap: 10px; }
  .tsp .tsp-product-card { border-radius: 12px; }
  .tsp .tsp-product-card > .tsp-product-image { margin: 6px 6px 0; border-radius: 8px; }
  .tsp .tsp-product-card > .tsp-product-info { padding: 12px 10px; }
  .tsp .tsp-product-card .tsp-product-info > h3 { font-size: 13px; margin-bottom: 8px; }
  .tsp .tsp-product-card .tsp-stock { font-size: 11px; margin-bottom: 12px; }
  .tsp .tsp-product-card .tsp-product-buy { gap: 9px; }
  .tsp .tsp-product-card .tsp-product-buy strong { font-size: 20px; }
  .tsp .tsp-product-card .tsp-product-buy .tsp-button { gap: 5px; padding: 10px 6px; font-size: 11px; }
  .tsp .tsp-product-card > .tsp-wishlist-button { top: 9px; right: 9px; }
}
@media (max-width: 340px) {
  .tsp .tsp-product-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .tsp .tsp-product-card:hover { border-color: #4772a5; transform: translateY(-3px); box-shadow: 0 12px 30px #00000030; }
}
