/* Display wording and decorative icons only; no stock or purchasing rules. */
.appvision-availability-message,
.product-miniature .appvision-availability-message,
.product-information .appvision-availability-message {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  color: #555;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}
.product-add-to-cart .appvision-availability-message {
  justify-content: flex-start;
}
.appvision-availability-message > .appvision-availability-icon {
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1;
  margin: 0;
  color: #5f6368;
}
.appvision-availability-message > .appvision-availability-in-stock {
  color: #4cbb6c;
}
.appvision-availability-text {
  min-width: 0;
}
.appvision-availability-call > .appvision-availability-text {
  text-align: left;
}
.appvision-availability-message:not(.appvision-availability-call) {
  color: inherit;
}
.appvision-availability-message:not(.appvision-availability-call) > .appvision-availability-text {
  font-weight: 700;
}

/* Only marked grid cards participate; forms, controls and wording keep their original markup. */
#content-wrapper .appvision-row-aligned-product > .thumbnail-container > .product-right > .product-description,
#content-wrapper .appvision-row-aligned-product > .thumbnail-container > .product-right > .product-bottom,
#content-wrapper .appvision-row-aligned-category > .cat-container > .catlinks_container,
#content-wrapper .appvision-row-aligned-category > .cat-container > .catlinks_container > .sub_categories {
  display: flex;
  flex-direction: column;
}
#content-wrapper .appvision-row-aligned-category > .cat-container > .catlinks_container > .view_more {
  align-self: center;
}
#content-wrapper .appvision-row-offset-slot {
  margin-top: calc(var(--appvision-row-base-margin, 0px) + var(--appvision-row-offset, 0px)) !important;
}

/* Stretch each grid row to its tallest card, keeping theme column widths and content flow. */
#index #content-wrapper :is(#angarfeatured, #angarbest, #angarnew, #angarspecials) > .products,
#content-wrapper #products:not(.product_show_list) #js-product-list > .products {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}
#index #content-wrapper :is(#angarfeatured, #angarbest, #angarnew, #angarspecials) > .products::before,
#index #content-wrapper :is(#angarfeatured, #angarbest, #angarnew, #angarspecials) > .products::after,
#content-wrapper #products:not(.product_show_list) #js-product-list > .products::before,
#content-wrapper #products:not(.product_show_list) #js-product-list > .products::after {
  display: none;
}
#index #content-wrapper :is(#angarfeatured, #angarbest, #angarnew, #angarspecials) > .products > .product-miniature,
#content-wrapper #products:not(.product_show_list) #js-product-list > .products > .product-miniature {
  display: flex;
  flex: 0 0 auto;
}
#index #content-wrapper :is(#angarfeatured, #angarbest, #angarnew, #angarspecials) > .products > .product-miniature > .thumbnail-container,
#content-wrapper #products:not(.product_show_list) #js-product-list > .products > .product-miniature > .thumbnail-container {
  flex: 1 1 auto;
  min-width: 0;
}
/* The theme shows a grid on phones even when the list preference is selected. */
@media (max-width: 480px) {
  #content-wrapper #products #js-product-list > .products {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
  }
  #content-wrapper #products #js-product-list > .products::before,
  #content-wrapper #products #js-product-list > .products::after {
    display: none;
  }
  #content-wrapper #products #js-product-list > .products > .product-miniature {
    display: flex;
    flex: 0 0 auto;
  }
  #content-wrapper #products #js-product-list > .products > .product-miniature > .thumbnail-container {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* This enquiry wording uses a green check; actual stock and purchase rules are unchanged. */
.appvision-availability-message.appvision-availability-call-check {
  color: #000;
  font-weight: 700;
  justify-content: center;
  text-align: center;
}
.appvision-availability-message.appvision-availability-call-check > .appvision-availability-text {
  color: inherit;
  font-weight: 700;
  text-align: center;
}
.appvision-availability-message.appvision-availability-call-check > .appvision-availability-icon {
  color: #4cbb6c;
}

/* Product-description YouTube videos fit phone screens; payment embeds are outside this scope. */
@media (max-width: 767px) {
  #product #description .product-description iframe[src^="https://www.youtube.com/embed/"],
  #product #description .product-description iframe[src^="https://www.youtube-nocookie.com/embed/"] {
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

/* Card availability stays centered in both grid and list action columns. */
.product-miniature .appvision-availability-message {
  justify-content: center;
  text-align: center;
}
.product-miniature .appvision-availability-message > .appvision-availability-text {
  text-align: center;
}
