/* VE P1 UI: one source of truth for card headings, reliable gallery alignment.
   Loaded last after responsive stylesheet to avoid layout regressions. */

/* Catalog category and product list titles: one visual line and ellipsis.
   The full text remains in the DOM and in each title attribute. */
html body :is(.equipment-tile, .catalog-product-main) > .ve-catalog-card-title {
  display:block !important;
  box-sizing:border-box;
  align-self:stretch;
  flex:0 0 auto;
  width:100%;
  min-width:0;
  max-width:100%;
  height:1.3em;
  min-height:1.3em;
  max-height:1.3em;
  line-height:1.3;
  margin-bottom:12px;
  overflow:hidden !important;
  white-space:nowrap !important;
  text-overflow:ellipsis !important;
  overflow-wrap:normal !important;
  word-break:normal !important;
  -webkit-line-clamp:unset !important;
  -webkit-box-orient:initial !important;
}
/* Gallery is a sibling grid column of the heading, not positioned below it.
   A long title can wrap in the description column without shifting the photo. */
html body .catalog-detail-layout .ve-detail-copy > h1,
html body .product-detail-layout .ve-detail-copy > h1 {
  max-width:100%;
  margin-top:0;
  overflow-wrap:anywhere;
  white-space:normal;
}
html body .catalog-detail-layout .detail-photographs,
html body .product-detail-layout .detail-photographs {align-self:start;}

/* Admin destructive action belongs at the very bottom, styled like delete. */
body.admin-area .ve-admin-session-danger {
  display:flex;
  justify-content:flex-start;
  margin-top:38px;
  padding-top:22px;
  border-top:1px solid var(--line-soft,#ddd);
}
body.admin-area .ve-admin-session-danger form {margin:0;}
body.admin-area .ve-admin-session-danger button.ve-danger-outline {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:auto;
  min-height:40px;
  padding:9px 15px;
  color:#a12730 !important;
  background:transparent !important;
  border:1px solid #a12730 !important;
  border-radius:10px;
  box-shadow:none !important;
  font-weight:600;
  cursor:pointer;
}
body.admin-area .ve-admin-session-danger button.ve-danger-outline:hover,
body.admin-area .ve-admin-session-danger button.ve-danger-outline:focus-visible {
  background:rgba(161,39,48,.09) !important;
  border-color:#a12730 !important;
}
html[data-theme="dark"] body.admin-area .ve-admin-session-danger button.ve-danger-outline {
  color:#ff989e !important;
  border-color:#ff989e !important;
}
html[data-theme="dark"] body.admin-area .ve-admin-session-danger button.ve-danger-outline:hover,
html[data-theme="dark"] body.admin-area .ve-admin-session-danger button.ve-danger-outline:focus-visible {
  background:rgba(255,152,158,.12) !important;
}
