/* Adapted from Dima preview2 visual reference; original workflow and system theme retained. */
:root{--ink:#191919;--muted:#686868;--line:#dedede;--action:#191919;--on-action:#fff;--bg:#fff;--surface:#fff;--paper:#f2f2f2;--hover:#e9e9e9;--soft:#f2f2f2;--field-line:#919191;--focus:#404040}body{font-family:Arial,'Segoe UI',sans-serif;font-size:15px}button{border-radius:26px;min-height:48px;padding:12px 20px;font-size:14px}button.primary{background:var(--action);color:var(--on-action)}.masthead{max-width:1550px;margin:auto;min-height:135px;padding:27px 42px;display:flex;justify-content:space-between;align-items:center;gap:30px}.wordmark{font-size:11px;line-height:1.2;min-width:211px;letter-spacing:-.15px}.masthead-name{font-size:11px;letter-spacing:1.8px;flex:1;line-height:1.7}.masthead-name small{font-size:12px;letter-spacing:0;color:var(--muted);display:block;margin-top:4px}.masthead-actions{display:flex;gap:12px;align-items:center}.offline-chip{font-size:11px;color:var(--muted);white-space:nowrap}.quick-new{width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:50%;font-size:28px;font-weight:300;background:var(--paper)}.site-layout{max-width:1550px;margin:0 auto;display:grid;grid-template-columns:211px minmax(0,1fr);gap:34px;padding:0 42px 45px}.site-layout>aside{position:static;width:auto;border:0;padding:22px 0 0;background:transparent;display:flex;flex-direction:column;min-height:calc(100vh - 180px)}aside h1{font-size:11px;font-weight:400;letter-spacing:1.5px;text-transform:uppercase;color:var(--muted);margin:0 0 14px}.nav-caption{display:none}nav{margin-top:0;gap:6px}nav button{border:0;background:transparent;font-size:13px;min-height:48px;padding:12px 15px;text-align:left}nav button::after{content:'→';float:right;margin-left:auto;font-size:14px}nav button.active{background:var(--action);color:var(--on-action);font-weight:400}nav button:hover:not(.active){background:var(--paper)}.side-note{margin-top:27px;padding-top:23px;font-size:11px;line-height:1.8}.site-layout>main{margin:0;max-width:none;min-width:0;min-height:calc(100vh - 180px);padding:16px 0 25px}.header{margin:18px 0 30px;align-items:flex-end;gap:20px}.header h2{font-size:clamp(32px,3.9vw,55px);font-weight:300;letter-spacing:-1.8px;line-height:1.1;margin-bottom:12px}.header p{font-size:13px}.section-kicker{display:block;font-size:10px;letter-spacing:1.7px;color:var(--muted);margin-bottom:17px}.header .actions{align-items:center}.header button{font-size:13px}h3{font-size:21px;font-weight:400;line-height:1.35;letter-spacing:-.35px}h4{font-size:17px;font-weight:500}.panel{border:1px solid var(--line);border-radius:0;padding:25px;margin-bottom:19px;box-shadow:none}.notice{border:0;border-left:2px solid var(--muted);border-radius:0;background:var(--paper);font-size:13px;line-height:1.7}.error{border-left-width:2px;border-radius:0}.toolbar input,.toolbar select{border-radius:26px;background:var(--surface);padding:13px 17px}input,select,textarea{font-size:15px;border-radius:4px;padding:12px;min-height:49px}input[readonly]{background:var(--paper)}.field{font-size:13px;gap:8px}.grid{gap:21px}.wide{grid-column:1/-1}.date-row button{font-size:12px;border-radius:24px;min-height:48px}.steps{gap:7px;margin-bottom:20px}.steps button{border-radius:24px;font-size:12px;min-height:48px}.cart-bar button{background:var(--paper);border:0;border-radius:0;font-size:14px}.wizard-nav{background:var(--bg);padding:16px 0}.summary dt{font-size:12px}.summary dd{font-size:15px}.badge{border-radius:14px;background:var(--paper);font-size:12px}th{background:var(--paper);font-size:12px}td{padding:20px 9px}.product{border-radius:0;box-shadow:none}.product figure{height:168px;background:var(--photo-bg);border-bottom:0;padding:10px}.product img{padding:0;object-fit:contain}.product .body{padding:15px;gap:10px}.product h3{font-size:14px;font-weight:500;letter-spacing:0;line-height:1.5;overflow-wrap:anywhere}.product .muted{font-size:12px}.product .price{font-size:19px;font-weight:400}.product .catalog-source{font-size:11px}.product .body>button{background:var(--action);color:var(--on-action);border-color:var(--action);font-size:13px;min-height:48px;align-self:flex-start}.basket-item h3{font-weight:500;letter-spacing:0}.basket-total{font-weight:400}.basket-item img{object-fit:contain}details{border-radius:0;background:var(--surface)}dialog{border-radius:0;background:var(--surface);padding:29px;width:min(760px,94vw)}dialog::backdrop{background:#0007;backdrop-filter:blur(3px)}.product-photo-dialog{width:min(96vw,1100px)}.calendar-days button{border-radius:50%;min-height:44px}#toast{border-radius:0;background:var(--action);color:var(--on-action)}
.catalog-layout{display:grid;grid-template-columns:218px minmax(0,1fr);gap:19px;align-items:start;margin-top:22px}.catalog-categories{position:sticky;top:16px;padding:21px 15px;min-width:0;max-height:calc(100dvh - 32px);overflow-y:auto;scrollbar-width:thin}.catalog-category-heading h3{font-size:20px;margin:0 0 6px}.catalog-category-heading .muted{font-size:12px;margin:0 0 17px}.catalog-category-list{display:grid;gap:5px;min-width:0}.catalog-category-button{display:flex;align-items:center;gap:9px;text-align:left;border:1px solid transparent;background:var(--paper);border-radius:6px;padding:11px 12px;min-height:54px;font-size:13px;line-height:1.5;width:100%}.catalog-category-button span{flex:1;min-width:0}.catalog-category-button b{font-size:11px;font-weight:400;min-width:25px;text-align:right;color:var(--muted)}.catalog-category-button.selected{background:var(--action);color:var(--on-action)}.catalog-category-button.selected b{color:inherit}.catalog-products{min-width:0;padding:23px 20px}.catalog-products-heading{padding-bottom:18px;border-bottom:1px solid var(--line);margin-bottom:20px}.catalog-products-heading h3{font-size:23px;margin:0 0 7px}.catalog-products-heading p{font-size:13px;margin:0;color:var(--muted)}.catalog-product-search{display:flex;margin-bottom:17px}.catalog-product-search input{border-radius:26px;padding:13px 17px;min-width:0;flex:1}.catalog-products #catalog-count{font-size:12px;margin-bottom:18px}.catalog-products .catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.category-scroll-controls{display:none}
.map-route .masthead{display:none}.map-route .header{margin:6px 0 12px;align-items:center}.map-route .header h2{font-size:24px;letter-spacing:-.5px;margin-bottom:0}.map-route .section-kicker{display:none}.map-route .site-layout{max-width:none;padding:12px 18px;gap:20px;grid-template-columns:180px minmax(0,1fr)}.map-route .site-layout>aside{padding-top:0;min-height:0}.map-route aside h1,.map-route .side-note{display:none}.map-route .site-layout>main{padding:0;min-height:0}.map-route nav button{font-size:13px;padding:10px 12px}.map-is-fullscreen{background:var(--bg)}
@media(min-width:1400px){.catalog-products .catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1100px){.masthead{padding:24px 28px;gap:22px}.wordmark{min-width:180px}.site-layout{padding:0 28px 35px;grid-template-columns:180px minmax(0,1fr);gap:22px}.header h2{font-size:40px}.header{align-items:flex-start}.catalog-layout{grid-template-columns:190px minmax(0,1fr);gap:14px}.catalog-products{padding:20px 16px}}
@media(max-width:900px){.catalog-layout{display:block}.catalog-categories{position:static;max-height:none;overflow:visible;padding:19px 17px;margin-bottom:18px}.catalog-category-heading{display:flex;justify-content:space-between;gap:12px}.category-scroll-controls{display:flex;gap:6px}.category-scroll-controls button{width:44px;min-height:44px;padding:0;font-size:20px}.catalog-category-list{grid-auto-flow:column;grid-template-rows:repeat(2,minmax(62px,auto));grid-auto-columns:minmax(150px,46%);gap:7px;overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:12px;scrollbar-width:thin}.catalog-category-button{height:100%;min-height:62px;scroll-snap-align:start}.catalog-products{padding:21px 17px}}
@media(max-width:760px){.masthead{min-height:105px;padding:20px 18px;gap:15px}.wordmark{min-width:130px;font-size:10px}.masthead-name{font-size:10px;letter-spacing:.8px}.masthead-name small,.offline-chip{display:none}.quick-new{min-height:44px;width:44px}.site-layout{display:block;padding:0 16px 25px}.site-layout>aside{padding:0;min-height:0}.site-layout>aside h1,.side-note{display:none}nav{display:flex;overflow-x:auto;flex-wrap:nowrap;padding:0 0 12px;gap:5px;margin:0 0 14px;border-bottom:1px solid var(--line)}nav button{white-space:nowrap;flex:none;font-size:12px;padding:10px 14px;min-height:48px}nav button::after{display:none}.site-layout>main{margin:0;padding:8px 0 20px;min-height:0}.header{flex-wrap:wrap;margin:12px 0 25px}.header h2{font-size:34px;letter-spacing:-1.1px}.header .actions{justify-content:flex-start}.panel{padding:19px 16px}.grid,.summary{grid-template-columns:1fr}.wide{grid-column:auto}.steps{flex-wrap:nowrap;overflow-x:auto}.steps button{white-space:nowrap;flex:none}.map-route .site-layout{display:block;padding:8px 12px}.map-route nav{margin-bottom:5px;padding-bottom:7px}.map-route .header{margin-top:0}.catalog-products .product h3{font-size:14px}.catalog-products .product .price{font-size:18px}.product .body{padding:12px}.product figure{height:155px}dialog{padding:23px 19px}.product-photo-viewport{height:66dvh}}
@media screen and (orientation:portrait) and (min-width:761px) and (max-width:1100px){.masthead{min-height:105px;padding:16px 18px}.site-layout,.map-route .site-layout{display:block;padding:0 18px 24px}.site-layout>aside{padding:0;min-height:0}.site-layout>aside h1,.side-note{display:none}nav{display:flex;overflow-x:auto;flex-wrap:nowrap;padding-bottom:10px;margin-bottom:12px}nav button{flex:none;white-space:nowrap;min-height:48px}nav button::after{display:none}.site-layout>main{margin:0;padding:8px 0;min-height:0}.map-route .site-layout{padding:8px 12px}.map-route nav{margin-bottom:5px}.map-route .header{margin-top:0}}
@media(prefers-color-scheme:dark){:root{--ink:#f1f1f1;--muted:#b8b8b8;--line:#444;--action:#f1f1f1;--on-action:#111;--bg:#000;--surface:#111;--paper:#1c1c1c;--hover:#292929;--soft:#1c1c1c;--field-line:#888;--focus:#ddd}.product figure{background:var(--photo-bg)}dialog{background:var(--surface)}}
@media print{.masthead,aside,.catalog-categories{display:none!important}.site-layout{display:block!important;padding:0!important}main{margin:0!important;padding:0!important}.header h2{font-size:24px}.panel{background:white!important;color:black!important}.site-layout{max-width:none}}

.catalog-categories{width:auto;height:auto}

.catalog-category-button span{overflow-wrap:anywhere}.catalog-category-button b{flex:none}.category-scroll-controls{align-self:flex-start}.category-scroll-controls button{height:44px;flex:none}

@media(max-width:900px){.catalog-category-button{font-size:12px;padding:10px;gap:7px}}

/* Product photo: whole object at default fit, persistent controls in every orientation. */
dialog.product-photo-dialog{box-sizing:border-box;width:min(1100px,calc(100vw - 16px));height:calc(100dvh - 16px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));max-height:calc(100dvh - 16px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));padding:12px;margin:auto;overflow:hidden}
.product-photo-dialog #modal-content{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:6px}
.product-photo-heading{min-width:0}.product-photo-heading h3{font-size:20px;line-height:1.2;margin:0 0 4px;overflow-wrap:anywhere}.product-photo-heading p{margin:3px 0;font-size:13px}.product-photo-heading .actions{margin:5px 0 0;gap:8px;flex-wrap:wrap}.product-photo-heading button{min-height:44px;padding:8px 14px;font-size:13px}
.product-photo-dialog .product-photo-viewport{height:100%;min-height:0;width:100%;overflow:hidden}.product-photo-dialog .product-photo-viewport img{width:100%;height:100%;object-fit:contain}
.product-photo-dialog .product-photo-footer{margin:0;gap:7px;justify-content:center;flex-wrap:wrap}.product-photo-footer button{min-height:44px;padding:8px 14px}.product-photo-dialog #modal-error:empty{display:none}
@media(max-height:600px){dialog.product-photo-dialog{padding:6px;height:calc(100dvh - 8px);max-height:calc(100dvh - 8px)}.product-photo-dialog #modal-content{gap:3px}.product-photo-heading h3{font-size:16px;margin-bottom:2px}.product-photo-heading p{font-size:12px;margin:2px 0}.product-photo-heading .actions{margin-top:3px}.product-photo-heading button,.product-photo-footer button{min-height:40px;padding:6px 12px}.product-photo-dialog .product-photo-footer{gap:5px}}

.hall-provider-filters{display:flex;gap:8px;flex-wrap:wrap;margin:4px 0 8px}.hall-provider-filters button{min-height:44px;padding:8px 14px;font-size:13px}.hall-provider-filters [aria-pressed="true"]{background:var(--action);color:var(--on-action)}.hall-provider-filters button span{margin-left:6px}.hall-provider-legend{display:flex;flex-wrap:wrap;gap:16px;font-size:12px;margin:0 0 10px;align-items:center}.hall-provider-legend span{display:inline-flex;gap:6px;align-items:center}.hall-dot{display:inline-block;width:11px;height:11px;border-radius:50%;flex:none}.hall-dot-directory{background:#145e9c}.hall-dot-gbu{background:#c62828}.gbu-priority-badge,.hall-provider-legend b{color:#b02020;font-size:12px;font-weight:600}.hall-gbu-priority{border-left:4px solid #c62828}.hall-provider-legend b{border:1px solid #c62828;border-radius:12px;padding:2px 7px}@media(prefers-color-scheme:dark){.gbu-priority-badge,.hall-provider-legend b{color:#ff9c9c}.hall-dot-directory{background:#7fc4ff}.hall-dot-gbu{background:#ff7474}}

.masthead-actions .staff-link{display:inline-flex;align-items:center;min-height:44px;padding:0 12px;border:1px solid var(--line);border-radius:25px;color:var(--ink);font-size:13px;text-decoration:none;white-space:nowrap}
.masthead-actions .staff-link:hover{background:var(--paper)}
.staff-link:focus-visible{outline:2px solid var(--focus);outline-offset:3px}
#staff-connection{max-width:27rem}
#staff-connection h2{margin-top:0}
#staff-connection p{line-height:1.6}
@media(max-width:600px){.masthead{flex-wrap:wrap;gap:10px 14px}.masthead-actions{margin-left:auto;gap:6px}.masthead .wordmark{min-width:0}.masthead .masthead-name{flex:1 1 8rem}}

.deleted-orders{list-style:none;padding:0;margin:1rem 0;border-top:1px solid var(--line)}
.deleted-orders li{display:flex;align-items:center;gap:.75rem;border-bottom:1px solid var(--line);padding:.5rem 0}
.deleted-orders .deleted-open{flex:1;min-width:0;display:flex;align-items:center;gap:.65rem;text-align:left;background:transparent;color:var(--ink);border:0;border-radius:0;padding:.75rem .3rem;min-height:48px}
.deleted-open strong{flex:1;overflow-wrap:anywhere}
.deleted-preview details{border-top:1px solid var(--line);padding:.75rem 0}
.deleted-preview summary{cursor:pointer}
.deleted-preview dd{margin:0 0 .65rem;overflow-wrap:anywhere}
.deleted-preview dt{color:var(--muted)}
.deleted-preview table td,.deleted-preview table th{display:table-cell}

.menu-breakdown summary{cursor:pointer;font-weight:500;padding:.65rem 0}.menu-breakdown p{margin:.4rem 0}.menu-breakdown textarea{width:100%}

.product-photo-dialog .product-photo-viewport.photo-native-fit img{object-fit:scale-down}

#modal-content figure img:is([alt^="Гроб"],[alt^="Крест"]){object-fit:scale-down}

.supplier-filters { margin-block: 12px; }
.supplier-filters summary { cursor: pointer; padding-block: 8px; }
.supplier-filters .field-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(170px,100%),1fr)); gap: 10px 16px; margin-block: 8px 12px; }

.guaranteed-list-options {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 12px;
 max-width: 620px;
 margin-bottom: 18px;
}

.guaranteed-list-options button {
 min-height: 58px;
 white-space: normal;
}

.guaranteed-list-options button[aria-pressed="true"] {
 background: var(--action);
 color: var(--on-action);
}

.guaranteed-list-saving {
 margin-block: 18px;
 padding: 16px 18px;
 border-left: 4px solid var(--ink);
 border-radius: 0 14px 14px 0;
 background: var(--soft);
}

.guaranteed-list-saving h4 {
 margin: 0 0 6px;
 font-size: 14px;
}

.guaranteed-list-saving strong {
 font-size: 1.2rem;
}

.guaranteed-list-saving p {
 margin: 8px 0 0;
}

.guaranteed-list-sources {
 display: flex;
 flex-wrap: wrap;
 gap: 8px 20px;
 margin-bottom: 0;
}

.guaranteed-list-sources a {
 color: var(--ink);
 text-decoration: underline;
 text-underline-offset: 3px;
}

.guaranteed-list-spec dl {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
 gap: 14px;
 margin-bottom: 20px;
}

.guaranteed-list-spec dl > div {
 padding: 14px 16px;
 border: 1px solid var(--line);
 border-radius: 14px;
}

.guaranteed-list-spec dt {
 margin-bottom: 6px;
 font-weight: 700;
}

.guaranteed-list-spec dd,
.guaranteed-list-spec dd ul {
 margin: 0;
}

.guaranteed-list-spec dd ul {
 padding-left: 20px;
}

.guaranteed-list-spec dd li + li {
 margin-top: 4px;
}

.guaranteed-list-transport {
 margin: 0 0 20px;
 padding: 14px 16px;
 border: 1px solid var(--line);
 border-radius: 14px;
 background: var(--soft);
}

.guaranteed-list-transport h4,
.guaranteed-list-transport p {
 margin: 0;
}

.guaranteed-list-transport p {
 margin-top: 7px;
}

.guaranteed-list-photos {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 14px;
}

.guaranteed-list-photos figure {
 margin: 0;
 overflow: hidden;
 border: 1px solid var(--line);
 border-radius: 14px;
}

.guaranteed-list-photos img {
 display: block;
 width: 100%;
 aspect-ratio: 3 / 2;
 object-fit: contain;
 background: var(--photo-bg);
}

.guaranteed-list-photos figcaption {
 display: grid;
 gap: 5px;
 padding: 12px 14px;
}

.guaranteed-list-photos small {
 color: var(--muted);
}

.guaranteed-list-extra summary {
 cursor: pointer;
 font-weight: 700;
}

@media (min-width: 1180px) {
 .guaranteed-list-photos {
  grid-template-columns: repeat(4, minmax(0, 1fr));
 }
}

@media (max-width: 540px) {
 .guaranteed-list-photos {
  grid-template-columns: minmax(0, 1fr);
 }
}

@media (max-width: 400px) {
 .guaranteed-list-options {
  gap: 8px;
 }
 .guaranteed-list-options button {
  padding-inline: 10px;
 }
}
