/* Separate homepage settings from catalogue/product loops.
   The parent archive supplies these same variables locally on its main element. */
#page.az-site :is(.az-shop-grid, .az-product-grid, ul.products) {
  grid-template-columns: repeat(var(--az-shop-columns-desktop, 4), minmax(0, 1fr));
}
/* Product suggestions are standalone sections, without the archive's sidebar track. */
#page.az-site .az-product-related > .az-shop-grid {
  display: grid;
  grid-column: auto;
  min-width: 0;
  align-items: stretch;
}
/* Panda product cards: image, left-aligned title/price, one split purchase control.
   The original WooCommerce anchor keeps AJAX, product type and availability behavior.
   Product details remain available through the image and title links. */
#page.az-child-panda-site :is(.az-product-card.az-shop-card, .az-child-panda__product-card) {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--az-color-surface, #fff);
  box-shadow: none;
  text-align: left;
  transform: none;
}
#page.az-child-panda-site .az-product-card .az-product-card__image {
  aspect-ratio: var(--az-product-image-ratio, 1);
  border-radius: 0;
  background: var(--az-color-surface, #fff);
}
#page.az-child-panda-site .az-product-card .az-product-card__image img,
#page.az-child-panda-site .az-child-panda__product-card img {
  width: 100%;
  height: auto;
  aspect-ratio: var(--az-product-image-ratio, 1);
  object-fit: var(--az-child-product-image-fit, contain);
  transform: none;
}
#page.az-child-panda-site .az-product-card .az-product-card__image::after { display: none; }
#page.az-child-panda-site .az-product-card .az-product-card__body {
  flex: 1 1 auto;
  gap: 16px;
  padding: 22px 0 0;
}
#page.az-child-panda-site .az-child-panda__product-card > a { display: flex; flex-direction: column; flex: 1 1 auto; }
#page.az-child-panda-site :is(.az-product-card__title, .az-child-panda__product-card h3) {
  display: -webkit-box;
  min-height: 2.8em;
  margin: 0;
  overflow: hidden;
  color: var(--az-color-muted, #596e85);
  font-family: var(--az-font-heading, sans-serif);
  font-size: calc(var(--az-body-size, 16px) * 1.05);
  font-weight: var(--az-font-weight, 400);
  line-height: 1.4;
  letter-spacing: var(--az-heading-letter-spacing, 0);
  text-align: left;
  text-wrap: initial;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
#page.az-child-panda-site .az-child-panda__product-card h3 { margin-block: 22px 16px; }
#page.az-child-panda-site .az-product-card__title a { color: inherit; }
#page.az-child-panda-site :is(.az-product-card__price.az-price, .az-child-panda__contact-price) {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  margin: auto 0 0;
  color: var(--az-color-error, #d32f2f);
  font-size: var(--az-body-size, 16px);
  font-weight: 600;
  line-height: var(--az-body-line-height, 1.55);
}
#page.az-child-panda-site .az-product-card__price ins { color: inherit; }
#page.az-child-panda-site .az-product-card .az-product-card__actions,
#page.az-child-panda-site .az-product-card .az-product-card__actions:has(> .az-child-catalog-details) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 0;
}
#page.az-child-panda-site .az-product-card .az-child-catalog-details { display: none; }
#page.az-child-panda-site .az-product-card .az-product-card__actions > .button {
  position: relative;
  display: flex;
  grid-column: 1;
  grid-row: 1;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  --az-child-cart-icon-width: 38px;
  padding: 8px 10px 8px calc(var(--az-child-cart-icon-width) + 10px);
  border: 1px solid var(--az-color-primary, #00a5df);
  border-radius: var(--az-radius-sm, 6px);
  background: var(--az-color-primary, #00a5df);
  color: #fff;
  font-family: var(--az-font-main, sans-serif);
  font-size: calc(var(--az-body-size, 16px) * .8125);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
  text-decoration: none;
  white-space: normal;
  box-shadow: none;
  overflow: hidden;
  transition: background-color .16s ease, border-color .16s ease;
}
#page.az-child-panda-site .az-product-card .az-product-card__actions > .button::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--az-child-cart-icon-width);
  box-sizing: border-box;
  border-radius: calc(var(--az-radius-sm, 6px) - 1px) 0 0 calc(var(--az-radius-sm, 6px) - 1px);
  border-right: 1px solid var(--az-color-primary, #00a5df);
  background: color-mix(in srgb, var(--az-color-primary, #00a5df) 7%, var(--az-color-surface, #fff)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230b1618'%3E%3Cpath d='M2 3h3l1 3h15l-2 9H8L5 5H2zm7 14a2 2 0 1 0 0 4 2 2 0 0 0 0-4m9 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}
#page.az-child-panda-site .az-product-card .az-product-card__actions > .button:hover { background: var(--az-color-primary-dark, #008dbd); }
#page.az-child-panda-site .az-product-card .az-product-card__actions > .button:focus-visible { outline: 2px solid var(--az-color-primary, #00a5df); outline-offset: 3px; }
#page.az-child-panda-site .az-product-card .az-product-card__actions > .added_to_cart { grid-column: 1; grid-row: 2; font-size: calc(var(--az-body-size, 16px) * .8125); }
@media (max-width: 960px) {
  #page.az-site :is(.az-shop-grid, .az-product-grid, ul.products) {
    grid-template-columns: repeat(var(--az-shop-columns-tablet, 3), minmax(0, 1fr));
  }
}
@media (max-width: 782px) {
  #page.az-site :is(.az-shop-grid, .az-product-grid, ul.products) {
    grid-template-columns: repeat(var(--az-shop-columns-mobile, 2), minmax(0, 1fr));
  }
}

@media (max-width: 782px) {
  #page.az-child-panda-site .az-product-card .az-product-card__actions > .button {
    --az-child-cart-icon-width: 32px;
    min-height: 44px;
    padding-block: 7px;
    padding-inline-end: 7px;
    padding-inline-start: calc(var(--az-child-cart-icon-width) + 7px);
    font-size: calc(var(--az-body-size, 16px) * .75);
  }
}
@media (prefers-reduced-motion: reduce) {
  #page.az-child-panda-site .az-product-card .az-product-card__actions > .button { transition: none; }
}
