.product-modal-media {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pm-selection-carousel {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pm-carousel-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.pm-carousel-item {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  padding: 2px;
  cursor: pointer;
  flex: 0 0 auto;
}

.pm-carousel-item.active {
  border-color: var(--primary-color, #2563eb);
}

.pm-carousel-item img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.pm-carousel-nav {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

@media (max-width: 800px) {
  .product-modal {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .product-modal-content {
    flex-direction: column;
  }

  .product-modal-media {
    width: 100%;
  }

  .product-modal-left {
    text-align: center;
    gap: 10px;
  }

  .pm-image {
    max-width: 100%;
    margin: auto;
  }

  .pm-add-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
  }
}

.item-open-product {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.item-open-product:hover { text-decoration: underline; }
.item-open-product:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }

/* One description disclosure for webshop and orderlist, at every viewport. */
.product-modal-overlay .pm-description {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-muted);
  white-space: pre-line;
  max-height: none;
  overflow: hidden;
  padding-right: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
.product-modal-overlay .pm-description.is-expanded {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}
.product-modal-overlay .pm-description-toggle {
  display: block;
  align-self: flex-start;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 8px 0;
  background: transparent;
  color: var(--primary, #006653);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.product-modal-overlay .pm-description:empty + .pm-description-toggle { display: none; }
.pm-description-less { display: none; }
.pm-description-toggle[aria-expanded="true"] .pm-description-more { display: none; }
.pm-description-toggle[aria-expanded="true"] .pm-description-less { display: inline; }
.product-modal-overlay .product-modal-right { overflow: visible; flex-shrink: 0; }
@media (max-width: 768px) {
  .product-modal-overlay .pm-description { font-size: 14px; }
  .product-modal-overlay .product-modal { max-height: 90vh; max-height: 90dvh; }
}

.product-modal .pm-uom {
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.4;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
