/* ==========================================================================
   Akeso product cards
   The card row shared by the product page "You might also like" section and
   the empty cart's best sellers (markup: php/front-end/product-cards.php).
   Loaded on product pages and the cart (php/enqueue.php), after the tokens
   each page's stylesheet sets (--akeso-ink, --akeso-faint and so on). Rules
   that need to beat Bridge's paragraph and heading styles keep the
   page-scoped specificity the product page used, now for both pages.
   ========================================================================== */

body:is(.single-product, .woocommerce-cart) .akeso-card {
  font-size: inherit !important;
}

body:is(.single-product, .woocommerce-cart) .akeso-cards {
  margin-bottom: 0 !important;
}

.akeso-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Card: same as the /socks/ shop card. The Reviews.io snippet and the
   GTM4WP data come from woocommerce_after_shop_loop_item at the end of the
   card; order puts the stars under the title. */
.akeso-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 0;
  font-family: "Roboto", sans-serif;
}

.akeso-card__image {
  order: 1;
  display: block;
  aspect-ratio: 1;
  margin: 0 0 16px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--akeso-bg);
}

.akeso-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.akeso-card:hover .akeso-card__image img {
  transform: scale(1.03);
}

:is(.single-product, .woocommerce-cart) .akeso-card p.akeso-card__meta {
  order: 2;
  margin: 0 0 6px !important;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--akeso-muted);
}

:is(.single-product, .woocommerce-cart) .akeso-card .akeso-card__title {
  order: 3;
  margin: 0 0 6px;
  font-family: "Roboto", sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 0;
  text-transform: none;
}

:is(.single-product, .woocommerce-cart) .akeso-card .akeso-card__title a {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--akeso-ink);
  text-decoration: none;
}

:is(.single-product, .woocommerce-cart) .akeso-card .akeso-card__title a:hover {
  color: var(--akeso-red);
}

.akeso-card .ruk_rating_snippet {
  order: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
}

.akeso-card .ruk_rating_snippet:empty {
  display: none;
}

.akeso-card .ruk_rating_snippet br {
  display: none;
}

:is(.single-product, .woocommerce-cart) .akeso-card .ruk_rating_snippet i {
  font-size: 14px !important;
  color: var(--akeso-red) !important;
}

:is(.single-product, .woocommerce-cart) .akeso-card .ruk_rating_snippet span {
  font-size: 13px !important;
  color: var(--akeso-muted);
}

:is(.single-product, .woocommerce-cart) .akeso-card p.akeso-card__best {
  order: 5;
  margin: 0 0 8px !important;
  font-size: 14px;
  line-height: 20px;
  color: var(--akeso-body);
}

:is(.single-product, .woocommerce-cart) .akeso-card p.akeso-card__price {
  order: 6;
  margin: 0 !important;
  font-size: 15px;
  font-weight: 700;
  line-height: 20px;
  color: var(--akeso-ink);
}

.akeso-card__price span.amount,
.akeso-card__price ins {
  font-weight: 700;
  color: var(--akeso-ink);
  text-decoration: none;
}

.akeso-card__price del,
.akeso-card__price del span.amount {
  font-weight: 400;
  color: var(--akeso-faint);
}

.akeso-card .akeso-bundle-pill {
  margin-left: 6px;
}

.akeso-card .xoo-wl-btn-container {
  display: none;
}

@media only screen and (max-width: 767px) {
  /* horizontal scroll row of 220px cards, running to the screen edge */
  .akeso-cards {
    display: flex;
    gap: 12px;
    margin-right: calc(-1 * var(--akeso-gutter));
    padding-right: var(--akeso-gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .akeso-cards::-webkit-scrollbar {
    display: none;
  }

  .akeso-card {
    flex: 0 0 220px;
    scroll-snap-align: start;
  }

  :is(.single-product, .woocommerce-cart) .akeso-card .akeso-card__title {
    font-size: 17px;
    line-height: 22px;
  }
}
