/**
 * Shared product card — Figma redesign
 * Scoped so locale custom.css rules don't fight the new layout.
 */

.product-card.featured_products_info {
  --pc-radius: 16px;
  --pc-bg: #f2f2f2;
  --pc-body: #ffffff;
  --pc-text: #101828;
  --pc-muted: #4a5565;
  --pc-black: #000000;
  --pc-loading: #6e6e6e;
  --pc-success: #00a63e;
  --pc-oos: #4d4d4d;
  --pc-best-seller: #e21d1d;
  --pc-discount: #24ad34;
  --pc-star: #facc15;

  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 417px;
  margin: 0;
  padding: 0;
  background: var(--pc-bg);
  border-radius: var(--pc-radius);
  overflow: hidden;
  box-shadow: none;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  transition: box-shadow 0.2s ease;
}

.product-card.featured_products_info:hover {
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.08),
    0 4px 6px -4px rgba(0, 0, 0, 0.06);
}

/* ---- Media / image ---- */
.product-card__media {
  position: relative;
  flex: 1 1 auto;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px 0;
  background: var(--pc-bg);
}

.product-card__badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
}

.product-card__badges .prod_tag,
.product-card__badges .custom-acf-badge,
.product-card__badges .product-badge {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: auto;
  min-height: 26px;
  padding: 4px 10px;
  margin: 0;
  border-radius: 999px;
  background: var(--pc-black);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.product-card__badges .product-badge--best-seller {
  background: #d73737;
}

.product-card__badges .product-badge--discount {
  background: var(--pc-discount);
  /* margin-left: auto; */
}

.product-card__badges .product-badge--discount:only-child,
.product-card__badges .product-badge--discount:first-child:last-child {
  margin-left: 0;
}

.product-card__badges .product-badge--free-shipping {
  background: var(--pc-black);
}

.product-card__badges .product-badge--out-of-stock {
  background: var(--pc-oos);
}

.product-card__badges .product-badge img,
.product-card__badges .product-badge__icon {
  display: flex;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  filter: none;
  color: #fff;
}

.product-card__badges .product-badge img {
  width: 14px;
  height: 14px;
  max-width: 14px;
  max-height: 14px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.product-card__badges .product-badge__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.product-card__image.img_box,
.product-card a.img_box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  background: transparent;
  border-radius: 0;
  aspect-ratio: auto;
}

.product-card__image img,
.product-card a.img_box img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  transition: transform 0.35s ease;
}

/* ---- Body ---- */
.product-card__body.featured_products_cont {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex: 0 0 auto;
  margin: 0 10px 10px;
  padding: 0;
  background: var(--pc-body);
  border-radius: 12px;
  overflow: hidden;
  /* min-height: 168px; */
}

.product-card__content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 10px 10px 10px 12px;
  min-width: 0;
}

.product-card__title {
  margin: 0;
  padding: 0;
}

.product-card__title a.featured_products_title,
.product-card .featured_products_cont a.featured_products_title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--pc-text);
  font-family: "Arvo", serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
  margin: 0;
}

.product-card__excerpt,
.product-card .featured_products_cont p.product-card__excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0 0 5px;
  color: var(--pc-muted);
  font-size: 13px;
  line-height: 1.4;
}

.product-card__rating.review_star_box {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
}

.product-card__stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  margin: 0 !important;
  color: var(--pc-star);
}

.product-card .review_star_box span.product-card__stars {
  color: var(--pc-star);
  margin: 0 !important;
  font-size: inherit;
  display: flex;
  align-items: center;
  gap: 2px;
  justify-content: flex-start;
}

.product-card__star--filled,
.product-card .review_star_box svg.fill-current,
.product-card .review_star_box svg.product-card__star--filled {
  color: #facc15 !important;
  stroke: #facc15 !important;
  fill: #facc15 !important;
}

.product-card__star--empty,
.product-card .review_star_box svg.product-card__star--empty {
  color: #d1d5db !important;
  stroke: #d1d5db !important;
  fill: none !important;
}

.product-card__rating-value {
  color: var(--pc-muted);
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  margin: 0 0 0 6px;
}

.product-card .review_star_box span.product-card__rating-value {
  margin-left: 6px;
  color: var(--pc-muted);
}

.product-card__price.price-wrapper {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 0;
}

.product-card__price .price_box {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.product-card__price .price_box ins {
  text-decoration: none;
  color: var(--pc-text);
  font-size: 18px;
  font-weight: 700;
  background: transparent;
}

.product-card__price .price_box del {
  color: #9aa3b2;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
}

/* ---- Cart button (wide = side rail) ---- */
.product-card__cart.prod_add_to_cart {
  flex: 0 0 56px;
  width: 56px;
  margin: 0;
  align-self: stretch;
}

.product-card__cart-button,
.product-card__cart .button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--pc-black);
  color: #fff;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: background-color 0.2s ease;
}

.product-card__cart-button:hover,
.product-card__cart .button:hover {
  background: var(--pc-black);
  color: #fff;
}

.product-card__cart-button--unavailable,
.product-card--out-of-stock .product-card__cart-button {
  background: var(--pc-oos);
}

.product-card__cart-button--unavailable:hover {
  background: #3a3a3a;
}

.product-card__cart-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.product-card__cart-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.product-card__cart-icon--success {
  display: none;
}

.product-card__cart-button .spinner {
  position: relative;
  width: 24px;
  height: 24px;
  top: 6px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  display: none;
}

.product-card__cart-button .spinner div {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: 0 -6px;
}

.product-card__cart-button .spinner span {
  display: block;
  width: 3px;
  height: 3px;
  background: #ffffff;
  border-radius: 50%;
  animation: productCardScaleWave 1s linear infinite;
}

.product-card__cart-button .spinner div:nth-child(1) {
  transform: rotate(0deg);
}
.product-card__cart-button .spinner div:nth-child(2) {
  transform: rotate(45deg);
}
.product-card__cart-button .spinner div:nth-child(3) {
  transform: rotate(90deg);
}
.product-card__cart-button .spinner div:nth-child(4) {
  transform: rotate(135deg);
}
.product-card__cart-button .spinner div:nth-child(5) {
  transform: rotate(180deg);
}
.product-card__cart-button .spinner div:nth-child(6) {
  transform: rotate(225deg);
}
.product-card__cart-button .spinner div:nth-child(7) {
  transform: rotate(270deg);
}
.product-card__cart-button .spinner div:nth-child(8) {
  transform: rotate(315deg);
}

.product-card__cart-button .spinner div:nth-child(1) span {
  animation-delay: 0s;
}
.product-card__cart-button .spinner div:nth-child(2) span {
  animation-delay: 0.125s;
}
.product-card__cart-button .spinner div:nth-child(3) span {
  animation-delay: 0.25s;
}
.product-card__cart-button .spinner div:nth-child(4) span {
  animation-delay: 0.375s;
}
.product-card__cart-button .spinner div:nth-child(5) span {
  animation-delay: 0.5s;
}
.product-card__cart-button .spinner div:nth-child(6) span {
  animation-delay: 0.625s;
}
.product-card__cart-button .spinner div:nth-child(7) span {
  animation-delay: 0.75s;
}
.product-card__cart-button .spinner div:nth-child(8) span {
  animation-delay: 0.875s;
}

@keyframes productCardScaleWave {
  0%,
  100% {
    transform: scale(0.4);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

/* Loading */
.product-card__cart-button.loading,
.product-card a.button.loading,
.woocommerce .product-card a.button.loading {
  background: var(--pc-loading) !important;
  pointer-events: none;
  opacity: 1 !important;
  color: #fff !important;
  padding-right: 0 !important;
}

.product-card__cart-button.loading::after,
.product-card a.button.loading::after,
.woocommerce .product-card a.button.loading::after {
  display: none !important;
  content: none !important;
}

.product-card__cart-button.loading .product-card__cart-icon--idle,
.product-card__cart-button.loading .product-card__cart-icon--success {
  display: none !important;
}

.product-card__cart-button.loading .spinner {
  opacity: 1 !important;
  pointer-events: all;
  visibility: visible !important;
  display: block !important;
}

/* Success */
.product-card__cart-button.is-success,
.product-card a.button.is-success,
.woocommerce .product-card a.button.is-success {
  background: var(--pc-success) !important;
  pointer-events: none;
  opacity: 1 !important;
  color: #fff !important;
}

.product-card__cart-button.is-success .product-card__cart-icon--idle,
.product-card__cart-button.is-success .spinner {
  display: none !important;
  opacity: 0;
  visibility: hidden;
}

.product-card__cart-button.is-success .product-card__cart-icon--success {
  display: flex !important;
}
.product-card__cart-button.is-success .product-card__cart-icon--success svg {
  width: 12px;
  height: 12px;
}

/* Hide WooCommerce "View cart" link on cards */
.product-card .added_to_cart,
.product-list-main
  .featured_products_info
  .prod_add_to_cart
  a.added_to_cart.wc-forward,
.product-listing-page .product-card .added_to_cart {
  display: none !important;
}

/* ---- Shop grid (match previous custom.css breakpoints) ---- */
.product-listing-page ul.products,
.product-listing-page .woocommerce ul.products,
.product-listing-page .container ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.product-listing-page ul.products li.product-card-item,
.product-listing-page ul.products li.product,
.product-listing-page .woocommerce ul.products li.product {
  float: none !important;
  clear: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent;
  border: 0;
  box-shadow: none;
  min-width: 0;
}

.product-listing-page ul.products li.product-card-item .product-card,
.product-listing-page ul.products li.product .product-card {
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 0;
}

.product-list-main .row > [class*="col-"] {
  display: flex;
}

.product-list-main .row > [class*="col-"] > .product-card {
  width: 100%;
}

/* Tablet shop grid — same breakpoint as previous custom.css */
@media only screen and (max-width: 991px) {
  .product-listing-page ul.products,
  .product-listing-page .woocommerce ul.products,
  .product-listing-page .container ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px;
  }
}

/* ---- Narrow / mobile: full-width ATC bar + compact shop cards ---- */
@media only screen and (max-width: 767px) {
  .product-card__badges .custom-acf-badge,
  .product-card__badges .product-badge {
    white-space: normal;
  }
  .product-card.featured_products_info {
    min-height: 0;
  }

  .product-card__media {
    min-height: 160px;
    padding: 36px 12px 12px;
  }

  .product-card__body.featured_products_cont {
    flex-direction: column;
    margin: 0 8px 8px;
  }

  .product-card__content {
    padding: 12px;
  }

  .product-card__cart.prod_add_to_cart {
    flex: 0 0 auto;
    width: 100%;
    height: 48px;
  }

  .product-card__cart-button,
  .product-card__cart .button {
    min-height: 48px;
  }

  .product-listing-page ul.products,
  .product-listing-page .woocommerce ul.products,
  .product-listing-page .container ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px;
  }

  .product-listing-page .product-card.featured_products_info {
    min-height: 0;
    border-radius: 10px;
  }

  .product-listing-page .product-card__media {
    min-height: 120px;
    flex: 0 0 auto;
    padding: 32px 8px 8px;
  }

  /* .product-listing-page .product-card__image img,
  .product-listing-page .product-card a.img_box img {
    max-height: 110px;
  } */

  .product-listing-page .product-card__body.featured_products_cont {
    margin: 0 6px 6px;
  }

  .product-listing-page .product-card__content {
    padding: 8px;
  }

  .product-listing-page .product-card__excerpt {
    display: none;
  }

  .product-listing-page .product-card__badges {
    top: 12px;
    left: 12px;
    right: 8px;
    gap: 4px;
  }

  .product-listing-page .product-card__badges .prod_tag,
  .product-listing-page .product-card__badges .custom-acf-badge,
  .product-listing-page .product-card__badges .product-badge {
    padding: 2px 6px;
    font-size: 10px;
    min-height: 22px;
    height: auto;
    gap: 4px;
  }

  .product-listing-page .product-card__badges .product-badge img,
  .product-listing-page .product-card__badges .custom-acf-badge img {
    max-width: 11px;
    max-height: 11px;
    width: 11px;
    height: 11px;
  }

  .product-listing-page .product-card__cart.prod_add_to_cart {
    height: 40px;
  }

  .product-listing-page .product-card__cart-button,
  .product-listing-page .product-card__cart .button {
    min-height: 40px;
  }
}

@media only screen and (max-width: 575px) {
  .product-card__title a.featured_products_title {
    font-size: 14px;
  }

  .product-card__price .price_box ins {
    font-size: 16px;
  }

  .product-listing-page .product-card__title a.featured_products_title {
    font-size: 13px;
  }

  .product-listing-page .product-card__price .price_box ins {
    font-size: 14px;
  }

  .product-listing-page .product-card__price .price_box del {
    font-size: 11px;
  }

  .product-listing-page .product-card__media {
    min-height: 100px;
    padding: 28px 6px 6px;
  }

  /* .product-listing-page .product-card__image img,
  .product-listing-page .product-card a.img_box img {
    max-height: 90px;
  } */
}

/* Related / owl items: keep card filling the slide */
.related-product .product-card,
.related-product-blog .product-card,
.best-seller .product-card {
  height: 100%;
}
