/* Shared chrome for the storefront and editorial pages. */
html { scroll-padding-top: calc(var(--accosto-header-height, 125px) + 12px); }
body .site-header.hh-header { position: sticky; top: 0; z-index: 40; }
body .site-header.hh-header .hh-top { grid-template-columns: auto minmax(0,1fr) auto; }
body .site-header.hh-header .hh-contacts,
body .site-header.hh-header .hh-local { display: flex; align-items: center; flex-wrap: nowrap; }
body .site-header.hh-header .hh-contacts { gap: clamp(5px, .9vw, 16px); min-width: 0; }
body .site-header.hh-header .hh-local { gap: clamp(6px, 1.15vw, 20px); margin: 0; min-width: 0; }
body .site-header.hh-header .hh-city { min-width: 0; }
body .site-header.hh-header .hh-city select { text-overflow: ellipsis; }
body .site-header.hh-header .hh-nav > .hh-search { display: grid; padding: 0; }
body .site-header.hh-header .hh-search:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
#mobile-nav.hh-mobile { position: fixed; inset: var(--accosto-header-height, 115px) 0 auto; max-height: calc(100dvh - var(--accosto-header-height, 115px)); overflow-y: auto; overscroll-behavior: contain; z-index: 39; }
body .site-header.hh-header .catalog-mega { max-height: calc(100dvh - var(--accosto-header-height, 125px) - 12px); }
body .door-hero .product-gallery { top: calc(var(--accosto-header-height, 110px) + 12px); }
body .ed-toc { top: calc(var(--accosto-header-height, 110px) + 12px); }
body .summary-card, body .pb-stage figure { top: calc(var(--accosto-header-height, 110px) + 12px); }
@media (max-width:1199px) {
 body .site-header.hh-header .hh-top { grid-template-columns: auto minmax(0,1fr) auto auto auto; }
}
@media (max-width:700px) {
 body .site-header.hh-header .hh-top { grid-template-columns: auto minmax(0,1fr) 40px 40px; column-gap: 5px; }
 body .site-header.hh-header .hh-project { grid-area: 1 / 2; padding-inline: 9px; white-space: nowrap; }
 body .site-header.hh-header .menu-toggle { grid-area: 1 / 3; }
 body .site-header.hh-header .hh-search { grid-area: 1 / 4; }
 body .site-header.hh-header .hh-contacts { padding-top: 0; justify-content: center; column-gap: 4px; }
 body .site-header.hh-header .hh-local { column-gap: 6px; }
 body .site-header.hh-header .hh-city select { font-size: 12px; padding-inline: 22px 22px; }
 body .site-header.hh-header .hh-city::before { inset-inline-start: 7px; }
 body .site-header.hh-header .hh-city::after { inset-inline-end: 9px; }
 body .site-header.hh-header .hh-phone { font-size: clamp(12px,3.6vw,15px); }
 body .site-header.hh-header .messenger-icon img { width: 27px; height: 27px; }
}
.accosto-share { box-sizing: border-box; width: min(1320px,calc(100% - 40px)); margin: 0 auto; padding: 18px 0; border-top: 1px solid var(--line,#d9d8d0); display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; }
.accosto-share > strong { font-weight: 600; margin-inline-end: 4px; }
.accosto-share-links { display: flex; flex-wrap: wrap; gap: 4px; }
.accosto-share-links > :is(a,button) { display: grid; place-items: center; min-width: 44px; min-height: 44px; background: transparent; border: 1px solid transparent; border-radius: 8px; color: inherit; cursor: pointer; padding: 5px; }
.accosto-share-links > :is(a,button):hover { border-color: var(--line,#d9d8d0); }
.accosto-share-links > :is(a,button):focus-visible { outline: 2px solid currentColor; }
.accosto-share-links img, .accosto-share-links svg { width: 25px; height: 25px; display: block; }
.accosto-share-status { flex-basis: 100%; font-size: .9em; }
.accosto-share-status:empty { display: none; }
.accosto-share-address { width: min(95%,38rem); padding: .5rem; font: inherit; }
.accosto-share-address[hidden] { display: none; }

/* Pocket door: the quote follows all configuration fields, never sticks to the top. */
#opening-system[data-system-kind="pocket"] .os-layout:has([data-pocket-final-quote]) { display: block; }
#opening-system[data-system-kind="pocket"] [data-pocket-final-quote] {
 margin-block: 22px 18px;
 padding: clamp(14px,2.6vw,28px);
 border: 1px solid var(--line,#d9d8d0);
 background: var(--soft,#eeeee8);
 min-width: 0;
}
#opening-system[data-system-kind="pocket"] [data-pocket-final-quote] > h3 { margin: 8px 0 14px; }

/* The storefront header keeps the project button in its own grid cell
   even before the deferred script moves search into the navigation. */
@media (min-width:1200px) {
 body .site-header.hh-header .hh-top > .hh-search { display:none; }
 body .site-header.hh-header .hh-top > .hh-project { grid-column:3;grid-row:1; }
}
#main .page-top:has(h1[data-edit-model="categories.doors.name"]) ~ .catalog-controls { display:none; }
[data-stock-standard-page] .stock-price-share {
 display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 18px;
 border-top:1px solid var(--line,#d9d8d0);
}
[data-stock-standard-page] .stock-price-share .stock-total { border-top:0; }
[data-stock-standard-page] .stock-share-slot { min-width:0; }
[data-stock-standard-page] .accosto-share-inline {
 width:auto;margin:0;padding:5px 0;border:0;gap:3px;align-items:flex-start;flex-direction:column;
}
[data-stock-standard-page] .accosto-share-inline > strong { font-size:.82em;margin:0; }
[data-stock-standard-page] .accosto-share-inline .accosto-share-links { gap:0; }
[data-stock-standard-page] .accosto-share-inline .accosto-share-address { max-width:176px; }
@media(max-width:500px){
 [data-stock-standard-page] .stock-price-share { grid-template-columns:minmax(0,1fr);gap:0;padding-bottom:10px; }
 [data-stock-standard-page] .accosto-share-inline { align-items:center;flex-direction:row;gap:8px; }
}

/* Like Magic, show the summary in the right column of the final step,
   without a sticky price or a second price at the top of the page. */
#opening-system[data-system-kind="pocket"] .pocket-final-options { min-width:0; }
@media (min-width:900px) {
 #opening-system[data-system-kind="pocket"] .pocket-final-layout {
   display:grid;
   grid-template-columns:minmax(0,1fr) minmax(320px,39%);
   align-items:start;
   gap:clamp(20px,3vw,48px);
 }
 #opening-system[data-system-kind="pocket"] .pocket-final-layout > [data-pocket-final-quote] { margin-block:0; }
}

/* Do not paint the provisional server order before stock has been inserted.
   Visibility preserves the initial grid's geometry, including on slow loads. */
html[data-stock-catalog-pending] main [data-catalog-index][data-index-kind="products"]:not(:has(> :first-child[data-stock-standard-card])) {
 visibility:hidden;
}

/* accosto-hidden-card-ratio-v11: all previews in this catalog use one frame. */
#main .page-top:has(h1[data-edit-model="categories.doors.name"])
 ~ [data-catalog-index][data-index-kind="products"] .product-card > a > .image-box {
  height:auto;
  aspect-ratio:6 / 5;
}
#main .page-top:has(h1[data-edit-model="categories.doors.name"])
 ~ [data-catalog-index][data-index-kind="products"] .product-card > a > .image-box > :is(img,svg) {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

/* accosto-home-mobile-kicker-v14: only the home hero's short brand line. */
@media(max-width:770px){
 #main .as-home .as-hero-copy > .as-kicker { display:none; }
 #main .as-home .as-hero-copy > #as-title { margin-top:0; }
}

/* accosto-catalog-meta-v15: keep the search count announcement, not the decorative row. */
#main .results-line:has(> #results-count) {
 position:absolute; width:1px; height:1px; padding:0; margin:-1px;
 overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0;
}
#main .results-line:has(> #results-count) > :not(#results-count) { display:none; }

/* accosto-header-city-v17 */

 body .site-header.hh-header .hh-city[hidden]{display:none;}
 body .site-header.hh-header .hh-city select{border:0;background-color:transparent;box-shadow:none;}
 .hh-city-picker{position:relative;min-width:0;}
 .hh-city-trigger{background:transparent;color:inherit;border:0;border-radius:0;display:flex;align-items:center;gap:5px;min-height:44px;padding:0 2px;font:inherit;font-weight:700;white-space:nowrap;cursor:pointer;}
 .hh-city-trigger svg{flex:none;color:#4b5740;}
 .hh-city-trigger[aria-expanded=true] svg:last-child{transform:rotate(180deg)}
 .hh-city-trigger:focus-visible,.hh-city-options button:focus-visible{outline:2px solid #69745d;outline-offset:2px}
 .hh-city-options{position:absolute;z-index:120;top:calc(100% + 3px);left:0;width:198px;box-sizing:border-box;padding:6px;background:#fffdf8;border:0;border-radius:10px;box-shadow:0 9px 28px #22272030;}
 .hh-city-options[hidden]{display:none}
 .hh-city-options button{border:0;background:transparent;color:#252823;width:100%;display:flex;justify-content:space-between;align-items:center;min-height:44px;padding:0 11px;border-radius:6px;text-align:left;font:inherit;cursor:pointer;}
 .hh-city-options button[aria-current=true]{background:#eff0e8;color:#354739;font-weight:700;}
 .hh-city-options button:hover{background:#eff0e8;}
 .hh-city-options button:not([aria-current=true]) > svg{visibility:hidden;}
 @media(max-width:420px){.hh-city-trigger{font-size:12px}}
 @media(max-width:700px){
  body .site-header.hh-header .hh-top{grid-template-columns:auto minmax(0,1fr) 40px;grid-template-rows:44px 44px;gap:3px 6px;padding:6px 13px 7px;min-height:0;}
  body .site-header.hh-header .hh-top > .brand{grid-area:1 / 1;justify-self:start;margin:0;min-width:0;width:auto}
  body .site-header.hh-header .hh-top > .brand .logo-frame{width:clamp(67px,24vw,130px);max-width:none;min-width:0}
  body .site-header.hh-header .hh-top > .brand img{width:100%;height:auto}
  body .site-header.hh-header .hh-top > .hh-contacts{grid-area:1 / 2 / 2 / 4;justify-content:flex-end;justify-self:stretch;gap:5px;padding:0;margin:0}
  body .site-header.hh-header .hh-top > .menu-toggle{grid-area:2 / 1;justify-self:start;margin:0;width:40px;height:40px}
  body .site-header.hh-header .hh-top > .hh-project{grid-area:2 / 2;justify-self:center;min-height:40px;margin:0;padding:0 13px}
  body .site-header.hh-header .hh-top > .hh-search{grid-area:2 / 3;justify-self:end;margin:0;width:40px;height:40px;}
  body .site-header.hh-header .hh-top .hh-local{gap:clamp(3px,1.25vw,8px)}
  body .site-header.hh-header .hh-top .hh-phone{font-size:clamp(11px,3.1vw,14px);white-space:nowrap}
  body .site-header.hh-header .hh-top .messenger-icon{flex:0 0 auto;min-width:0;width:29px;height:29px}
  body .site-header.hh-header .hh-top .messenger-icon img{width:24px;height:24px}
  .hh-city-trigger{gap:3px;font-size:clamp(11px,3vw,13px)}
  .hh-city-trigger svg{width:13px;height:13px}
  .hh-city-trigger{max-width:100%;min-width:0}
  .hh-city-trigger span{min-width:0;overflow:hidden;text-overflow:ellipsis;}
  .hh-city-options{inset-inline-start:0;top:calc(100% + 1px);}
  body .site-header.hh-header .hh-city select{max-width:100%;}
 }
 @media(max-width:345px){ body .site-header.hh-header .hh-top{padding-inline:9px;column-gap:4px;} }

 
