/* Generated products open as a publication sheet; drafts retain the editor. */
#screen-details #details-form.is-publication-sheet { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.publication-media, .publication-content, .publication-review { min-width: 0; }
.publication-gallery { display: grid; gap: 10px; width: min(100%, 560px); margin: 0 auto; }
.publication-carousel-track {
  display: flex;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: min(72vh, 680px);
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 18px;
  background: #f4f5f2;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.publication-carousel-track::-webkit-scrollbar { display: none; }
.publication-photo {
  position: relative;
  display: block;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-width: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
  cursor: zoom-in;
  scroll-snap-align: start;
  contain: layout paint;
}
.publication-photo img {
  position: absolute;
  inset: 0;
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: cover;
  transition: opacity 0.2s ease;
}
.publication-photo.image-loading img { opacity: 0; }
.publication-photo.image-ready img { opacity: 1; }
.publication-gallery.is-empty { min-height: 220px; place-items: center; border-radius: 16px; background: #f4f5f2; color: #69726d; }
.publication-carousel-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; color: #343c37; font-size: 13px; }
.publication-carousel-caption strong { font-weight: 700; }
.publication-carousel-caption span { color: #747d77; font-variant-numeric: tabular-nums; }
.publication-carousel-controls { display: flex; align-items: center; justify-content: center; gap: 14px; }
.publication-carousel-arrow { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid #e0e5e0; border-radius: 50%; background: #fff; color: #43594b; font: 400 24px/1 var(--font-family, sans-serif); cursor: pointer; }
.publication-carousel-arrow:disabled { opacity: .35; cursor: default; }
.publication-carousel-dots { display: flex; align-items: center; gap: 8px; }
.publication-carousel-dot { display: grid; width: 28px; height: 28px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.publication-carousel-dot::before { width: 7px; height: 7px; border-radius: 50%; background: #c5cbc5; content: ''; transition: width .18s ease, border-radius .18s ease, background .18s ease; }
.publication-carousel-dot[aria-current="true"]::before { width: 19px; border-radius: 6px; background: #6654f1; }
.publication-download { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 56px; margin-top: 12px; padding: 10px 16px; border: 0; border-radius: 12px; background: #6654f1; color: #fff; font: 650 15px/1.4 var(--font-family, sans-serif); cursor: pointer; }
.publication-download small { display: block; font-size: 12px; font-weight: 400; }
.publication-text { padding: 0 0 18px; margin-bottom: 18px; border: 0; border-bottom: 1px solid #e3e7e3; border-radius: 0; background: transparent; }
.publication-text-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.publication-text-header h2 { margin: 0; font-size: 12px; font-weight: 650; color: #69736d; }
.publication-copy { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 7px 10px; border: 1px solid #e1e6e1; border-radius: 9px; background: #f5f6f3; color: #425849; font: 600 12px/1.3 var(--font-family, sans-serif); cursor: pointer; }
.publication-text p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #222a25; }
.publication-title { font-size: 18px; font-weight: 700; line-height: 1.35; }
.publication-description { font-size: 15px; line-height: 1.6; }
.publication-specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 12px; margin: 0; padding: 18px 0; border-block: 1px solid #e3e7e3; }
.publication-specs dt { margin-bottom: 6px; font-size: 12px; color: #69736d; }
.publication-specs dd { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.45; color: #222a25; overflow-wrap: anywhere; }
.publication-edit { margin-top: 14px; min-height: 44px; padding: 10px 0; border: 0; background: transparent; color: #6654f1; font: 600 14px var(--font-family, sans-serif); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.publication-copy:hover, .publication-edit:hover { color: #4938c8; }
.publication-download:hover { background: #4938c8; }
.publication-download:disabled, .publication-copy:disabled { opacity: .55; cursor: default; }
.is-publication-sheet button:focus-visible { outline: 2px solid #6654f1; outline-offset: 3px; }
.card-review-badge { display: inline-flex; align-items: center; align-self: flex-start; min-height: 23px; padding: 2px 8px; margin-top: 7px; border: 1px solid #e4dccd; border-radius: 7px; background: #faf7f0; color: #775c2d; font: 650 10px/1.25 var(--font-family, sans-serif); }
.card-review-badge.is-progress { border-color: #dfe5df; background: #f4f6f3; color: #586b5e; }
.card-review-badge.is-ready { border-color: #d9e4db; background: #f1f6f1; color: #375b43; }
@media (min-width: 1024px) {
  #screen-details #details-form.is-publication-sheet { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
}
.publication-carousel-arrow:hover:not(:disabled), .publication-copy:hover { background-color: #edf1ec; }
.publication-gallery :focus-visible { outline: 2px solid #456451; outline-offset: 3px; }
@media (max-width: 600px) {
  .publication-gallery { width: 100%; }
  .publication-carousel-track { border-radius: 14px; }
  .publication-photo img { padding: 0; }
  .publication-carousel-controls { gap: 10px; }
}
@media (max-width: 380px) {
  .publication-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Product editor: a single, scannable field per card. */
#screen-details {
  padding-bottom: 120px !important;
}

#screen-details .details-top-bar,
#screen-details .details-page-heading,
#screen-details #details-form {
  width: min(100%, 620px);
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}

#screen-details .details-top-bar {
  position: static !important;
  justify-content: flex-start;
  padding: 0 0 22px !important;
  margin-bottom: 0 !important;
  border: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
}

#screen-details .details-page-heading {
  padding: 0 !important;
  margin-bottom: 18px !important;
}

#screen-details .details-page-heading .q-title {
  font-size: clamp(25px, 4vw, 30px) !important;
  line-height: 1.15 !important;
  letter-spacing: -.7px !important;
}

#screen-details .details-page-heading .q-subtitle {
  font-size: 16px !important;
  line-height: 1.4 !important;
}

#screen-details .details-hero {
  gap: 18px;
  padding: 12px 16px;
  margin-bottom: 20px;
  border: 1px solid #d8dff1;
  border-radius: 16px;
  box-shadow: none;
}

#screen-details .details-hero-thumb {
  position: relative;
  width: 106px;
  height: 106px;
  cursor: default;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface2, #f4f2fb);
  contain: layout paint;
  flex-shrink: 0;
}
#screen-details .details-hero-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}
#screen-details .details-hero-thumb.image-loading img {
  opacity: 0;
}
#screen-details .details-hero-thumb.image-ready img {
  opacity: 1;
}

#screen-details .details-hero-title {
  font-size: 18px;
  line-height: 1.3;
}

#screen-details #details-form > .draft-photo-editor {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 17px;
  margin-bottom: 18px;
  border: 1px solid #dfe4f0;
  border-radius: 18px;
  background: #fff;
}
.draft-photo-editor-header,
.draft-photo-editor-controls { display: flex; align-items: center; gap: 10px; }
.draft-photo-editor-header { justify-content: space-between; }
.draft-photo-editor .edit-section-header { color: #24283f; font-size: 15px; font-weight: 750; }
.draft-photo-count { color: #78809a; font-size: 12px; font-weight: 700; }
.draft-photo-editor-hint { margin: -5px 0 0; color: #727a91; font-size: 12px; line-height: 1.45; }
.draft-source-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 9px; }
.draft-source-photo { position: relative; min-width: 0; overflow: hidden; aspect-ratio: 3 / 4; border-radius: 12px; background: #f1f2f7; }
.draft-source-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.draft-source-photo.is-image-error::after { position: absolute; inset: 0; display: grid; place-items: center; color: #8c91a4; content: 'Foto'; font-size: 11px; }
.draft-source-photo-label { position: absolute; top: 6px; right: auto; bottom: auto; left: 6px; padding: 5px 8px; border-radius: 999px; background: #222638c7; color: #fff; font-size: 10px; font-weight: 700; }
.draft-photo-view-status { min-height: 16px; margin: -7px 0 0; color: #727a91; font-size: 12px; line-height: 1.4; }
.draft-photo-view-controls { position: absolute; right: 5px; bottom: 5px; left: 5px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.draft-photo-side-choice { min-width: 0; min-height: 30px; padding: 0 4px; border: 1px solid #ffffffb5; border-radius: 8px; background: #222638c7; color: #fff; font: 700 10px/1 var(--font-family, sans-serif); cursor: pointer; }
.draft-photo-side-choice.is-selected { border-color: #fff; background: #6654f1; }
.draft-photo-automatic { min-height: 40px; padding: 0 13px; border: 1px solid #d8d5fb; border-radius: 11px; background: #fff; color: #5142c7; font: 700 12px/1.2 var(--font-family, inherit); cursor: pointer; }
.draft-photo-automatic:hover:not(:disabled) { background: #f7f5ff; }
.draft-photo-side-choice:disabled, .draft-photo-automatic:disabled { opacity: .55; cursor: default; }
.draft-photo-remove { position: absolute; top: 5px; right: 5px; display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid #ffffffbb; border-radius: 50%; background: #222638c7; color: #fff; font: 600 19px/1 sans-serif; cursor: pointer; }
.draft-photo-remove:disabled { opacity: .55; cursor: not-allowed; }
.draft-photo-add { min-height: 40px; padding: 0 14px; border: 1px solid #d8d5fb; border-radius: 11px; background: #f7f5ff; color: #5142c7; font: 700 12px/1.2 var(--font-family, inherit); cursor: pointer; }
.draft-photo-add:hover:not(:disabled) { background: #efedff; }
.draft-photo-add:disabled { opacity: .55; cursor: not-allowed; }
.draft-photo-limit { color: #78809a; font-size: 11px; }
.draft-photo-editor.is-loading { opacity: .72; }
.draft-photo-editor button:focus-visible { outline: 2px solid #6654f1; outline-offset: 2px; }

#screen-details .details-fields {
  display: contents;
}

#screen-details .details-fields > .edit-section-header {
  display: none;
}

#screen-details .details-fields > .edit-row {
  display: block;
  min-height: 0;
  padding: 0;
  margin-bottom: 14px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none;
  cursor: pointer;
}

#screen-details .details-fields > .edit-row.is-readonly {
  cursor: default;
}

#screen-details .edit-field-label,
#screen-details .edit-row-label-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2px;
  margin-bottom: 6px;
}

#screen-details .details-fields .edit-row-label {
  color: #13192e;
  font-size: 15px !important;
  font-weight: 700;
}

#screen-details .details-fields .edit-row > .edit-row-label {
  display: block;
  padding: 0 2px;
  margin-bottom: 6px;
}

#screen-details .details-fields .edit-row-right,
#screen-details .details-fields .edit-row-description-body {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: none !important;
  min-height: 56px;
  box-sizing: border-box;
  gap: 16px;
  padding: 12px 17px;
  border: 1px solid #d6deef;
  border-radius: 15px;
  background: #fff;
  text-align: left;
}

#screen-details .details-fields > .edit-row.is-empty:not(.is-missing) {
  box-shadow: none;
}

#screen-details .details-fields > .edit-row.is-empty:not(.is-missing) .edit-row-right,
#screen-details .details-fields > .edit-row.is-empty:not(.is-missing) .edit-row-description-body {
  border-color: #f4d8a8;
}

#screen-details .details-fields > .edit-row.is-empty:not(.is-missing) .edit-row-label,
#screen-details .details-fields > .edit-row.is-empty:not(.is-missing) .edit-missing-hint,
#screen-details .details-fields > .edit-row.is-empty:not(.is-missing) .edit-row-value,
#screen-details .details-fields > .edit-row.is-empty:not(.is-missing) .edit-row-arrow {
  color: #a75a0a;
}

#screen-details .details-fields > .edit-row.is-missing {
  box-shadow: none;
}

#screen-details .details-fields > .edit-row.is-missing .edit-row-right,
#screen-details .details-fields > .edit-row.is-missing .edit-row-description-body {
  border-color: #f87171;
}

#screen-details .details-fields > .edit-row.is-missing .edit-row-label,
#screen-details .details-fields > .edit-row.is-missing .edit-missing-hint,
#screen-details .details-fields > .edit-row.is-missing .edit-row-value,
#screen-details .details-fields > .edit-row.is-missing .edit-row-arrow {
  color: #b91c1c;
}

#screen-details .details-fields .details-field-icon {
  display: inline-flex;
  flex: 0 0 auto;
  color: #8992b2;
}

#screen-details .details-fields .edit-row-value {
  flex: 1;
  min-width: 0;
  color: #444d6e;
  font-size: 16px !important;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

#screen-details .details-fields .edit-row-value.is-empty {
  color: #929bc0;
}

#screen-details .details-fields .edit-row-arrow {
  flex: 0 0 auto;
  margin-left: auto;
  color: #8793b2;
  font-size: 24px;
}

#screen-details .details-fields .edit-row.is-multiline > div:first-child {
  margin-bottom: 6px;
}

#screen-details .details-fields .edit-row-description-body {
  line-height: 1.5;
  color: #444d6e;
}

#screen-details .details-advanced {
  margin: 4px 0 22px;
  border: 1px solid #d6deef;
  border-radius: 15px;
  background: #fff;
  overflow: hidden;
}

#screen-details .details-advanced > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 19px;
  color: #20284a;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

#screen-details .details-advanced > summary::-webkit-details-marker { display: none; }
#screen-details .details-advanced > summary span { transition: transform .2s; }
#screen-details .details-advanced[open] > summary span { transform: rotate(180deg); }

#screen-details .details-advanced > .model-selector-card,
#screen-details .details-advanced > .edit-section-card {
  margin: 0 14px 14px !important;
  box-shadow: none;
}

#details-save-wrap { display: none; }
#details-save-wrap[hidden] { display: none !important; }
body:has(#screen-details.active) #details-save-wrap:not([hidden]) { display: block; }
#details-save-wrap {
  position: fixed;
  z-index: 1002;
  left: 50%;
  bottom: 0;
  width: min(100%, 680px);
  box-sizing: border-box;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff 18%);
}

#details-save-wrap .details-save-top-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  background: linear-gradient(105deg, #6340f0, #4d83f4);
  color: #fff;
  font-size: 17px;
  box-shadow: 0 8px 22px rgba(86, 86, 234, .2);
}

#details-save-wrap .details-save-top-btn span { font-size: 28px; font-weight: 400; line-height: 0; }

.photo-refund-dialog {
  width: min(460px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 36px);
  box-sizing: border-box;
  overflow-y: auto;
  padding: 22px;
  border: 1px solid #e4e7f1;
  border-radius: 24px;
  background: #fff;
  color: #171c34;
  box-shadow: 0 24px 80px rgba(21, 21, 45, .24);
}

.photo-refund-dialog[open] {
  position: fixed;
  inset: 0;
  margin: auto;
}

.photo-refund-dialog::backdrop {
  background: rgba(22, 26, 48, .58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.photo-refund-dialog form { display: block; }
.photo-refund-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.photo-refund-eyebrow { display: block; margin-bottom: 7px; color: #6a58e8; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.photo-refund-dialog h2 { margin: 0; color: #171c34; font-size: 23px; font-weight: 800; line-height: 1.2; letter-spacing: -.4px; }
.photo-refund-close {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  margin: -4px -4px 0 0;
  border: 0;
  border-radius: 50%;
  background: #f3f4fa;
  color: #68718d;
  font: 400 25px/1 var(--font-family, inherit);
  cursor: pointer;
}
.photo-refund-dialog .photo-refund-intro { margin: 10px 0 16px; color: #6f7894; font-size: 14px; line-height: 1.5; }
.photo-refund-preview-card { position: relative; display: grid; place-items: center; min-height: 176px; overflow: hidden; border: 1px solid #e7e9f2; border-radius: 16px; background: linear-gradient(145deg, #f6f6fb, #f0f1f8); }
.photo-refund-preview-frame { position: relative; display: grid; width: 100%; min-height: 176px; box-sizing: border-box; padding: 10px; place-items: center; overflow: hidden; }
.photo-refund-preview-frame img { display: block; width: auto; height: auto; max-width: 100%; max-height: 260px; object-fit: contain; }
.photo-refund-preview-frame.image-loading::after { content: ''; position: absolute; width: 26px; height: 26px; border: 3px solid #d8d5fb; border-top-color: #6654f1; border-radius: 50%; animation: refund-image-spin .75s linear infinite; }
.photo-refund-preview-fallback { display: none; color: #858da6; font-size: 13px; }
.photo-refund-preview-frame.image-error .photo-refund-preview-fallback { display: block; }
.photo-refund-preview-frame.image-error img { display: none; }
.photo-refund-side { position: absolute; right: 10px; bottom: 10px; padding: 5px 9px; border: 1px solid rgba(255,255,255,.7); border-radius: 999px; background: rgba(255,255,255,.9); color: #4e5876; font-size: 11px; font-weight: 800; box-shadow: 0 2px 8px rgba(20,25,50,.08); }
.photo-refund-reason-label { display: block; margin: 16px 0 7px; color: #272d47; font-size: 13px; font-weight: 800; }
.photo-refund-dialog textarea { display: block; width: 100%; min-height: 112px; box-sizing: border-box; resize: vertical; padding: 13px 14px; border: 1px solid #dce1ef; border-radius: 13px; outline: none; background: #fff; color: #232943; font: 400 16px/1.45 var(--font-family, inherit); }
.photo-refund-dialog textarea::placeholder { color: #9299ad; }
.photo-refund-dialog textarea:focus { border-color: #7563f0; box-shadow: 0 0 0 3px rgba(102,84,241,.12); }
.photo-refund-dialog .photo-refund-hint { margin: 6px 0 18px; color: #858da6; font-size: 11px; }
.photo-refund-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.photo-refund-dialog-actions button { min-height: 46px; padding: 0 17px; border: 0; border-radius: 12px; font: 700 14px/1 var(--font-family, inherit); cursor: pointer; }
.photo-refund-dialog-actions #photo-refund-cancel { background: #f0f1f7; color: #5f6884; }
.photo-refund-dialog-actions #photo-refund-submit { background: linear-gradient(105deg, #6340f0, #4d83f4); color: #fff; box-shadow: 0 5px 14px rgba(86,86,234,.2); }
.photo-refund-dialog-actions button:disabled { opacity: .58; cursor: wait; }
@keyframes refund-image-spin { to { transform: rotate(360deg); } }

.photo-regeneration-choice-dialog { position: relative; }
.photo-regeneration-choice-dialog .generation-choice-close { position: absolute; top: 12px; right: 14px; }
.photo-regeneration-choice-options { display: grid; gap: 9px; }
.photo-regeneration-choice-options button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 16px;
  border: 1px solid #d6deef;
  border-radius: 12px;
  background: #fff;
  color: #20284a;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.photo-regeneration-choice-options button span { color: #7d87a5; font-size: 12px; font-weight: 400; }
.photo-regeneration-choice-options button:hover { border-color: #6654f1; background: #f7f5ff; }
.photo-regeneration-choice-cancel { display: block; margin: 16px auto 0; padding: 7px 14px; border: 0; background: transparent; color: #66708e; cursor: pointer; }

@media (min-width: 1024px) {
  #screen-details .details-top-bar,
  #screen-details .details-page-heading,
  #screen-details #details-form { width: min(100%, 1080px); }

  #screen-details #details-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    column-gap: 20px;
  }

  #screen-details #details-form > .details-hero,
  #screen-details #details-form > .details-missing-summary,
  #screen-details #details-form > .details-advanced,
  #screen-details #edit-row-seo-desc { grid-column: 1 / -1; }

  #details-save-wrap {
    left: calc(50% + var(--desktop-sidebar-width, 186px) / 2);
    width: min(1080px, calc(100% - var(--desktop-sidebar-width, 186px) - 48px));
  }
}

@media (max-width: 1023px) {
  #screen-details .details-top-bar,
  #screen-details .details-page-heading,
  #screen-details #details-form { width: min(100%, 620px); }
  body:has(#screen-details.active) #bottom-bar-main { display: none !important; }
  #screen-details.active { height: 100dvh !important; overflow-y: auto; }
}

@media (max-width: 600px) {
  #screen-details { padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 112px !important; }
  #screen-details .details-hero-thumb { width: 88px; height: 88px; }
  #screen-details .details-hero-title { font-size: 16px; }
  #screen-details .details-fields .edit-row-value { font-size: 15px !important; }
  .photo-refund-dialog { width: calc(100vw - 28px); max-width: calc(100vw - 28px); padding: 19px; border-radius: 22px; }
  .photo-refund-dialog h2 { font-size: 21px; }
  .photo-refund-dialog .photo-refund-intro { font-size: 13px; }
  .photo-refund-preview-card, .photo-refund-preview-frame { min-height: 166px; height: auto; }
  .photo-refund-preview-frame img { max-height: 210px; }
  .photo-refund-dialog-actions { display: grid; grid-template-columns: 1fr 1.35fr; }
  .photo-refund-dialog-actions button { min-height: 48px; padding-inline: 10px; }
}

.publication-support-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  padding: 10px 16px;
  border: 1px solid #d8d5fb;
  border-radius: 12px;
  background: #ffffff;
  color: #5142c7;
  font: 700 13.5px/1.3 var(--font-family, inherit);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.publication-support-btn:hover {
  background: #f7f5ff;
  border-color: #b8b0fb;
}

/* Product sheet: no boxes behind the back button or the photos, bigger photo */
#screen-details .details-top-bar { padding-bottom: 8px !important; }
.publication-gallery { width: 100%; max-width: none; }
.publication-carousel-track { aspect-ratio: 3 / 4; max-height: none; background: transparent !important; border-radius: 20px; }
.publication-photo { padding: 0; }
.publication-photo img { padding: 0; border-radius: 20px; object-fit: cover; }

/* ── Scheda prodotto riorganizzata: foto, prezzo e testi prima, azioni compatte ── */
#details-form.is-publication-sheet { gap: 16px; }
.pub-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
#details-form .pub-quick .pub-quick-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; margin: 0;
  padding: 8px 12px; border: 1px solid var(--border) !important; border-radius: 12px; background: var(--surface2) !important;
  box-shadow: none !important; color: var(--text) !important; font: 700 13.5px/1.2 var(--font-family, sans-serif); cursor: pointer;
}
#details-form .pub-quick .pub-quick-btn:disabled { opacity: .55; cursor: default; }
#details-form .pub-quick .pub-quick-btn:hover:not(:disabled) { border-color: var(--primary) !important; }
.pub-price { margin: 10px 0 0; color: var(--text); font-size: 28px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.pub-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pub-chip { padding: 5px 11px; border-radius: 999px; background: var(--surface2); color: var(--text-2, var(--text)); font-size: 12.5px; font-weight: 600; }
.pub-desc .pub-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.pub-desc.is-open .pub-clamp { display: block; -webkit-line-clamp: unset; overflow: visible; }
.pub-more { margin-top: 8px; padding: 6px 0; border: 0; background: transparent; color: var(--primary); font: 700 13.5px var(--font-family, sans-serif); cursor: pointer; }
.pub-more[hidden] { display: none; }
.pub-details-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.pub-details-header h2 { margin: 0; color: var(--hint); font-size: 12px; font-weight: 650; }
.pub-details-header .publication-edit { margin: 0; min-height: 36px; padding: 4px 0; font-size: 13.5px; }
.publication-specs.pub-list { display: block; padding: 0; border-block: 0; }
.publication-specs.pub-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.publication-specs.pub-list dt { flex: 0 0 auto; margin: 0; }
.publication-specs.pub-list dd { text-align: right; }
.pub-bar { position: fixed; bottom: 0; left: 50%; z-index: 40; width: min(100%, 620px); box-sizing: border-box; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--bg) 94%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transform: translateX(-50%); }
@media (min-width: 1024px) { #rs .pub-bar { left: calc(50% + var(--desktop-sidebar-width, 186px) / 2); } }
.pub-primary { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; border: 0; border-radius: 14px; background: var(--primary); color: var(--on-primary, #fff); box-shadow: none; font: 800 15px/1.2 var(--font-family, sans-serif); cursor: pointer; }
.pub-primary:disabled { opacity: .55; cursor: default; }

/* Didascalia e punti sopra la foto per guadagnare spazio verticale */
.publication-gallery { position: relative; }
#details-form .publication-carousel-caption { position: absolute; top: 10px; left: 10px; z-index: 2; min-height: 0; padding: 4px 11px; border-radius: 999px; background: rgba(0,0,0,.5); color: #fff !important; font-size: 12px; pointer-events: none; }
#details-form .publication-carousel-caption strong { color: #fff !important; }
#details-form .publication-carousel-caption span { display: none; }
.publication-carousel-controls { position: absolute; bottom: 10px; left: 0; right: 0; z-index: 2; pointer-events: none; }
.publication-carousel-dots { pointer-events: auto; padding: 0 6px; border-radius: 999px; background: rgba(0,0,0,.35); }
.publication-carousel-dot::before { background: rgba(255,255,255,.65) !important; }
.publication-carousel-dot[aria-current="true"]::before { background: #fff !important; }
@media (max-width: 600px) { .publication-carousel-arrow { display: none; } }

/* Barra fissa con due pulsanti: copia titolo e copia descrizione */
.pub-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#details-form .pub-bar .pub-bar-copy {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; margin: 0;
  padding: 8px 10px; border: 0 !important; border-radius: 14px; background: var(--primary) !important; box-shadow: none !important;
  color: var(--on-primary, #fff) !important; font: 800 14px/1.2 var(--font-family, sans-serif); cursor: pointer;
}
#details-form .pub-bar .pub-bar-copy:disabled { opacity: .55; cursor: default; }
.pub-publish { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; margin-top: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface2); color: var(--text); font: 700 14.5px/1.2 var(--font-family, sans-serif); cursor: pointer; }

/* Il messaggio di conferma sta sopra la barra fissa, non sotto */
body:has(#screen-details.active .pub-bar) .toast-region { bottom: calc(96px + var(--safe-b, 0px)); }
#details-form .pub-bar .pub-bar-copy.copied { background: var(--green, #1f9d55) !important; }
