@keyframes cardActionAni {
  0% {
    opacity: 0;
    transform: translateY(0);
  }

  100% {
    opacity: 1;
    transform: translateY(-50%);
  }
}

.card {
  --tag-pc-gap: 8px;
  --tag-mobile-gap: 8px;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  z-index: 0;
}

.card-wrapper {
  color: inherit;
  height: 100%;
  position: relative;
  text-decoration: none;
}

.card-wrapper .full-unstyled-link {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 1;
}

.card-main {
  position: relative;
  flex: 1 0 0;
}

.card .card__inner--wrapper {
  background-color: rgba(var(--color-image-background));
  padding: var(--card-image-padding, 0px);
}

.card.collection-card-wrapper .card__inner .card__media {
  border-radius: calc(
    var(--collection-card-border-radius) -
      var(--collection-card-border-thickness)
  );
}

.card.collection-card-wrapper .card__inner.card__inner--round .card__media {
  border-radius: 50%;
}

.card.collection-card-wrapper.collection-card-style-card {
  background-color: rgba(var(--color-card-background));
}

.card.collection-card-wrapper.collection-card-style-card .card__inner--wrapper {
  background-color: transparent;
}

.card.collection-card-wrapper.collection-card-style-card
  .card__inner--wrapper
  .card__inner.card__inner--round {
  margin: 8px;
}

@media (max-width: 959px) {
  .card.collection-card-wrapper.collection-card-style-card
    .card__inner--wrapper
    .card__inner.card__inner--round {
    margin: 4px;
  }
}

.card.collection-card-wrapper.collection-card-style-card
  .card__inner--wrapper
  .card__inner:not(.card__inner--round)
  .card__media {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.card.collection-card-wrapper.collection-card-style-card .card__content {
  padding: 8px;
  margin-top: 0;
}

@media (max-width: 959px) {
  .card.collection-card-wrapper.collection-card-style-card .card__content {
    padding-bottom: 4px;
  }
}

.card.collection-card-wrapper.collection-card-style-card
  .card__content.collection__item__name {
  color: rgba(var(--color-card-text));
}

.card.product-card-wrapper .card__inner--wrapper.card__visible {
  overflow: visible;
}

.card.product-card-wrapper .card__inner--wrapper .card__inner .card__media {
  border-radius: calc(
    var(--product-card-border-radius) - var(--product-card-border-thickness)
  );
}

.card.product-card-wrapper
  .card__inner--wrapper
  .card__inner.card__inner--round
  .card__media {
  border-radius: 50%;
}

.card.product-card-wrapper.product-card-style-card {
  background-color: rgba(var(--color-card-background));
}

.card.product-card-wrapper.product-card-style-card .card__inner--wrapper {
  background-color: transparent;
}

.card.product-card-wrapper.product-card-style-card
  .card__inner--wrapper
  .card__inner.card__inner--round {
  margin: 8px;
}

@media (max-width: 959px) {
  .card.product-card-wrapper.product-card-style-card
    .card__inner--wrapper
    .card__inner.card__inner--round {
    margin: 4px;
  }
}

.card.product-card-wrapper.product-card-style-card
  .card__inner--wrapper
  .card__inner:not(.card__inner--round)
  .card__media {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.card.product-card-wrapper.product-card-style-card .card__content {
  padding: 0 24px;
}

@media (max-width: 959px) {
  .card.product-card-wrapper.product-card-style-card .card__content {
    padding: 0 8px;
  }
}

.card.product-card-wrapper.product-card-style-card
  .card__content
  .product__title {
  color: rgba(var(--color-card-text));
}

.card.product-card-wrapper.product-card-style-card .card__bottom-actions,
.card.product-card-wrapper.product-card-style-card
  .card__bottom-actions--empty-placeholder {
  margin: 0 24px 24px 24px;
}

@media (max-width: 959px) {
  .card.product-card-wrapper.product-card-style-card .card__bottom-actions,
  .card.product-card-wrapper.product-card-style-card
    .card__bottom-actions--empty-placeholder {
    margin: 0 8px 8px 8px;
  }
}

.card .card__media {
  position: absolute;
  bottom: 0;
  top: 0;
  right: 0;
  left: 0;
  overflow: hidden;
  z-index: 2;
}

.card .card__media > img {
  height: 100%;
  object-fit: var(--image-fill-type, cover);
  object-position: var(--image-object-position, center center);
  width: 100%;
  position: absolute;
  top: 50%;
  bottom: 0;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  transition: opacity var(--duration-long) ease;
  transition-property: opacity, transform;
  border-radius: var(--media-border-radius-outset);
}

.card .card__media > .placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card .card__media.mobile--media--hover-effect > img + img,
.card .card__media.media--hover-effect > img + img {
  opacity: 0;
}

.card .card__badge:not(:empty) {
  z-index: 2;
  position: absolute;
  padding: 4px 8px;
  background-color: blue;
  color: rgb(var(--card-badge-text-color, var(--color-discount-tag-text)));
}

.card .card__badge:not(:empty).card__badge--mini {
  padding: 2px 4px;
}

.card .card__badge.sold-out-message {
  --card-badge-text-color: var(--color-page-background);
  --card-badge-bg: var(--color-text);
}

.card .card__badge.left_top {
  top: var(--tag-pc-gap);
  left: var(--tag-pc-gap);
}

.card .card__badge.left_bottom {
  bottom: var(--tag-pc-gap);
  left: var(--tag-pc-gap);

}

.card .card__badge.right_top {
  top: var(--tag-pc-gap);
  right: var(--tag-pc-gap);
}

.card .card__badge.right_bottom {
  bottom: var(--tag-pc-gap);
  right: var(--tag-pc-gap);
}

@media (max-width: 959px) {
  .card .card__badge.left_top {
    top: var(--tag-mobile-gap);
    left: var(--tag-mobile-gap);
  }
  .card .card__badge.left_bottom {
    bottom: var(--tag-mobile-gap);
    left: var(--tag-mobile-gap);
  }
  .card .card__badge.right_top {
    top: var(--tag-mobile-gap);
    right: var(--tag-mobile-gap);
  }
  .card .card__badge.right_bottom {
    bottom: var(--tag-mobile-gap);
    right: var(--tag-mobile-gap);
  }
}

.card .card__content {
  margin-top: 20px;
  position: relative;
}

.card .card__content .product__title {
  margin: 0;
  margin-bottom: 12px;
  text-align: var(--product-card-content-align);
}

@media (max-width: 959px) {
  .card .card__content {
    margin-top: 10px;
  }
  .card .card__content .product__title {
    margin-bottom: 6px;
  }
}

.card .card__content .card__content-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.card .card__content .card__content-bottom .price__sale {
  justify-content: unset;
}

@media (min-width: 960px) {
  .card .card__content .card__content-bottom {
    justify-content: center;
  }
}

.card .card__content .card__content-bottom-center {
  justify-content: center;
}

.card .card__content .card__content-bottom-left {
  justify-content: space-between;
}

.card .card__button {
  position: absolute;
  width: 100%;
  text-align: center;
  left: 0;
  bottom: calc(100% + 20px);
  white-space: nowrap;
  overflow: hidden;
  padding: 20px;
  border-bottom-left-radius: var(--product-card-border-radius);
  border-bottom-right-radius: var(--product-card-border-radius);
}

.card .card__button.is-expanded {
  padding: 0;
}

.card .card__button.is-expanded .card__button-inner {
  padding: 20px;
  background: rgba(255, 255, 255, 0.7);
}

.card .card__button .card__button-inner {
  width: 100%;
  display: block;
}

.card .card__button .card__button-inner {
  width: 100%;
  transform: translateY(100%);
  opacity: 0;
  transition: color var(--duration-long) ease,
    transform var(--duration-default) ease, opacity var(--duration-default) ease;
  will-change: transform;
}

.card .quick-add {
  position: absolute;
  right: 0;
  padding: 15px;
  z-index: 2;
  bottom: 0;
  border-radius: 12px;
}

@media (max-width: 959px) {
  .card .quick-add {
    padding: 10px;
  }
}

.card .quick-add.quick-add--tiled {
  position: unset;
  width: 32px;
  height: 24px;
}

@media (max-width: 959px) {
  .card .quick-add.quick-add--tiled {
    padding: 0 4px;
  }
}

.card .quick-add.quick-add--tiled .quick-add-icon__opener {
  border: none;
  width: 24px;
  height: 24px;
}

.card .quick-add.quick-add-button {
  position: unset;
  padding: 0;
}

.card:hover .card__center-actions {
  animation: cardActionAni 0.4s ease both;
}

.card .card__center-actions {
  --padding-inline: 20px;
  display: block;
  position: absolute;
  top: 50%;
  left: var(--padding-inline);
  width: calc(100% - 2 * var(--padding-inline));
  z-index: 2;
  opacity: 0;
}

.card .card__bottom-actions > * {
  display: block;
  margin-top: 10px;
}

.card .quick-add-icon__opener {
  border-radius: 16px;
  width: 32px;
  height: 32px;
  color: rgb(var(--color-text));
  background-color: rgb(var(--color-page-background));
  border: 1px solid rgba(var(--color-text), 0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.card .quick-add-icon__opener i {
  line-height: 0;
}

.card .quick-add-icon__opener .icon-zoom {
  width: 18px;
  height: 18px;
}

.card .quick-add-icon__opener.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.card .quick-add-icon__opener.loading > .loading-hidden,
.card .color-swatch-radio__remain.loading > .loading-hidden {
  display: none;
}

@media (min-width: 960px) {
  .card__media.media--hover-effect:hover > img:first-child:not(:only-child) {
    opacity: 0;
  }
  .card__media.media--hover-effect:hover > img + img {
    opacity: 1;
    transform: translateY(-50%) scale(1.03);
  }

  .hover-effect-container .hover-effect-target {
    --duration-long: 400ms;
    transition: transform var(--duration-long) ease;
  }

  .hover-effect-container:hover .hover-effect-target {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
  }
}

@media (max-width: 959px) {
  .card__media.mobile--media--hover-effect:hover
    > img:first-child:not(:only-child) {
    opacity: 0;
  }
  .card__media.mobile--media--hover-effect:hover > img + img {
    opacity: 1;
    transform: translateY(-50%) scale(1.03);
  }
}

@media (min-width: 960px) {
  .card__button {
    z-index: 2;
  }
  .card:hover .card__button .card__button-inner {
    opacity: 1;
    transform: translateY(0);
  }
}

.display-1-row,
.display-2-rows {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  padding-right: 4px;
  -webkit-box-orient: vertical;
}

.display-1-row {
  -webkit-line-clamp: 1;
}

.display-2-rows {
  -webkit-line-clamp: 2;
}

/* The ipad end responds to the mobile end in vertical screen */

/* @custom-media --tablet (max-width: 959px); */

/* @custom-media --gt-mobile (min-width: 751px); */

/* detectingScreen need to consider the configuration of the tablet */
/* Make the full-card link sit *under* our CTA */
.card-wrapper .full-unstyled-link {
    z-index: 1;
}

/* Center the price/CTA row on all screens */
.card .card__content .card__content-bottom {
    justify-content: center;
}

/* Add-to-cart placement and layering */
.product-card-wrapper .card__bottom-actions {
    position: relative;
    z-index: 2;
    /* above the full-unstyled-link overlay */
    display: flex;
    justify-content: center;
    margin: 12px 0 18px;
}

/* Button size/shape */
.product-card-wrapper .card__bottom-actions .button,
.product-card-wrapper .card__bottom-actions button,
.product-card-wrapper .card__bottom-actions .product-form__submit {
    min-width: 180px;
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 600;
}

/* (Optional) mobile full width */
@media (max-width: 959px) {

    .product-card-wrapper .card__bottom-actions .button,
    .product-card-wrapper .card__bottom-actions button {
        width: 100%;
    }
}

/* If your theme had an old overlay CTA bar, hide it */
.card .card__button {
     display: none !important; 
}
.card .card__badge {
    display: none !important;
}

/* 1) Only show real badges */
.card .card__badge:empty {
    display: none !important;
}

/* 2) Reset any conflicting positions so it won't stretch */
.card .card__badge {
    position: absolute !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;

    display: inline-flex !important;
    align-items: center;
    height: auto !important;
    width: auto !important;
    white-space: nowrap;

    background: rgb(var(--color-button-background)) !important;
    /* SALE pill look */
    border-radius: 8px;
    color: #fff !important;
    padding: 6px 10px !important;
    font: 700 12px/1 inherit;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    border: 0;
}

/* 3) Choose ONE corner (matches your target screenshot) */
.card .card__badge.right_top {
    top: 14px !important;
    right: 14px !important;
}

.card .card__badge.left_top {
    top: 14px !important;
    left: 14px !important;
}

.card .card__badge.right_bottom {
    bottom: 14px !important;
    right: 14px !important;
}

.card .card__badge.left_bottom {
    bottom: 14px !important;
    left: 14px !important;
}

/* Keep 'Sold out' using theme colors if you use that badge */
.card .card__badge.sold-out-message {
    background: var(--card-badge-bg, rgba(var(--color-text))) !important;
    color: rgb(var(--color-page-background)) !important;
}

/* Force SALE badge to top-right like your second screenshot */
.card .card__badge:not(:empty):not(.sold-out-message) {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    left: auto !important;
    bottom: auto !important;

    display: inline-block !important;
    background: #77a464 !important;
    color: #fff !important;
    padding: 3px 7px !important;
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    border: 0;
}

/* Hide empty badge placeholders */
.card .card__badge:empty {
    display: none !important;
}

/* Put price above, button below (centered) */
.card .card__content .card__content-bottom {
    display: flex;
    flex-direction: column;
    /* <-- stack */
    align-items: center;
    gap: 10px;
}

/* Make sure the price shows first */
.card .card__content .card__content-bottom .price {
    order: 1;
}

/* Center the Add to cart form and make it come after price */
.add-to-cart-form {
    order: 2;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 4px;
    z-index: 2;
    /* above the full-unstyled-link */
}

/* Match the smaller green pill look from the 2nd screenshot */
.add-to-cart-btn {
    min-width: 160px;
    padding: 6px 13px;
    border: 0;
    border-radius: 12px;
    background: #57725b !important;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.add-to-cart-btn:hover {
    filter: brightness(0.95);
}

/* Ensure the overlay link doesn't block the button */
.card-wrapper .full-unstyled-link {
    z-index: 1;
}

/* --- Make layout match the second screenshot --- */

/* Stack price then CTA, centered */
.card .card__content .card__content-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Make sure the overlay link doesn't block clicks */
.card-wrapper .full-unstyled-link {
    z-index: 1;
}

/* Always show our small pill CTA (and hide the big theme one) */
.product-card-wrapper .card__bottom-actions {
    display: none !important;
}

/* Center the area where our CTA sits (for safety if it shows anywhere) */
.add-to-cart-form {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 4px;
    z-index: 2;
}

/* Match the small green pill style from the second screenshot */
.add-to-cart-btn,
.product-card-wrapper .card__bottom-actions .button,
.product-card-wrapper .card__bottom-actions .product-form__submit {
    min-width: 160px;
    padding: 6px 13px;
    border-radius: 12px !important;
    border: 0 !important;
    background: #57725b !important;
    /* same green as your second section */
    color: #fff !important;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.25;
    text-transform: none !important;
    /* avoid forced ALL CAPS */
    box-shadow: none !important;
    cursor: pointer;
}

.add-to-cart-btn:hover {
    filter: brightness(0.95);
}

/* --- Badge look to match the second screenshot --- */
.card .card__badge:not(:empty) {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    left: auto !important;
    bottom: auto !important;
    display: inline-block !important;
    background: #77a464 !important;
    /* subtle green badge */
    color: #fff !important;
    padding: 3px 7px !important;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    border: 0;
}

.card .card__badge:empty {
    display: none !important;
}

/* center the product title like the second section */
.product-card-wrapper .product__title {
    text-align: center !important;
    margin-bottom: 8px !important;
    /* was larger */
}

/* tighten space between image → title → price → button */
.card .card__content {
    margin-top: 10px !important;
    /* was ~20px */
}

.card .card__content .card__content-bottom {
    flex-direction: column;
    align-items: center;
    gap: 6px !important;
    /* was ~10px+ */
}

.add-to-cart-form {
    margin-top: 6px !important;
    margin-bottom: 0 !important;
}

/* make sure the full-card link doesn't block the button */
.card-wrapper .full-unstyled-link {
    z-index: 1;
}

/* optional: if you still see padding inside the image wrapper, trim it */
.product-card-wrapper .card__inner--wrapper {
    padding-bottom: 0 !important;
}

/* Hide ALL pagination UIs on collection/product-list pages */
.collection-pagination,
.collection__pagination,
.product-list__pagination,
.pagination,
.paginate,
.paginate-container,
.pager,
.pagination-counter,
.compact-pagination,
nav[aria-label="pagination"],
ul.pagination,
.collection__load-more,
.load-more,
.button--load-more {
    display: none !important;
}