/* Product Add-ons — compact horizontal rows (scoped; unrelated to related/recently viewed grids) */

.single-product-wrapper .product-detail .product-addons {
  margin: 1.25rem 0 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  clear: both;
}

.single-product-wrapper .product-detail .product-addons__title {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.single-product-wrapper .product-detail .product-addons__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.single-product-wrapper .product-detail .product-addons__item {
  margin: 0;
  padding: 0;
}

.single-product-wrapper .product-detail .product-addons__card {
  display: grid !important;
  grid-template-columns: 6.75rem minmax(0, 1fr) auto;
  grid-template-areas: 'thumb meta actions';
  gap: 0.625rem;
  align-items: stretch;
  padding: 0.5rem 0.625rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--theme-theme-radius-base, 8px);
  background: rgba(255, 255, 255, 0.04);
}

.single-product-wrapper .product-detail .product-addons__thumb {
  grid-area: thumb;
  display: block;
  width: 6.75rem !important;
  height: 6.75rem !important;
  min-width: 6.75rem;
  max-width: 6.75rem;
  padding: 0;
  border: 0;
  align-self: start;
  border-radius: var(--theme-theme-radius-small, 6px);
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
  cursor: zoom-in;
  appearance: none;
  -webkit-appearance: none;
}

.single-product-wrapper .product-detail .product-addons__thumb:focus-visible {
  outline: 2px solid #ef233c;
  outline-offset: 2px;
}

.single-product-wrapper .product-detail .product-addons__thumb img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 6.75rem !important;
  max-height: 6.75rem !important;
  object-fit: cover;
}

.single-product-wrapper .product-detail .product-addons__meta {
  grid-area: meta;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.single-product-wrapper .product-detail .product-addons__item--variable .product-addons__meta {
  min-height: 6.75rem;
}

.single-product-wrapper .product-detail .product-addons__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  margin: 0 0 0.25rem;
}

.single-product-wrapper .product-detail .product-addons__name:hover {
  text-decoration: underline;
}

/* Keep all add-on prices the same size — variation price_html can inject theme .price styles */
.single-product-wrapper .product-detail .product-addons__price,
.single-product-wrapper .product-detail .product-addons__price .price,
.single-product-wrapper .product-detail .product-addons__price .amount,
.single-product-wrapper .product-detail .product-addons__price .woocommerce-Price-amount,
.single-product-wrapper .product-detail .product-addons__price .woocommerce-Price-currencySymbol {
  display: inline;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  margin: 0 !important;
}

.single-product-wrapper .product-detail .product-addons__price {
  display: block;
}

.single-product-wrapper .product-detail .product-addons .woocs_price_info {
  display: none !important;
}

.single-product-wrapper .product-detail .product-addons__variations {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  max-width: 12rem;
}

.single-product-wrapper .product-detail .product-addons__variation-row {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.single-product-wrapper .product-detail .product-addons__variation-row select,
.single-product-wrapper .product-detail .product-addons select.pao-addon-attr-select {
  display: inline-block;
  width: auto !important;
  min-width: 5.5rem;
  max-width: 12rem;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0.2rem 1.5rem 0.2rem 0.45rem !important;
  font-size: 0.75rem !important;
  line-height: 1.25 !important;
  border: 1px solid rgba(0, 0, 0, 0.18) !important;
  border-radius: 4px !important;
  background-color: #fff !important;
  color: #212529 !important;
  appearance: auto;
  -webkit-appearance: menulist;
}

.single-product-wrapper .product-detail .product-addons__actions {
  grid-area: actions;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  align-self: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.single-product-wrapper .product-detail .product-addons__add.button {
  white-space: nowrap;
  min-width: 3.75rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  line-height: 1.2;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  color: #212529;
}

.single-product-wrapper .product-detail .product-addons__add.button:hover {
  background: #e9ecef;
  color: #212529;
}

.single-product-wrapper .product-detail .product-addons__add.button.is-in-cart {
  background: #e8f5e9;
  border-color: #a5d6a7;
  color: #1b5e20;
  min-width: 7.5rem;
}

.single-product-wrapper .product-detail .product-addons__add.button.is-in-cart:hover {
  background: #c8e6c9;
  color: #1b5e20;
}

.single-product-wrapper .product-detail .product-addons__add.button.is-adding {
  min-width: 5rem;
}

.single-product-wrapper .product-detail .product-addons__add:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.single-product-wrapper .product-detail .product-addons__message {
  font-size: 0.6875rem;
  line-height: 1.2;
  text-align: right;
  max-width: 6rem;
}

/* Variable add-ons: title top-aligned with image; select bottom-aligned with image */
.single-product-wrapper .product-detail .product-addons__item--variable .product-addons__name {
  margin-bottom: 0.25rem;
}

.single-product-wrapper .product-detail .product-addons__item--variable .product-addons__price {
  margin-bottom: 0;
}

body.custom-background .single-product-wrapper .product-detail .product-addons {
  border-top-color: rgba(255, 255, 255, 0.2);
}

body.custom-background .single-product-wrapper .product-detail .product-addons__card {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

body.custom-background .single-product-wrapper .product-detail .product-addons__title,
body.custom-background .single-product-wrapper .product-detail .product-addons__name,
body.custom-background .single-product-wrapper .product-detail .product-addons__price,
body.custom-background .single-product-wrapper .product-detail .product-addons__price .price,
body.custom-background .single-product-wrapper .product-detail .product-addons__price .amount,
body.custom-background .single-product-wrapper .product-detail .product-addons__price .woocommerce-Price-amount {
  color: #fff !important;
}

body.custom-background .single-product-wrapper .product-detail .product-addons__name:hover {
  color: rgba(255, 255, 255, 0.78);
}

body.custom-background .single-product-wrapper .product-detail .product-addons__message {
  color: rgba(255, 255, 255, 0.85);
}

body.custom-background .single-product-wrapper .product-detail .product-addons__add.button {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

body.custom-background .single-product-wrapper .product-detail .product-addons__add.button.is-in-cart {
  background: rgba(76, 175, 80, 0.22);
  border-color: rgba(129, 199, 132, 0.65);
  color: #c8e6c9;
}

body.custom-background .single-product-wrapper .product-detail .product-addons__add.button.is-in-cart:hover {
  background: rgba(76, 175, 80, 0.32);
  color: #e8f5e9;
}

body.custom-background .single-product-wrapper .product-detail .product-addons__add.button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

body.custom-background .single-product-wrapper .product-detail .product-addons__variation-row select,
body.custom-background .single-product-wrapper .product-detail .product-addons select.pao-addon-attr-select {
  background-color: #fff !important;
  color: #212529 !important;
  border-color: rgba(0, 0, 0, 0.18) !important;
}

@media (max-width: 575px) {
  .single-product-wrapper .product-detail .product-addons__card {
    grid-template-columns: 6.1875rem minmax(0, 1fr) auto;
    gap: 0.5rem;
    padding: 0.45rem 0.5rem;
  }

  .single-product-wrapper .product-detail .product-addons__thumb,
  .single-product-wrapper .product-detail .product-addons__thumb img {
    width: 6.1875rem !important;
    height: 6.1875rem !important;
    max-width: 6.1875rem !important;
    max-height: 6.1875rem !important;
    min-width: 6.1875rem;
  }

  .single-product-wrapper .product-detail .product-addons__name {
    -webkit-line-clamp: 3;
  }

  .single-product-wrapper .product-detail .product-addons__item--variable .product-addons__meta {
    min-height: 6.1875rem;
  }
}

/* Add-on image lightbox */
body.product-addons-lightbox-open {
  overflow: hidden;
}

.product-addons-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.product-addons-lightbox[hidden] {
  display: none !important;
}

.product-addons-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.product-addons-lightbox__dialog {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 960px);
  max-height: 90vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.product-addons-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.product-addons-lightbox__close {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #212529;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.product-addons-lightbox__close:hover {
  background: #f1f3f5;
}

@media (max-width: 575px) {
  .product-addons-lightbox__close {
    top: -0.75rem;
    right: 0;
  }
}
