/* Container & title */
.asd-suggested-section {
  margin: 32px 0 10px;
}

.asd-suggested-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 12px;
}

/* Horizontal scrollable row of cards */
.asd-suggested-grid {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 1.5rem;
  margin-bottom: 4px;
  scroll-snap-type: x proximity;

  /* Make the scrollbar visible in Chrome/Edge/Firefox (some OSes hide by default)
     so mouse users still discover that the row is scrollable. */
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 24, 39, 0.35) transparent;
}

.asd-suggested-grid::-webkit-scrollbar {
  height: 6px;
}

.asd-suggested-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.35);
}

.asd-suggested-grid::-webkit-scrollbar-track {
  background: transparent;
}

/* Card */
.asd-suggested-card {
  flex: 0 0 270px;
  max-width: 270px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  min-height: 360px;
}

/* Image */
.asd-suggested-card .thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f3f4f6;
}

.asd-suggested-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Meta */
.asd-suggested-card .meta {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 190px;
  height: 60%;
}

/* Rating row directly under title */
.asd-suggested-card .rating-row {
  display: flex;
  align-items: center;
  margin: 2px 0 2px;
}

.asd-suggested-card .star-rating {
  margin: 0;
}

/* Name / price */
.asd-suggested-card .name {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}

.asd-suggested-card .name a {
  color: #111827;
  text-decoration: none;
}

.asd-suggested-card .name a:hover {
  text-decoration: underline;
}

.asd-suggested-card .price {
  margin-top: 4px;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Button row pinned to bottom of meta area */
.asd-suggested-card .btn-row {
  margin-top: auto;
  padding-top: 12px;
}

/* Base pill button (same height in all states, Chrome-safe) */
.asd-suggested-card .asd-suggested-btn,
.asd-suggested-card .asd-suggested-btn.added,
.asd-suggested-card .asd-suggested-btn.loading,
.asd-suggested-card .asd-suggested-btn.is-adding,
.asd-suggested-card .asd-suggested-btn.is-added,
.asd-suggested-card .button.add_to_cart_button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 100%;
  height: 36px !important;      /* shorter, fixed height */
  max-height: 36px !important;
  padding: 0 1.2rem !important; /* horizontal only */
  border-radius: 999px;
  border: none;
  outline: 0;

  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1 !important;    /* avoid baseline weirdness */

  background: #ff4242;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(248, 113, 113, 0.45);

  transition:
    background 0.15s ease,
    transform 0.08s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease;
}



.asd-suggested-card .asd-suggested-btn:hover {
  background: #ff2b2b;
  transform: translateY(-1px);
  text-decoration: none;
}

.asd-suggested-card .asd-suggested-btn:focus-visible {
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px #ff4242;
}

/* Variant for "View product" */
.asd-suggested-card .asd-suggested-view {
  background: #f3f4f6;
  color: #111827;
  box-shadow: none;
}

.asd-suggested-card .asd-suggested-view:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

/* State styles */
.asd-suggested-card .asd-suggested-btn.is-adding {
  opacity: 0.8;
  cursor: default;
}

.asd-suggested-card .asd-suggested-btn.is-added {
  background: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  cursor: default;
}

.asd-suggested-card .asd-suggested-btn.is-added:hover {
  transform: none;
}

/* Kill Woo's "View cart" link + default underline/button styles in this block */
.asd-suggested-card .added_to_cart {
  display: none !important;
}

.asd-suggested-card .button.add_to_cart_button {
  text-decoration: none !important;
}

/* Tidy mobile */
@media (max-width: 768px) {
  .asd-suggested-card {
    flex-basis: 75%;
    max-width: 75%;
  }
}

/* Load More */
/* Hide extra cards until "Load more" is clicked */
.asd-suggested-card.is-extra {
  display: none;
}

/* Load more button styling */
.asd-suggested-load-more {
  margin-top: 4px;
  padding: 0.45rem 1.4rem;
  border-radius: 999px;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  background: #e5e7eb;
  cursor: pointer;
}

.asd-suggested-load-more:hover {
  background: #d1d5db;
}

/* "Show more" card at the end of the row */
.asd-suggested-more-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  text-align: center;
}

.asd-suggested-more-card .meta {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.asd-suggested-more-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.asd-suggested-more-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #6b7280;
}

/* Reuse base pill style but slightly softer for "Show more" */
.asd-suggested-more-btn {
  background: #f3f4f6;
  color: #111827;
  box-shadow: none;
}

.asd-suggested-more-btn:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

/* Keep suggested row from widening the whole page */
.asd-suggested-section {
  position: relative;
  max-width: 100%;
  overflow-x: hidden; /* anything outside this section doesn't affect page scroll */
}

/* Grid itself should never be wider than the viewport container */
.asd-suggested-grid {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Safety: cards can't be wider than their container */
.asd-suggested-card,
.asd-suggested-more-card {
  max-width: 100%;
}

/* Mobile: keep cards nicely within the viewport */
@media (max-width: 768px) {
  .asd-suggested-card,
  .asd-suggested-more-card {
    flex: 0 0 75%;
    max-width: 75%;
  }
}


/* Pricing/card tidy-up and do not capture vertical touch/page scrolling. */
.asd-suggested-grid{touch-action:pan-y pan-x;overscroll-behavior-x:contain}.asd-suggested-card .price{min-height:62px;display:flex;align-items:flex-start}.asd-suggested-card .meta{height:auto;flex:1}.asd-suggested-card{min-height:392px}.asd-suggested-grid.is-dragging{cursor:grabbing;user-select:none}

/* Unified suggested-product pricing (2.1.12).
 * Keep the amount and tax suffix visually separate and reserve the same
 * vertical space for simple prices, ranges and account-price markup.
 */
.asd-suggested-card .price {
  min-height: 54px;
  display: flex;
  align-items: flex-start;
  line-height: 1.3;
}

.asd-suggested-card .asdpt-unified-price {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.45rem;
  row-gap: 0.15rem;
  width: 100%;
}

.asd-suggested-card .asdpt-unified-price > .woocommerce-Price-amount,
.asd-suggested-card .asdpt-unified-price > .price,
.asd-suggested-card .asdpt-unified-price ins,
.asd-suggested-card .asdpt-unified-price del {
  line-height: 1.3;
}

.asd-suggested-card .asdpt-unified-price .woocommerce-price-suffix,
.asd-suggested-card .asdpt-unified-price .tax_label,
.asd-suggested-card .asdpt-unified-price small.woocommerce-price-suffix {
  display: inline-block;
  margin-left: 0.45rem;
  font-size: 0.78em;
  line-height: 1.2;
  font-weight: 500;
  color: #4b5563;
  white-space: nowrap;
  vertical-align: baseline;
}

/* Account-pricing markup already has its own grid; keep it compact inside cards. */
.asd-suggested-card .asdpt-unified-price .asdpt-role-price {
  width: 100%;
  margin: 0;
}
