.kcc-product-title-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  min-width: 0;
}

.kcc-product-title-row > :first-child {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Preserve the title's existing clearance for OceanWP's absolute desktop navigation. */
@media (min-width: 1080px) {
  .owp-product-nav-wrap:has(.owp-nav-link) ~ .summary > .kcc-product-title-row {
    margin-right: 70px;
  }
}

/* Shared capsule geometry; drawer actions override only the interaction colors. */
button.kcc-share-button,
a.kcc-drawer-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  width: auto;
  height: 44px;
  min-width: 44px;
  padding: 0 12px;
  margin: 0;
  color: #333;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d5d5d5;
  border-radius: 999px;
  box-shadow: none;
  font: 500 14px/1.2 sans-serif;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

button.kcc-share-button:hover {
  color: #222;
  background: #f2f2f2;
}

button.kcc-share-button:focus-visible {
  outline: 2px solid #333;
  outline-offset: 2px;
}

.kcc-share-button svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.kcc-product-title-row--image-share {
  display: block;
}

.kcc-share-gallery {
  position: relative;
}

.kcc-product-image-share {
  position: absolute;
  right: 14px;
  bottom: auto;
  z-index: 2;
}

.kcc-product-image-share .kcc-product-share-feedback {
  top: auto;
  bottom: calc(100% + 6px);
  width: min(260px, 75vw);
}

.kcc-product-share-feedback {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 3;
  box-sizing: border-box;
  width: min(260px, 100%);
  padding: 0.5rem;
  color: #444;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  font: normal 0.875rem/1.4 sans-serif;
  text-align: left;
  overflow-wrap: anywhere;
}

.kcc-product-share-feedback:has([role="status"]:empty):has(label[hidden]) {
  padding: 0;
  border: 0;
}

.kcc-product-share-feedback label[hidden] {
  display: none;
}

.kcc-product-share-feedback input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  font-size: 16px;
}

.kcc-product-drawer-actions {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1rem 0;
  min-width: 0;
}

/* Use the same accent as OceanWP's existing link hover, including older themes. */
.kcc-product-drawer-actions .kcc-drawer-action {
  color: #fff;
  background: #000;
  border-color: #000;
  transition: none;
}

.kcc-product-drawer-actions .kcc-drawer-action:hover,
.kcc-product-drawer-actions .kcc-drawer-action:active {
  color: #000;
  background: var(--owp-link-color-hover, var(--kcc-drawer-action-accent, #d4af37));
  border-color: var(--owp-link-color-hover, var(--kcc-drawer-action-accent, #d4af37));
  text-decoration: none;
}

.kcc-product-drawer-actions .kcc-drawer-action:focus-visible {
  outline: 2px solid #000;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px #fff;
}
