/* V6.32 – jednotný obrázek bez fotografie a volba vlastního popisu bez AI. */
.nap-listing-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  background: #f2f1ed;
}

.listing-image > .nap-listing-placeholder,
.category-image > .nap-listing-placeholder,
.seller-card-image > .nap-listing-placeholder {
  aspect-ratio: 4 / 3;
}

.no-photo {
  min-height: 0 !important;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 0 !important;
  background: #f2f1ed !important;
}

.no-photo > .nap-listing-placeholder,
.detail-media > .nap-listing-placeholder {
  width: 100%;
  height: 100%;
}

.nap-favorite-media > .nap-listing-placeholder,
.nap-manage-row > .nap-listing-placeholder {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nap-description-choice-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: .75rem;
}

.nap-description-choice-actions > button {
  width: 100%;
  min-height: 3.2rem;
  padding-inline: .8rem;
  line-height: 1.2;
}

.nap-description-choice-actions > button:focus-visible {
  outline: 3px solid #397ee8;
  outline-offset: 2px;
}

.nap-description-choice-actions .dialog-secondary:disabled {
  cursor: not-allowed;
  opacity: .45;
}

@media (max-width: 540px) {
  .nap-description-choice-actions { grid-template-columns: 1fr; }
}

/* V6.34 – volitelné údaje o produktu, dopravě a vrácení. */
.nap-merchant-fields {
  grid-column: 1 / -1;
  width: 100%;
  margin: .25rem 0;
  overflow: hidden;
  border: 1px solid #d8d6cf;
  border-radius: 14px;
  background: #faf9f5;
}

.nap-merchant-fields[hidden] { display: none; }

.nap-merchant-fields > summary {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: 1rem 3rem 1rem 1.1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.nap-merchant-fields > summary::-webkit-details-marker { display: none; }

.nap-merchant-fields > summary::after {
  position: absolute;
  top: 50%;
  right: 1.15rem;
  content: "+";
  font-size: 1.45rem;
  line-height: 1;
  transform: translateY(-50%);
}

.nap-merchant-fields[open] > summary::after { content: "−"; }

.nap-merchant-fields > summary strong {
  color: #171717;
  font-size: 1rem;
}

.nap-merchant-fields > summary small,
.nap-merchant-help,
.nap-merchant-return-note {
  color: #686761;
  font-size: .85rem;
  line-height: 1.45;
}

.nap-merchant-fields-body {
  margin: 0;
  padding: 0 1.1rem 1.1rem;
  border: 0;
  min-width: 0;
}

.nap-merchant-help { margin: 0 0 .9rem; }

.nap-merchant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.nap-merchant-grid > label {
  display: grid;
  gap: .4rem;
  min-width: 0;
}

.nap-merchant-grid > label > span {
  font-size: .86rem;
  font-weight: 700;
}

.nap-merchant-grid input,
.nap-merchant-grid select {
  width: 100%;
  min-width: 0;
}

.nap-merchant-span { grid-column: 1 / -1; }

.nap-merchant-return-note {
  margin: .9rem 0 0;
  padding: .75rem .85rem;
  border-left: 3px solid #e1bd12;
  background: #fff9d9;
}

/* Údaje zobrazené na detailu prodejního inzerátu. */
.nap-commerce-details {
  margin: 1.5rem 0;
  padding: 1.15rem;
  border: 1px solid #dedbd1;
  border-radius: 16px;
  background: #faf9f5;
}

.nap-commerce-details h2 {
  margin: 0 0 .9rem;
  font-size: 1.15rem;
  line-height: 1.3;
}

.nap-commerce-note {
  margin: -.35rem 0 .85rem;
  color: #686761;
  font-size: .86rem;
}

.nap-commerce-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.nap-commerce-list > div {
  display: grid;
  grid-template-columns: minmax(7rem, .8fr) minmax(0, 1.2fr);
  gap: .75rem;
  padding: .7rem 0;
  border-top: 1px solid #e5e2da;
}

.nap-commerce-list > div:nth-child(-n + 2) { border-top: 0; }
.nap-commerce-list > div:nth-child(odd) { padding-right: 1rem; }
.nap-commerce-list > div:nth-child(even) { padding-left: 1rem; }

.nap-commerce-list dt {
  color: #686761;
  font-size: .86rem;
  font-weight: 700;
}

.nap-commerce-list dd {
  min-width: 0;
  margin: 0;
  color: #171717;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .nap-merchant-grid,
  .nap-commerce-list { grid-template-columns: 1fr; }

  .nap-merchant-span { grid-column: auto; }

  .nap-commerce-list > div,
  .nap-commerce-list > div:nth-child(odd),
  .nap-commerce-list > div:nth-child(even) {
    grid-template-columns: minmax(6.5rem, .8fr) minmax(0, 1.2fr);
    padding: .7rem 0;
    border-top: 1px solid #e5e2da;
  }

  .nap-commerce-list > div:first-child { border-top: 0; }
}

/* V6.45: the no-photo illustration must fit the frame without cropping. */
.listing-image > img.nap-listing-placeholder,
.category-image > img.nap-listing-placeholder,
.seller-card-image > img.nap-listing-placeholder,
.no-photo > img.nap-listing-placeholder,
.detail-media > img.nap-listing-placeholder,
.gallery-stage > img.nap-listing-placeholder,
.thumbnails img.nap-listing-placeholder,
.nap-favorite-media img.nap-listing-placeholder {
  object-fit: contain;
  object-position: center;
  background: #f2f1ed;
}
.listing-image > img.nap-listing-placeholder {
  min-height: 0;
  aspect-ratio: auto;
}

/* Keep the existing photo overlay. For a placeholder, the owner toolbar
   has its own row so neither the icon nor the caption is covered. */
.listing-card:has(.listing-image > .nap-listing-placeholder) {
  display: flex;
  flex-direction: column;
}
.listing-card:has(.listing-image > .nap-listing-placeholder) > .nap-card-management {
  position: static;
  order: -1;
  flex-wrap: wrap;
  align-self: stretch;
  box-sizing: border-box;
  padding: 12px 4rem 12px 12px;
  margin: 0;
  background: #f2f1ed;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
