  /* ===================================================================
     Product card — brought in line with the cart / login / register /
     search visual language: soft white card, 16px radius, subtle
     border + shadow that lifts on hover, 12px media radius, pill
     badges, uppercase micro-labels, accent-colored primary action.
     Scoped with a cx- prefix; kept alongside the snippet like the
     theme's other cx- components. The legacy `product-card` class is
     kept on the root element for backward compatibility with any
     page-level overrides (e.g. the search results grid). No cart
     logic, routes, or fields were changed — styling only.
     =================================================================== */

  .cx-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom:16px;
    box-sizing: border-box;
    box-shadow: none;
    cursor: pointer;
    transition: border-color 0.15s ease;
  }

  .cx-product-card:hover {
    border-color: #000;
  }

  .cx-product-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
  }

  .cx-product-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 0;
    overflow: hidden;
    background: #f5f5f5;
  }

  .cx-product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
  }

  .cx-product-card:hover .cx-product-card__media img {
    transform: scale(1.05);
  }

  /* Secondary hover image: stacked on top of the primary image, hidden
     until the card is hovered. Only rendered when the product has a
     second image (see js-card-image-alt below). */
  .cx-product-card__media img.js-card-image-alt {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
  }

  .cx-product-card:hover .cx-product-card__media img.js-card-image-alt {
    opacity: 1;
  }

  .cx-product-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: color-mix(in srgb, var(--pc-accent) 45%, #999);
  }

  .cx-product-card__badge {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #555;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.55rem;
    border-radius: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  }

  .cx-product-card__badge--low {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
  }

  .cx-product-card__wishlist {
    position: absolute;
    top: 0.9rem;
    inset-inline-end: 0.9rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #000000;
    cursor: pointer;
    box-shadow: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
  }

  .cx-product-card__wishlist:hover {
    opacity: 0.6;
    transform: scale(1.06);
  }

  .cx-product-card__wishlist svg {
    width: 1.2rem;
    height: 1.2rem;
  }

  .cx-product-card__title {
    margin: 0.9rem 0 0.35rem;
    padding: 0 0.75rem;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: #000000;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
  }

  .cx-product-card__link:hover .cx-product-card__title {
    color: #000000;
  }

  .cx-product-card__price-row {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin: 0 0 0.3rem;
    padding: 0 0.75rem;
  }

  .cx-product-card__price-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #999;
  }

  .cx-product-card__price {
    font-size: 13px;
    font-weight: 700;
    color: #000000;
  }

  .cx-product-card__variant {
    display: block;
    margin: -0.15rem 0 0.3rem;
    padding: 0 0.75rem;
    font-size: 13px;
    color: #767677;
  }

  .cx-product-card__meta {
    display: block;
    margin: 0 0 0.15rem;
    padding: 0 0.75rem;
    font-size: 13px;
    color: #767677;
  }

  .cx-product-card__meta--last {
    padding-bottom: 0.9rem;
  }

  .cx-product-card__price-row:last-child {
    padding-bottom: 0.9rem;
  }

  /* Colour-swatch matrix: hidden until the card is hovered, then slides
     up over the bottom of the media area. Mouse/hover only by design —
     the "N Colours" text meta stays visible at all times as the
     touch-friendly fallback. */
  .cx-product-card__swatches {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 55%, rgba(255, 255, 255, 0));
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .cx-product-card:hover .cx-product-card__swatches {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .cx-product-card__swatch {
    flex: 0 0 auto;
    width: 1.6rem;
    height: 1.6rem;
    padding: 0;
    border-radius: 0;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background-color: #eee;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }

  .cx-product-card__swatch:hover {
    border-color: #000;
  }

  .cx-product-card__swatch.is-active {
    border-color: #000;
    box-shadow: 0 0 0 1px #000;
  }

  .cx-product-card__swatch-more {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    font-size: 10px;
    font-weight: 700;
    color: #555;
  }

  .cx-product-card__flag {
    display: block;
    margin: 0.35rem 0 0;
    padding: 0 0.75rem;
    font-size: 13px;
    font-weight: 700;
    color: #000000;
  }

  .cx-product-card__stock {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0.15rem 0 0;
    padding: 0 0.75rem;
    font-size: 12px;
    font-weight: 600;
    color: #b3261e;
  }

  @media (max-width: 480px) {
    .cx-product-card__title {
      font-size: 12px;
      margin: 0.65rem 0 0.3rem;
    }

    .cx-product-card__price {
      font-size: 13px;
    }
  }

  /* ---- Add to cart footer: black CTA, matching the theme's other
     primary actions (search submit, wishlist-empty button). Only
     rendered when the product is available and show_add_to_cart isn't
     explicitly hidden by the section's schema toggle. ---- */
  .cx-product-card__footer {
    margin-top: auto;
    padding: 0 0.75rem 0.9rem;
  }

  .cx-product-card__add-form {
    margin: 0;
  }

  .cx-product-card__add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 0;
    border-radius: 0;
    background: #000;
    color: #fff;
    font-family: "Archivo", sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.65rem 1rem;
    cursor: pointer;
    transition: opacity 0.15s ease;
  }

  .cx-product-card__add-btn:hover {
    opacity: 0.85;
  }

  /* ===================================================================
     List view — merchant-selectable per section (view_type: 'list').
     Flips the card to a horizontal row: a small square thumbnail on
     the left, a content column (title/variant/price/add-to-cart) on
     the right. Pure modifier on the same markup used for grid mode, so
     every existing hook (swatches, wishlist button, add-to-cart form)
     keeps working unchanged.
     =================================================================== */
  .cx-product-card--list {
    flex-direction: row;
    align-items: stretch;
  }

  .cx-product-card--list > .cx-product-card__link {
    flex: 0 0 110px;
    width: 110px;
  }

  .cx-product-card--list .cx-product-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .cx-product-card--list .cx-product-card__title {
    margin-top: 0.9rem;
    -webkit-line-clamp: 1;
    min-height: 0;
  }

  .cx-product-card--list .cx-product-card__footer {
    margin-top: 0.5rem;
    padding: 0 0.75rem 0.9rem;
  }

  @media (max-width: 480px) {
    .cx-product-card--list > .cx-product-card__link {
      flex: 0 0 84px;
      width: 84px;
    }

    .cx-product-card--list .cx-product-card__title {
      margin-top: 0.65rem;
    }
  }

  /* ===================================================================
     Loris look: warm beige panel, rounded image, NEW / -% tags, notes
     line, was-price, black rounded add-to-cart with a cart icon.
     =================================================================== */
  .cx-product-card {
    background: #eee7da;
    border: 1px solid #e3dac9;
    border-radius: 10px;
    padding: 0.6rem;
    margin-bottom: 0;
  }
  .cx-product-card:hover { border-color: #d3c7b1; }

  .cx-product-card__media { border-radius: 4px; background: #f1eadf; }

  .cx-product-card__badges {
    position: absolute;
    top: 0.45rem;
    inset-inline-start: 0.45rem;
    z-index: 1;
    display: flex;
    gap: 0.3rem;
  }
  .cx-product-card__tag {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1;
    padding: 0.25rem 0.4rem;
    border-radius: 2px;
  }
  .cx-product-card__tag--new { background: #111; color: #fff; }
  .cx-product-card__tag--off { background: #c9a36a; color: #111; }

  .cx-product-card__wishlist {
    top: 1rem;
    inset-inline-end: 1rem;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: #fff;
    color: #111;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  }
  .cx-product-card__wishlist svg { width: 0.7rem; height: 0.7rem; }

  .cx-product-card__title {
    margin: 0.7rem 0 0.15rem;
    padding: 0.1rem 0.1rem 0;
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    min-height: 0;
    -webkit-line-clamp: 1;
  }
  .cx-product-card__notes {
    margin: 0 0 0.45rem;
    padding: 0 0.1rem;
    font-size: 10.5px;
    color: #7a7468;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .cx-product-card__price-row,
  .cx-product-card__variant,
  .cx-product-card__meta,
  .cx-product-card__stock { padding-inline: 0.1rem; }
  .cx-product-card__price-row { align-items: baseline; gap: 0.4rem; }
  .cx-product-card__price { font-size: 12px; font-weight: 700; color: #111; }
  .cx-product-card__was { font-size: 10px; color: #8d877b; text-decoration: line-through; }
  .cx-product-card__price-row:last-child { padding-bottom: 0.6rem; }

  .cx-product-card__footer { padding: 0.35rem 0 0; }
  .cx-product-card__add-btn {
    gap: 0.4rem;
    border-radius: 4px;
    background: #111;
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.02em;
    padding: 0.6rem 0.75rem;
  }
  .cx-product-card__add-btn svg { flex-shrink: 0; }
  .cx-product-card__add-btn--off,
  .cx-product-card__add-btn--off:hover {
    background: #ddd6c8;
    color: #8f887a;
    cursor: not-allowed;
    opacity: 1;
  }
