/* Keep product purchase buttons consistent across Journal layouts and stock states. */
html body .product-layout :is(.product-thumb, .side-product) .button-group .btn.btn-cart:not(.btn-checkout):not(.btn-extra),
html body .product-info .button-group-page .cart-group .btn.btn-cart:not(.btn-checkout):not(.btn-extra),
html body #product-compare .btn.btn-cart:not(.btn-checkout):not(.btn-extra) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: row !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: 100%;
  min-width: 0 !important;
  height: auto !important;
  min-height: 48px !important;
  padding: 12px 18px !important;
  margin: 0 !important;
  border: 1px solid #ff741a !important;
  border-radius: 5px !important;
  background: linear-gradient(110deg, #ff7518, #ff4b19) !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  text-transform: none !important;
  text-decoration: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

html body .product-layout :is(.product-thumb, .side-product) .button-group .btn.btn-cart:not(.btn-checkout):not(.btn-extra):hover,
html body .product-info .button-group-page .cart-group .btn.btn-cart:not(.btn-checkout):not(.btn-extra):hover,
html body #product-compare .btn.btn-cart:not(.btn-checkout):not(.btn-extra):hover {
  background: linear-gradient(110deg, #f46a10, #ef4210) !important;
  text-decoration: none !important;
}

html body .product-layout :is(.product-thumb, .side-product) .button-group .btn.btn-cart:focus-visible,
html body .product-info .button-group-page .cart-group .btn.btn-cart:focus-visible,
html body #product-compare .btn.btn-cart:focus-visible {
  outline: 3px solid #ff9f59;
  outline-offset: 3px;
}

html body .product-layout :is(.product-thumb, .side-product) .button-group .btn.btn-cart .btn-text,
html body .product-info .button-group-page .cart-group .btn.btn-cart .btn-text,
html body #product-compare .btn.btn-cart span {
  display: inline-block !important;
  order: 0 !important;
  padding: 0 !important;
  color: #fff !important;
  white-space: normal !important;
  text-align: center;
}

html body .product-layout :is(.product-thumb, .side-product) .button-group .btn.btn-cart:not(.btn-checkout):not(.btn-extra)::before,
html body .product-layout :is(.product-thumb, .side-product) .button-group .btn.btn-cart:not(.btn-checkout):not(.btn-extra):hover::before,
html body .product-info .button-group-page .cart-group .btn.btn-cart:not(.btn-checkout):not(.btn-extra)::before,
html body .product-info .button-group-page .cart-group .btn.btn-cart:not(.btn-checkout):not(.btn-extra):hover::before,
html body #product-compare .btn.btn-cart:not(.btn-checkout):not(.btn-extra)::before,
html body #product-compare .btn.btn-cart:not(.btn-checkout):not(.btn-extra):hover::before {
  content: '' !important;
  font-size: 0 !important;
  line-height: 0 !important;
  display: block !important;
  order: 1 !important;
  flex: 0 0 24px !important;
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  -webkit-mask: url('../icons/cart-outline.svg') center / contain no-repeat;
  mask: url('../icons/cart-outline.svg') center / contain no-repeat;
  transform: none !important;
}

html body .product-thumb .button-group .cart-group,
html body .product-info .button-group-page .cart-group {
  min-width: 0;
  opacity: 1 !important;
}

/* Allow the longer label to fit beside the other actions, or wrap on narrow cards. */
html body .product-thumb .button-group {
  flex-wrap: wrap;
  gap: 8px;
}
html body .product-thumb .button-group .cart-group {
  flex: 1 1 190px !important;
  max-width: 100%;
}

@media (max-width: 480px) {
  html body .product-layout :is(.product-thumb, .side-product) .button-group .btn.btn-cart:not(.btn-checkout):not(.btn-extra) {
    gap: 8px !important;
    padding: 10px 8px !important;
    font-size: 14px !important;
  }
}

/* Horizontal recommendation cards use compact actions beside wishlist/compare. */
html body .product-layout .side-product .caption .button-group {
  container-type: inline-size;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

html body .product-layout .side-product .caption .button-group .btn.btn-cart:not(.btn-checkout):not(.btn-extra) {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: 100% !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 3px !important;
  gap: 3px !important;
  font-size: clamp(9px, 6.2cqi, 12px) !important;
}

html body .product-layout .side-product .caption .button-group .btn.btn-cart .btn-text {
  display: inline-block !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

html body .product-layout .side-product .caption .button-group .btn.btn-cart:not(.btn-checkout):not(.btn-extra)::before {
  flex-basis: 14px !important;
  width: 14px !important;
  height: 14px !important;
}
