/* Novre — Shop Card Components (sitewide)
   -----------------------------------------
   Reusable product-card styles: card container, image, badge, name, price,
   qty stepper, and Add-to-Cart button. Used everywhere .nvs__ classes appear:
     - archive-product.php (shop archive page)
     - front-page.php     (homepage featured products)
     - functions.php      (AJAX load-more render on shop)

   Byte-for-byte the same rules that previously lived duplicated inside
   archive-product.php and front-page.php inline <style> blocks.
   Bump NOVRE_VER in functions.php after editing this file to invalidate
   browser cache. */

/* ── CARD ── */
.nvs__card {
  background: var(--card, #fff);
  border: 1px solid var(--rule, #E8E4DD);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}
.nvs__card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.nvs__card-img {
  display: block;
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg, #F5F2EC);
}
.nvs__card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
}
.nvs__card:hover .nvs__card-img img { transform: scale(1.04); }

/* Badge sits inside .nvs__card-img or .nh-shop__card-img — both use
   position: relative, so absolute positioning here works in both contexts. */
.nvs__badge {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--blue, #1B6FE8);
  color: #fff;
  font-family: var(--font-head, sans-serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 8px;
}
.nvs__badge--oos { background: var(--ink, #111318); }

.nvs__card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.nvs__card-name {
  font-family: var(--font-head, sans-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink, #111318);
  line-height: 1.3;
  text-decoration: none;
  display: block;
}
.nvs__card-name:hover { color: var(--blue, #1B6FE8); }

.nvs__card-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.nvs__price-sale {
  font-family: var(--font-head, sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink, #111318);
}
.nvs__price-reg {
  font-size: 12px;
  color: var(--ink-faint, #aaa);
  font-weight: 400;
}
.nvs__card-price small {
  font-size: 10px;
  color: var(--ink-muted, #666);
  font-weight: 300;
}

/* ── ACTIONS — qty stepper + ATC button on the same row ── */
.nvs__card-actions {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 6px;
  margin-top: auto;
}
.nvs__qty {
  display: flex;
  align-items: center;
  height: 40px;
  border: 1px solid var(--rule, #E8E4DD);
  background: var(--card, #fff);
  transition: border-color 0.15s;
}
.nvs__qty:focus-within { border-color: var(--blue, #1B6FE8); }
.nvs__qty-btn {
  width: 30px;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--ink, #111318);
  font-family: var(--font-head, sans-serif);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s, background 0.15s, transform 0.05s;
}
.nvs__qty-btn:hover { color: var(--blue, #1B6FE8); background: var(--blue-pale, #EBF2FD); }
.nvs__qty-btn:active { transform: scale(0.94); }
.nvs__qty-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--ink, #111318);
  font-family: var(--font-head, sans-serif);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  outline: none;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  cursor: default;
}

.nvs__atc {
  width: 100%;
  height: 40px;
  font-size: 11px;
  letter-spacing: 1px;
  justify-content: center;
  gap: 6px;
  margin-top: auto;
  padding: 0 8px;
}
.nvs__card-actions .nvs__atc { margin-top: 0; }
.nvs__atc:disabled { opacity: 0.5; cursor: not-allowed; }

/* Compact treatment on narrow screens: tighter stepper, icon-only Add button. */
@media (max-width: 480px) {
  .nvs__card-actions { grid-template-columns: 88px 1fr; }
  .nvs__qty-btn { width: 26px; }
  .nvs__atc span { display: none; }
}
