.luxdup-photo-header-button {
  align-items: center;
  color: inherit;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  margin-inline: 3px;
  text-decoration: none;
  width: 40px;
}

.luxdup-photo-header-button svg { height: 19px; width: 19px; }
.luxdup-photo-header-button:hover { color: var(--theme-link-hover-color, #d3a168); }
.luxdup-photo-header-button-source:not([hidden]) { bottom: 82px; position: fixed; right: 20px; z-index: 999; }
.luxdup-photo-header-button-source:not([hidden]) .luxdup-photo-header-button { background: #fff; border-radius: 50%; box-shadow: 0 3px 18px rgba(0,0,0,.16); }

.luxdup-photo-search {
  --luxdup-accent: var(--theme-palette-color-1, #c69a67);
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(28px, 5vw, 72px) 20px 80px;
}

.luxdup-photo-search__intro { margin: 0 auto 30px; max-width: 720px; text-align: center; }
.luxdup-photo-search__intro h1 { margin-bottom: 10px; }

.luxdup-photo-dropzone {
  align-items: center;
  background: #fafafa;
  border: 2px dashed #c8c8c8;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0 auto;
  max-width: 760px;
  min-height: 270px;
  justify-content: center;
  padding: 38px 20px;
  position: relative;
  text-align: center;
  transition: border-color .2s, background .2s;
}

.luxdup-photo-dropzone:hover,
.luxdup-photo-dropzone.is-dragging { background: #fffaf4; border-color: var(--luxdup-accent); }
.luxdup-photo-dropzone input {
  cursor: pointer;
  height: 100%;
  inset: 0;
  opacity: 0;
  position: absolute;
  width: 100%;
  z-index: 3;
}
.luxdup-photo-dropzone > :not(input) { pointer-events: none; }
.luxdup-photo-dropzone__icon { align-items: center; background: #fff; border-radius: 50%; box-shadow: 0 3px 18px rgba(0,0,0,.08); display: inline-flex; height: 76px; justify-content: center; width: 76px; }
.luxdup-photo-dropzone__icon svg { height: 36px; width: 36px; }
.luxdup-photo-dropzone strong { font-size: 1.1rem; }
.luxdup-photo-dropzone span:last-child { color: #666; font-size: .9rem; }

.luxdup-photo-editor { margin: 0 auto; max-width: 820px; }
.luxdup-photo-editor__heading { align-items: start; display: flex; justify-content: space-between; }
.luxdup-photo-editor__heading h2 { margin-bottom: 2px; }
.luxdup-photo-editor__heading p { color: #666; margin: 0; overflow-wrap: anywhere; }
.luxdup-photo-canvas-wrap { background: #eee; border-radius: 8px; line-height: 0; margin: 18px 0; overflow: hidden; text-align: center; }
.luxdup-photo-canvas-wrap canvas { cursor: crosshair; height: auto; max-height: 680px; max-width: 100%; touch-action: none; width: auto; }
.luxdup-photo-editor__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.luxdup-photo-editor__actions .button {
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
  min-height: 44px !important;
  padding: 11px 22px !important;
  text-transform: none !important;
}
.luxdup-photo-editor__actions [data-search-photo] {
  background: #222 !important;
  border: 1px solid #222 !important;
  color: #fff !important;
}
.luxdup-photo-editor__actions [data-search-photo]:hover { background: #000 !important; border-color: #000 !important; }
.luxdup-photo-editor__actions [data-full-photo] {
  background: #fff !important;
  border: 1px solid #b8b8b8 !important;
  color: #222 !important;
}
.luxdup-photo-editor__actions [data-full-photo]:hover { background: #f6f6f6 !important; border-color: #777 !important; }
.luxdup-photo-editor__actions [data-search-photo]:disabled { cursor: wait; opacity: .55; }
.luxdup-photo-link-button { background: none; border: 0; color: var(--luxdup-accent); cursor: pointer; padding: 5px; text-decoration: underline; }

.luxdup-photo-feedback { margin: 24px auto; max-width: 760px; min-height: 54px; text-align: center; }
.luxdup-photo-feedback p { margin: 8px 0; }
.luxdup-photo-search[data-state="error"] [data-status] { color: #b42318; }
.luxdup-photo-search[data-state="success"] [data-status] { color: #16803a; }
.luxdup-photo-spinner { animation: luxdup-photo-spin .8s linear infinite; border: 3px solid #ddd; border-radius: 50%; border-top-color: var(--luxdup-accent); height: 28px; margin: 0 auto; width: 28px; }
@keyframes luxdup-photo-spin { to { transform: rotate(360deg); } }

.luxdup-photo-help { border-top: 1px solid #e5e5e5; margin: 24px auto; max-width: 760px; padding-top: 14px; }
.luxdup-photo-help summary { cursor: pointer; font-weight: 600; }
.luxdup-photo-results {
  left: 50%;
  margin-top: 55px;
  max-width: 1440px;
  position: relative;
  scroll-margin-top: 120px;
  transform: translateX(-50%);
  width: calc(100vw - 40px);
}
.luxdup-photo-results__heading { align-items: baseline; border-bottom: 1px solid #e5e5e5; display: flex; justify-content: space-between; margin-bottom: 8px; }
.luxdup-photo-results__heading h2 { margin-bottom: 10px; }
.luxdup-photo-results > p { color: #666; }
.luxdup-photo-results ul.products.luxdup-photo-product-grid {
  display: grid !important;
  float: none !important;
  gap: 24px 18px !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  list-style: none !important;
  margin: 28px 0 0 !important;
  max-width: none !important;
  padding: 0 !important;
  width: 100% !important;
}

.luxdup-photo-results ul.products.luxdup-photo-product-grid::before,
.luxdup-photo-results ul.products.luxdup-photo-product-grid::after { content: none !important; display: none !important; }

.luxdup-photo-results ul.products.luxdup-photo-product-grid > li.product {
  background: #fff !important;
  border: 1px solid #e3e3e3 !important;
  box-sizing: border-box !important;
  display: flex !important;
  float: none !important;
  flex-direction: column !important;
  margin: 0 !important;
  max-width: none !important;
  min-width: 0 !important;
  overflow: hidden !important;
  padding: 0 0 18px !important;
  position: relative !important;
  text-align: center !important;
  width: auto !important;
}

.luxdup-photo-product-grid > li.product figure,
.luxdup-photo-product-grid > li.product .ct-media-container,
.luxdup-photo-product-grid > li.product .woocommerce-loop-product__link {
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

.luxdup-photo-product-grid > li.product .ct-media-container {
  align-items: center !important;
  aspect-ratio: 1 / 1 !important;
  background: #fff !important;
  display: flex !important;
  justify-content: center !important;
  overflow: hidden !important;
}

.luxdup-photo-product-grid > li.product img {
  aspect-ratio: 1 / 1 !important;
  display: block !important;
  height: auto !important;
  margin: 0 !important;
  max-width: none !important;
  object-fit: contain !important;
  width: 100% !important;
}

.luxdup-photo-product-grid > li.product .woocommerce-loop-product__title,
.luxdup-photo-product-grid > li.product .ct-woo-card-actions + *,
.luxdup-photo-product-grid > li.product h2,
.luxdup-photo-product-grid > li.product h3 {
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  margin: 14px 14px 8px !important;
  text-align: center !important;
}

.luxdup-photo-product-grid > li.product .price {
  color: #ef5b55 !important;
  display: block !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  margin: auto 12px 0 !important;
  text-align: center !important;
}

.luxdup-photo-product-grid .add_to_cart_button,
.luxdup-photo-product-grid .ajax_add_to_cart,
.luxdup-photo-product-grid .added_to_cart,
.luxdup-photo-product-grid .product_type_simple,
.luxdup-photo-product-grid .product_type_variable,
.luxdup-photo-product-grid .ct-woo-card-actions,
.luxdup-photo-product-grid .ct-open-quick-view,
.luxdup-photo-product-grid .onsale,
.luxdup-photo-product-grid .sale-badge,
.luxdup-photo-product-grid [class*="sale-badge"],
.luxdup-photo-product-grid [data-add-to-cart],
.luxdup-photo-product-grid form.cart,
.luxdup-photo-product-grid .quantity { display: none !important; }

@media (max-width: 689px) {
  .luxdup-photo-search { padding: 24px 12px 54px; }
  .luxdup-photo-search__intro { margin-bottom: 22px; }
  .luxdup-photo-search__intro h1 { font-size: 34px !important; line-height: 1.15 !important; margin-bottom: 0 !important; }
  .luxdup-photo-search__intro p { display: none; }
  .luxdup-photo-dropzone { border-radius: 6px; gap: 8px; min-height: 210px; padding: 28px 14px; }
  .luxdup-photo-dropzone__icon { height: 62px; width: 62px; }
  .luxdup-photo-dropzone__icon svg { height: 30px; width: 30px; }
  .luxdup-photo-dropzone strong { font-size: 16px !important; line-height: 1.35 !important; }
  .luxdup-photo-dropzone span:last-child { font-size: 12px !important; line-height: 1.45 !important; }

  .luxdup-photo-editor__heading { gap: 14px; }
  .luxdup-photo-editor__heading h2 { font-size: 25px !important; line-height: 1.2 !important; }
  .luxdup-photo-editor__heading p { font-size: 14px !important; line-height: 1.35 !important; }
  .luxdup-photo-editor__heading [data-remove] { font-size: 15px !important; line-height: 1.3 !important; white-space: nowrap; }
  .luxdup-photo-editor__hint { display: none; }
  .luxdup-photo-canvas-wrap { margin: 14px 0; }
  .luxdup-photo-editor__actions { gap: 10px; }
  .luxdup-photo-editor__actions .button { font-size: 14px !important; min-height: 42px !important; padding: 10px 17px !important; }

  .luxdup-photo-feedback { margin: 18px auto; min-height: 45px; }
  .luxdup-photo-feedback p { font-size: 15px !important; }
  .luxdup-photo-help { margin-top: 18px; }
  .luxdup-photo-help summary { font-size: 15px !important; }

  .luxdup-photo-results { margin-top: 38px; width: calc(100vw - 20px); }
  .luxdup-photo-results__heading h2 { font-size: 22px !important; }
  .luxdup-photo-results > p { font-size: 12.5px !important; line-height: 1.45 !important; }
  .luxdup-photo-results ul.products.luxdup-photo-product-grid {
    gap: 12px 9px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin-top: 18px !important;
  }
  .luxdup-photo-results ul.products.luxdup-photo-product-grid > li.product { padding-bottom: 12px !important; }
  .luxdup-photo-product-grid > li.product .woocommerce-loop-product__title,
  .luxdup-photo-product-grid > li.product h2,
  .luxdup-photo-product-grid > li.product h3 {
    font-size: 12.5px !important;
    line-height: 1.32 !important;
    margin: 10px 8px 6px !important;
  }
  .luxdup-photo-product-grid > li.product .price { font-size: 13px !important; margin-inline: 6px !important; }
}
