/* Existing ANSAMIO design, with compact service selection and persistent navigation. */
:root { --header-height: 104px; --selection-bar-height: 146px; }
html { scroll-padding-top: calc(var(--header-height) + 24px); }
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--canvas);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 18px #0d0f1407;
}
.quote-card { top: calc(var(--header-height) + 22px); }
body[data-page="servizi.html"] { padding-bottom: calc(var(--selection-bar-height) + 18px); }
body[data-page="servizi.html"] .catalog-filters {
  justify-content: flex-start;
  flex-wrap: nowrap;
  max-width: none;
  margin-bottom: 22px;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding: 5px 4px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--catalog-line-hover) transparent;
}
body[data-page="servizi.html"] .catalog-filters button {
  flex: 0 0 auto;
  scroll-snap-align: start;
  white-space: nowrap;
  font-size: 11px;
  padding: 11px 16px;
  min-height: 44px;
}
body[data-page="servizi.html"] .catalog-toolbar { max-width: none; margin-bottom: 18px; }
body[data-page="servizi.html"] .catalog-search { max-width: 620px; }
body[data-page="servizi.html"] .catalog-toolbar input { min-height: 48px; }
body[data-page="servizi.html"] .catalog-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
body[data-page="servizi.html"] .catalog-results { min-width: 0; }
body[data-page="servizi.html"] .catalog-count { text-align: left; margin: 0 0 16px; }
body[data-page="servizi.html"] .catalog-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
body[data-page="servizi.html"] .service-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  gap: 12px;
  padding: 20px;
  border-radius: 20px;
}
body[data-page="servizi.html"] .service-card-top { grid-column: 1 / -1; align-items: center; }
body[data-page="servizi.html"] .service-card .section-label { margin: 0; padding: 5px 9px; font-size: 8px; }
body[data-page="servizi.html"] .service-mark { width: 27px; height: 27px; font-size: 9px; border-radius: 50%; }
body[data-page="servizi.html"] .service-card h2 { grid-column: 1; align-self: center; font-size: 21px; line-height: 1.2; }
body[data-page="servizi.html"] .service-desc { display: none; }
body[data-page="servizi.html"] .service-price {
  grid-column: 2;
  grid-row: 2;
  justify-content: flex-end;
  gap: 2px 5px;
  margin: 0;
  text-align: right;
  max-width: 180px;
}
body[data-page="servizi.html"] .service-price strong { font-size: 27px; letter-spacing: -.04em; }
body[data-page="servizi.html"] .service-price > span { font-size: 9px; }
body[data-page="servizi.html"] .service-price small { font-size: 9px; }
body[data-page="servizi.html"] .service-inclusions { grid-column: 1 / -1; margin: 0; border-radius: 12px; }
body[data-page="servizi.html"] .service-inclusions summary { padding: 10px 13px; min-height: 44px; font-size: 11px; }
body[data-page="servizi.html"] .service-card.is-selected { border-color: var(--catalog-label-ink); }
.service-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
.service-details-link, .service-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 550;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.service-details-link { border: 1px solid var(--catalog-line); color: var(--foreground); background: var(--catalog-card); }
.service-details-link .icon { width: 14px; height: 14px; }
.service-add { background: var(--foreground); color: var(--canvas); border: 1px solid var(--foreground); }
.service-add > span { font-size: 18px; line-height: 1; }
.service-add[aria-pressed="true"] { background: var(--catalog-label); color: var(--catalog-label-ink); border-color: var(--catalog-line-hover); }
.service-details-link:hover { background: var(--catalog-inset); }
.service-add:hover { box-shadow: 0 3px 10px #14261c12; }
.selection-summary {
  position: fixed;
  inset: auto 0 0;
  z-index: 60;
  padding: 12px var(--gutter) max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--catalog-line);
  background: var(--catalog-card);
  color: var(--foreground);
  box-shadow: 0 -8px 30px #14261c12;
}
.selection-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.selection-head h2 { display: none; }
.selection-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 32px; padding: 0; background: transparent; font-size: 12px; color: var(--foreground); }
.selection-toggle > span:last-child { font-size: 20px; transform: rotate(180deg); }
.selection-toggle[aria-expanded="true"] > span:last-child { transform: none; }
.selection-detail { max-height: min(36dvh, 300px); overflow-y: auto; overscroll-behavior: contain; }
.selection-detail > p { font-size: 12px; line-height: 1.8; margin: 10px 0 18px; }
.selection-items { list-style: none; margin: 0 0 12px; padding: 0; }
.selection-items li { display: grid; grid-template-columns: minmax(0, 1fr) auto 32px; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--catalog-line); font-size: 11px; line-height: 1.55; }
.selection-items li > span { min-width: 0; overflow-wrap: anywhere; }
.selection-items strong { font-weight: 550; white-space: nowrap; font-size: 11px; }
.selection-remove { width: 32px; height: 32px; border-radius: 50%; background: var(--catalog-inset); color: var(--foreground); font-size: 20px; }
.selection-totals { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 5px; }
.selection-totals > div { display: flex; gap: 8px; align-items: baseline; }
.selection-totals span { font-size: 10px; color: var(--soft); }
.selection-totals strong { font-size: 17px; font-weight: 600; letter-spacing: -.025em; }
.selection-note { font-size: 9px; margin-bottom: 10px; }
.selection-request { width: 100%; min-height: 44px; padding: 11px 16px; font-size: 11px; border-radius: 999px; }
.selection-request[aria-disabled="true"] { opacity: .55; cursor: default; }
body[data-page="servizi.html"] .assistant-dock { bottom: calc(var(--selection-bar-height) + 16px); }
body[data-page="servizi.html"] .assistant-panel {
  max-height: calc(100dvh - var(--selection-bar-height) - var(--header-height) - 100px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
body[data-page="servizi.html"] .chat-messages { min-height: 0; flex: 1 1 auto; }
.selection-summary :is(a, button):focus-visible, .service-actions :is(a, button):focus-visible { outline: 3px solid var(--catalog-label-ink); outline-offset: 3px; }
@media (max-width: 899px) { :root { --header-height: 88px; } }
@media (max-width: 620px) {
  :root { --header-height: 82px; }
  body[data-page="servizi.html"] .page-intro { padding-block: 30px; }
  body[data-page="servizi.html"] .page-intro h1 { font-size: clamp(32px, 8vw, 43px); }
  body[data-page="servizi.html"] .catalog-filters { margin-bottom: 15px; }
  .selection-items li { grid-template-columns: minmax(0, 1fr) auto 44px; }
  .selection-remove { width: 44px; height: 44px; }
}
@media (min-width: 700px) {
  body[data-page="servizi.html"] .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  body[data-page="servizi.html"] .service-card { display: flex; flex-direction: column; gap: 16px; padding: 23px; }
  body[data-page="servizi.html"] .service-card h2 { align-self: stretch; font-size: 23px; }
  body[data-page="servizi.html"] .service-desc { display: block; min-height: 0; margin: 0; font-size: 12px; line-height: 1.7; }
  body[data-page="servizi.html"] .service-price { max-width: none; justify-content: flex-start; text-align: left; }
  body[data-page="servizi.html"] .service-price strong { font-size: 30px; }
  .service-actions { margin-top: auto; }
  .selection-summary { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 4px 24px; }
  .selection-head, .selection-detail { grid-column: 1 / -1; }
  .selection-totals, .selection-note { grid-column: 1; }
  .selection-request { grid-column: 2; grid-row: 3 / 5; align-self: center; }
}
@media (min-width: 1280px) {
  :root { --selection-bar-height: 0px; }
  body[data-page="servizi.html"] { padding-bottom: 0; }
  body[data-page="servizi.html"] .catalog-workspace { grid-template-columns: minmax(0, 1fr) 264px; gap: 28px; }
  body[data-page="servizi.html"] .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body[data-page="servizi.html"] .service-card { padding: 20px; }
  body[data-page="servizi.html"] .service-card h2 { font-size: 21px; }
  body[data-page="servizi.html"] .catalog-filters { justify-content: center; }
  .selection-summary { display: block; position: sticky; top: calc(var(--header-height) + 22px); padding: 22px; border: 1px solid var(--catalog-line); border-radius: 22px; box-shadow: var(--catalog-shadow); }
  .selection-head { margin-bottom: 18px; }
  .selection-head h2 { display: block; font-size: 20px; line-height: 1.25; }
  .selection-toggle { display: none; }
  .selection-detail { max-height: min(38dvh, 360px); }
  .selection-totals { flex-direction: column; gap: 10px; padding-top: 10px; }
  .selection-totals > div { justify-content: space-between; }
  .selection-note { margin-top: 15px; line-height: 1.7; }
  .selection-request { margin-top: 10px; }
  /* Align the entire dock left of the summary, including the centred container gutter. */
  body[data-page="servizi.html"] .assistant-dock {
    right: calc(max(0px, (100vw - 1440px) / 2) + var(--gutter) + 264px + 28px);
    bottom: 22px;
  }
  body[data-page="servizi.html"] .assistant-panel { max-height: calc(100dvh - var(--header-height) - 110px); }
}
@media (max-width: 1279px) and (max-height: 600px) {
  body[data-page="servizi.html"].mio-open .selection-summary { visibility: hidden; pointer-events: none; }
  body[data-page="servizi.html"].mio-open .assistant-dock { bottom: 14px; }
  body[data-page="servizi.html"].mio-open .assistant-panel { max-height: calc(100dvh - var(--header-height) - 100px); }
}
@media (prefers-reduced-motion: reduce) {
  .service-details-link, .service-add { transition: none; }
}
