/**
 * Technoshop Product Cards — Price + Action Row V2
 * PRICE left · QV + Cart right · Wishlist stays image top-right
 * Preview presentation only. Technoshop-scoped.
 */

/* Hide leftover full-width orange ATC / legacy action bands */
[data-storefront="technoshop"] .ts-product-card .ts-product-card__atc--full,
[data-storefront="technoshop"] .ts-product-card .ts-product-card__action-row,
[data-storefront="technoshop"] .ts-product-card .ts-product-card__actions--v2,
[data-storefront="technoshop"] .ts-product-card .ts-product-card__actions--v4,
[data-storefront="technoshop"] .ts-product-card .ts-product-card__enquiry {
  display: none !important;
}

/* Card column rhythm — push price/action row to bottom */
[data-storefront="technoshop"] .ts-product-card {
  display: flex;
  flex-direction: column;
}

[data-storefront="technoshop"] .ts-product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: 0.85rem;
}

/* Image toolbar: wishlist only (no floating vertical QV/cart stack) */
[data-storefront="technoshop"] .ts-product-card__toolbar {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 3;
}

[data-storefront="technoshop"] .ts-product-card__wishlist-form {
  margin: 0;
}

/* Footer = one coherent PRICE + ACTIONS row
   Must beat Vite .ts-product-card--v2 { flex-direction: column } */
[data-storefront="technoshop"] .ts-product-card__footer,
[data-storefront="technoshop"] .ts-product-card--v2 .ts-product-card__footer,
[data-storefront="technoshop"] .ts-product-card--v4 .ts-product-card__footer {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.45rem 0.55rem !important;
  margin-top: auto !important;
  padding-top: 0.35rem !important;
  width: 100%;
  min-width: 0;
}

[data-storefront="technoshop"] .ts-product-card__price-row,
[data-storefront="technoshop"] .ts-product-card--v2 .ts-product-card__price-row,
[data-storefront="technoshop"] .ts-product-card--v4 .ts-product-card__price-row {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  min-height: 0 !important;
  gap: 0.1rem;
}

[data-storefront="technoshop"] .ts-product-card__price-block {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.45rem;
  min-width: 0;
}

[data-storefront="technoshop"] .ts-product-card__footer-actions {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  align-self: center;
}

/* Shared tool chrome — secondary to price */
[data-storefront="technoshop"] .ts-product-card__tool {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  background: #fff;
  color: var(--ts-navy-deep, #062a63);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

[data-storefront="technoshop"] .ts-product-card__tool:hover,
[data-storefront="technoshop"] .ts-product-card__tool:focus-visible {
  color: var(--ts-blue, #0755c9);
  border-color: #93c5fd;
  background: #f0f7ff;
  outline: none;
}

[data-storefront="technoshop"] .ts-product-card__tool:focus-visible {
  box-shadow: 0 0 0 3px rgba(7, 85, 201, 0.2);
}

/* Wishlist always visible on image */
[data-storefront="technoshop"] .ts-product-card__tool--wishlist {
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

[data-storefront="technoshop"] .ts-product-card__tool--wishlist.is-active {
  color: var(--ts-accent, #ff641e);
  border-color: rgba(255, 100, 30, 0.35);
  background: #fff8f4;
}

/* Footer QV / cart — always visible on desktop; no layout-shifting reveal */
[data-storefront="technoshop"] .ts-product-card__footer-actions .ts-product-card__tool--qv,
[data-storefront="technoshop"] .ts-product-card__footer-actions .ts-product-card__tool--atc {
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
}

[data-storefront="technoshop"] .ts-product-card__footer-actions .ts-product-card__tool--atc:hover,
[data-storefront="technoshop"] .ts-product-card__footer-actions .ts-product-card__tool--atc:focus-visible {
  color: var(--ts-accent, #ff641e);
  border-color: rgba(255, 100, 30, 0.4);
  background: #fff8f4;
}

[data-storefront="technoshop"] .ts-product-card__footer-actions .ts-product-card__tool--atc.is-loading,
[data-storefront="technoshop"] .ts-product-card__footer-actions .ts-product-card__tool--atc[aria-busy="true"] {
  opacity: 0.7 !important;
  cursor: wait;
}

/* Kill any leftover hover-slide from older card CSS (QV/cart no longer in toolbar) */
[data-storefront="technoshop"] .ts-product-card:hover .ts-product-card__tool--qv,
[data-storefront="technoshop"] .ts-product-card:hover .ts-product-card__tool--atc,
[data-storefront="technoshop"] .ts-product-card:focus-within .ts-product-card__tool--qv,
[data-storefront="technoshop"] .ts-product-card:focus-within .ts-product-card__tool--atc {
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
}

/* Desktop sizing */
@media (min-width: 1024px) {
  [data-storefront="technoshop"] .ts-product-card__footer-actions .ts-product-card__tool {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
}

/* Tablet: keep QV + cart when width allows */
@media (min-width: 768px) and (max-width: 1023.98px) {
  [data-storefront="technoshop"] .ts-product-card__footer-actions .ts-product-card__tool {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }
}

/* Mobile: price left + cart right; omit QV (card already links to PDP) */
@media (max-width: 767.98px) {
  [data-storefront="technoshop"] .ts-product-card__footer-actions .ts-product-card__tool--qv {
    display: none !important;
  }

  [data-storefront="technoshop"] .ts-product-card__footer-actions .ts-product-card__tool {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  [data-storefront="technoshop"] .ts-product-card__toolbar {
    top: 0.4rem;
    right: 0.4rem;
  }
}

/* Rail / homepage / compact: same hierarchy, slightly tighter */
[data-storefront="technoshop"] .ts-product-card--rail .ts-product-card__footer-actions,
[data-storefront="technoshop"] .ts-product-card--homepage .ts-product-card__footer-actions,
[data-storefront="technoshop"] .ts-product-card--compact .ts-product-card__footer-actions {
  gap: 0.35rem;
}

[data-storefront="technoshop"] .ts-product-card--rail .ts-product-card__footer-actions .ts-product-card__tool,
[data-storefront="technoshop"] .ts-product-card--homepage .ts-product-card__footer-actions .ts-product-card__tool,
[data-storefront="technoshop"] .ts-product-card--compact .ts-product-card__footer-actions .ts-product-card__tool {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
}

/* Narrow rail cards: preserve price; drop QV before crushing price */
@media (max-width: 1023.98px) {
  [data-storefront="technoshop"] .ts-product-card--rail .ts-product-card__footer-actions .ts-product-card__tool--qv,
  [data-storefront="technoshop"] .ts-product-card--homepage .ts-product-card__footer-actions .ts-product-card__tool--qv {
    display: none !important;
  }
}

/* Title clamp — do not let long titles push the price/action row */
[data-storefront="technoshop"] .ts-product-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* Restrained card hover — no lift / scale / layout shift */
[data-storefront="technoshop"] .ts-product-card:hover {
  transform: none;
}
