/* Huck Media – leistungen-detail.css (2026-11-04)
   Grosse Detailansicht je Leistung (dialog.hm-detail), gesteuert von scripts/leistungen-detail.js.
   Eigene Datei, laedt nach style.css + leistungen-bilder.css – style.css bleibt unveraendert. */
html.hm-detail-lock, html.hm-detail-lock body { overflow: hidden; }
details.sub > summary[aria-haspopup] { cursor: url("../img/cursor-pointer.svg") 6 4, pointer; }
details.sub > summary[aria-haspopup]:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 12px; }

dialog.hm-detail {
  border: 0; padding: 0; margin: auto; background: transparent; color: var(--ink);
  width: min(980px, calc(100vw - 48px)); max-width: none; max-height: calc(100dvh - 48px);
  overflow: visible; font-family: inherit;
}
dialog.hm-detail::backdrop { background: rgba(10, 12, 10, .78); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
dialog.hm-detail[open] { animation: hmDetailIn .22s ease-out; }
@keyframes hmDetailIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

.hm-detail-card {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  background: var(--paper, #fff); border-radius: 22px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45); max-height: calc(100dvh - 48px);
}
.hm-detail-media { position: relative; background: #f4f6f0; aspect-ratio: 1 / 1; min-height: 0; max-height: calc(100dvh - 48px); }
.hm-detail-media picture, .hm-detail-media img { display: block; width: 100%; height: 100%; }
.hm-detail-media img { object-fit: cover; }
.hm-detail-body {
  display: flex; flex-direction: column; gap: 14px; padding: 44px 40px 30px;
  overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.hm-detail-kicker { margin: 0; color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; }
.hm-detail-title { margin: 0; padding-right: 36px; color: var(--ink); font-size: clamp(24px, 2.6vw, 32px); font-weight: 900; line-height: 1.15; letter-spacing: .01em; }
.hm-detail-price .price-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.hm-detail-price .price { color: var(--green); font-size: 26px; font-weight: 900; }
.hm-detail-price .price-unit { color: var(--mute); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.hm-detail-text { margin: 4px 0 0; color: var(--ink); font-size: 16px; line-height: 1.65; }
.hm-detail-actions { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 14px; flex-wrap: wrap; }
.hm-detail-ask {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 26px;
  border: 2px solid var(--green); border-radius: var(--click-radius, 12px); background: var(--green); color: #fff !important;
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none !important;
}
.hm-detail-ask:hover { background: #fff; color: var(--green) !important; }
.hm-detail-ask:focus-visible, .hm-detail-x:focus-visible, .hm-detail-nav:focus-visible, .hm-detail .cart-add:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.hm-detail .cart-add.hm-detail-cart { width: 44px; height: 44px; margin: 0; flex: 0 0 44px; }
.hm-detail .cart-add.hm-detail-cart svg { width: 22px; height: 22px; }
.hm-detail-count { margin: 0; color: var(--mute); font-size: 12px; letter-spacing: .08em; min-height: 1em; }

.hm-detail-x {
  position: absolute; top: 14px; right: 14px; z-index: 3; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--paper, #fff); color: var(--ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  cursor: url("../img/cursor-pointer.svg") 6 4, pointer;
}
.hm-detail-x:hover { background: var(--green); color: #fff; }
.hm-detail-x svg { width: 20px; height: 20px; }
.hm-detail-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .9); color: var(--ink, #626262); box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
  cursor: url("../img/cursor-pointer.svg") 6 4, pointer; transition: background .15s, color .15s;
}
.hm-detail-nav:hover { background: var(--green); color: #fff; }
.hm-detail-nav svg { width: 22px; height: 22px; }
.hm-detail-prev { left: 14px; }
.hm-detail-next { right: 14px; }
.hm-detail-nav[hidden] { display: none; }

/* Dark Mode */
html[data-theme="dark"] .hm-detail-card { background: #1a1d17; box-shadow: 0 24px 70px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06); }
html[data-theme="dark"] .hm-detail-media { background: #22261f; }
html[data-theme="dark"] .hm-detail-media img { filter: brightness(.92); }
html[data-theme="dark"] .hm-detail-title { color: #e6e6e6; }
html[data-theme="dark"] .hm-detail-x { background: #2a2e26; color: #e6e6e6; }
html[data-theme="dark"] .hm-detail-x:hover { background: var(--green); color: #121412; }
html[data-theme="dark"] .hm-detail-nav { background: rgba(26, 29, 23, .9); color: #e6e6e6; }
html[data-theme="dark"] .hm-detail-ask:hover { background: transparent; }

/* Tablet */
@media (max-width: 860px) {
  .hm-detail-card { grid-template-columns: 1fr; overflow-y: auto; }
  .hm-detail-media { aspect-ratio: 4 / 3; }
  .hm-detail-body { overflow: visible; padding: 26px 26px 26px; }
}
/* Mobil: Vollbild-Sheet */
@media (max-width: 600px) {
  dialog.hm-detail { width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; inset: 0; }
  dialog.hm-detail[open] { animation: hmDetailUp .26s ease-out; }
  @keyframes hmDetailUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .hm-detail-card { height: 100dvh; max-height: 100dvh; border-radius: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
  .hm-detail-media { flex: 0 0 auto; aspect-ratio: auto; height: min(100vw, 56dvh); width: 100%; }
  .hm-detail-body { flex: 1 0 auto; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); gap: 12px; }
  .hm-detail-title { font-size: 24px; padding-right: 0; }
  .hm-detail-text { font-size: 15px; }
  .hm-detail-actions { position: sticky; bottom: 0; margin: auto -20px 0; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); background: var(--paper, #fff); border-top: 1px solid var(--line); }
  html[data-theme="dark"] .hm-detail-actions { background: #1a1d17; }
  .hm-detail-ask { flex: 1 1 auto; }
  .hm-detail-x { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
  .hm-detail-nav { top: auto; bottom: 12px; transform: none; width: 40px; height: 40px; }
  .hm-detail-prev { left: auto; right: 60px; }
  .hm-detail-next { right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  dialog.hm-detail[open] { animation: none; }
}

/* 04.11.2026: MwSt.-Hinweis im Detail-Fenster */
.hm-detail-vat { display: block; margin-top: 4px; color: var(--mute); font-size: 12px; font-weight: 600; }

/* 09.11.2026: „ab“/„from“ vor Richtpreisen – kompakt, Originalfarben */
.price-from{font-size:.62em;font-weight:700;letter-spacing:.02em;margin-right:.18em;vertical-align:baseline;text-transform:none;opacity:.95}
.price-wrap{min-width:8.5rem}
.price{white-space:nowrap}
