.kcc-campaign-catalog {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

.kcc-ipaper-tabs {
  max-width: 1180px;
  margin-right: auto;
  margin-left: auto;
}

.kcc-campaign-catalog {
  scroll-margin-top: 5rem;
}

.kcc-catalog-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.75rem;
  padding: 0.5rem 0;
}

.kcc-catalog-share-status,
.kcc-catalog-share-manual {
  flex-basis: 100%;
  min-width: 0;
  text-align: center;
  font-size: 0.875rem;
  color: #444;
}

.kcc-catalog-share-status:empty,
.kcc-catalog-share [hidden] {
  display: none;
}

.kcc-catalog-share-manual input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 16px;
}

.kcc-ipaper-tab {
  padding: 0.75rem 1rem;
  color: #111;
  font-weight: 600;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
}

.kcc-ipaper-tab.is-active {
  color: #fff;
  background: #111;
  border-color: #111;
}

.kcc-ipaper-viewer-shell {
  position: relative;
  width: 100%;
  height: min(82dvh, 1100px);
  overflow: hidden;
  background: #fff;
}

#kcc-ipaper-frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: #fff;
  border: 0;
}

.kcc-product-drawer[hidden] {
  display: none !important;
}

.kcc-product-drawer {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 2147483647 !important;
  display: block !important;
  visibility: hidden;
  width: min(430px, 100vw) !important;
  height: 100vh !important;
  height: 100dvh !important;
  padding: 1rem;
  overflow: auto;
  box-sizing: border-box;
  background: #fff !important;
  border-left: 1px solid #ddd;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  transform: translateX(110%);
  transition: transform 180ms ease;
}

.kcc-product-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

body.kcc-product-drawer-open {
  overflow: hidden;
}

.kcc-product-drawer-close {
  position: sticky;
  /* Sticky inset is inside this scroll container's existing 1rem padding. */
  top: max(0px, calc(env(safe-area-inset-top, 0px) - 1rem));
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0 auto 1rem 0;
  font-size: 1.5rem;
  line-height: 1;
  color: #fff;
  background: #111;
  border: 1px solid #111;
  border-radius: 4px;
  cursor: pointer;
}

/* Keep all scrolling product content below the small, opaque close button. */
#kcc-product-drawer-content {
  position: relative;
  z-index: 0;
}

.kcc-product-drawer-image {
  display: block;
  width: 100%;
  height: clamp(140px, 28vh, 240px);
  margin: 0 0 1rem;
  object-fit: contain;
  object-position: center;
  background: #f6f6f6;
}

.kcc-product-drawer-pricing {
  margin: 1rem 0;
}

.kcc-product-drawer-attributes {
  margin: 1rem 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.kcc-product-drawer-attributes dt {
  font-weight: 700;
}

.kcc-product-drawer-attributes dd {
  margin: 0 0 0.75rem;
}

@media (max-width: 768px) {
  .kcc-ipaper-viewer-shell {
    height: calc(100vh - 150px);
    min-height: 520px;
    max-height: 760px;
  }

  .kcc-ipaper-tab {
    flex: 1 1 auto;
  }
}

.kcc-product-drawer-member {
  text-align: left;
}

.kcc-product-drawer-member + .kcc-product-drawer-member {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ddd;
}
