.header-main .logo img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 50px;
  /* Keep the full monogram and crop the subtitle below the wordmark. */
  clip-path: polygon(0 0, 100% 0, 100% 67.2%, 23% 67.2%, 23% 100%, 0 100%);
}
.header-channels, .mobile-channels { display: flex; align-items: center; gap: 12px; }
.header-main .header-wb,
.header-main .mobile-channels .header-wb {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  min-height: 36px;
  padding: 5px 12px 5px 7px;
  border: 1px solid #e66cbd;
  border-radius: 999px;
  background: linear-gradient(115deg, #a32378, #78128a);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.header-main .header-wb:hover {
  opacity: 1;
  background: linear-gradient(115deg, #8b1864, #640e77);
}
.header-main .header-wb:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.wb-berry {
  position: relative;
  display: grid;
  width: 23px;
  height: 22px;
  place-items: center;
  border-radius: 46% 46% 56% 56% / 39% 39% 65% 65%;
  background: #d9309a;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
}
.wb-berry::before,
.wb-berry::after {
  position: absolute;
  top: -1px;
  width: 8px;
  height: 4px;
  border-radius: 85% 15% 85% 15%;
  background: #ffd1ed;
  content: "";
}
.wb-berry::before { left: 4px; transform: scaleX(-1); }
.wb-berry::after { right: 4px; }
.shop-text-link:hover, .cart-remove:hover { text-decoration: underline; }
.header-main .mobile-channels { display: none; }

.header-cart {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--pale);
}
.header-cart svg { width: 22px; height: 22px; }
.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  padding: 1px 3px;
  background: #e7f8ec;
  color: #15582b;
  border: 1px solid #61be7b;
  border-radius: 20px;
  text-align: center;
  font-size: 10px;
  line-height: 1.35;
  font-weight: 800;
}

.home .origin-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin-bottom: 8px;
  padding: 4px 11px 4px 5px;
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-radius: 999px;
  background: linear-gradient(120deg, var(--paper), var(--pale));
  box-shadow: 0 2px 9px #0e447511;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
}
.home .origin-badge::before {
  content: "";
  flex: none;
  width: 27px;
  height: 18px;
  border: 1px solid #839bb6;
  border-radius: 6px;
  background: linear-gradient(#fff 0 33.333%, #0039a6 33.333% 66.667%, #d52b1e 66.667%);
}
@media (prefers-reduced-motion: no-preference) {
  .home .origin-badge { animation: origin-badge-appear 360ms ease-out; }
  @keyframes origin-badge-appear {
    from { opacity: .6; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

.density-tiles {
  grid-template-columns: repeat(var(--density-columns, 6), minmax(0, 1fr));
  gap: 9px;
}
.home-density .density-tiles .strength { background: var(--paper); }
.strength:hover { border-color: var(--blue); }
.density-tiles .strength strong { font-size: 13px; }
.density-tiles .strength small { color: var(--muted); font-size: 11px; }
.density-tiles .strength { min-width: 0; color: var(--ink); text-align: left; }
.density-tiles .strength-pic { width: 100%; }
.density-tiles .strength-pic--photo { height: auto; aspect-ratio: 3 / 2; }
.density-tiles .strength-pic--photo img { display: block; object-fit: cover; object-position: center 42%; }
.catalog-density { --density-columns: 5; }
.catalog-density + .features { margin-top: 20px; }
.catalog-products + .features { margin-top: 20px; }

.density-dialog {
  width: min(520px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  padding: clamp(16px, 4vw, 26px);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.density-dialog::backdrop { background: #04132699; }
.density-dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.density-dialog-heading h2 { margin: 4px 0 0; }
.density-dialog p { margin: 12px 0 18px; color: var(--muted); }
.density-close {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--pale);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}
.density-actions { display: flex; flex-wrap: wrap; gap: 5px 16px; }
.shop-text-link { color: var(--blue2); font-weight: 800; }

.shop-product .lead { margin-bottom: 15px; }
.shop-form { display: grid; gap: 10px; }
.shop-form p { margin: 0; }
.shop-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.shop-fields label, .cart-item label {
  display: grid;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
}
.shop-fields label { flex: 1 1 130px; }
.shop-fields input, .shop-fields select, .cart-item input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 16px;
}
.dark .shop-fields select { color-scheme: dark; }
.shop-actions, .color-options { display: flex; flex-wrap: wrap; gap: 7px; }
.shop-status { min-height: 1.4em; font-size: 13px; }
.color-picker { min-width: 0; margin: 0; padding: 0; border: 0; }
.color-picker legend { padding: 0; margin-bottom: 5px; font-size: 13px; font-weight: 800; }
.color-picker .muted { margin-block: 6px 0; }
.color-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.color-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.color-option:has(input:checked) { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.color-option:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.color-dot { width: 15px; height: 15px; border: 1px solid #7d8b9b; border-radius: 50%; background: var(--swatch); }
.color-preview { display: block; width: 100%; height: auto; }

.cart-layout { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(240px, 1fr); align-items: start; gap: 16px; }
.cart-items { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cart-item { position: relative; display: grid; grid-template-columns: 90px minmax(0, 1fr) 108px; align-items: center; gap: 12px; padding: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 15px; }
.cart-item img { display: block; width: 90px; height: 70px; object-fit: cover; border-radius: 10px; }
.cart-item h3, .cart-item p { margin: 0; }
.cart-item p { color: var(--muted); }
.cart-item label { align-self: center; }
.cart-item-link::after { position: absolute; inset: 0; border-radius: 15px; content: ""; }
.cart-item-link:hover { text-decoration: underline; }
.cart-item-link:focus-visible::after { outline: 2px solid var(--blue); outline-offset: 2px; }
.cart-item label, .cart-item .cart-remove { position: relative; z-index: 1; }
.cart-remove { border: 0; padding: 3px 0; background: none; color: var(--blue2); font-size: 13px; }
.cart-summary { display: grid; gap: 8px; }
.cart-summary > * { margin: 0; }
.cart-total { font-weight: 800; }
.btn:disabled { opacity: .58; cursor: not-allowed; transform: none; }
#request, #configure, #product-densities { scroll-margin-top: var(--header-offset); }
.request-order { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--pale); }
.request-order h3, .request-order p { margin: 0; }
.request-order ul { margin-block: 5px; padding-left: 20px; }

.company-hero {
  align-items: start;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr);
}
.company-gallery {
  min-width: 0;
  width: 100%;
  max-width: 420px;
  justify-self: end;
}
@media (max-width: 760px) {
  .company-hero { grid-template-columns: minmax(0, 1fr); }
  .company-gallery { justify-self: start; }
}
.company-gallery h2 { margin: 0 0 10px; font-size: clamp(19px, 2.3vw, 26px); }
.company-gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.company-gallery figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.company-gallery .company-gallery-feature { grid-column: 1 / -1; }
.company-gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: cover;
}
.company-gallery-feature img {
  aspect-ratio: 16 / 9;
  object-position: center 58%;
}
.company-gallery figcaption { padding: 7px 9px; font-size: 12px; font-weight: 700; }
.company-gallery .muted { margin: 8px 0 0; }

.institution-gallery {
  position: relative;
  min-width: 0;
  aspect-ratio: 4 / 3;
  touch-action: pan-y pinch-zoom;
}
.institution-gallery .hero-slide { height: 100%; }
.institution-gallery .hero-slide.is-active { z-index: 1; }

@media (prefers-reduced-motion: no-preference) {
  .institution-gallery .hero-slide:not(.is-active) { transition: opacity 0s .45s; }
}
@media (max-width: 600px) {
  .institution-hero { padding-inline: 14px; }
  .institution-gallery { aspect-ratio: 5 / 4; }
}
@media (min-width: 1024px) {
  .institution-hero { grid-template-columns: minmax(0, 9fr) minmax(0, 11fr); }
  .institution-gallery { aspect-ratio: 16 / 10; }
}

.company-customers { margin-bottom: 22px; scroll-margin-top: var(--header-offset); }
.company-customers h3 { margin: 18px 0 8px; }
.company-customer-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.company-customer-list li {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--pale);
}
.company-customer-list span { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.delivery-map { margin-bottom: 22px; scroll-margin-top: var(--header-offset); }
.delivery-map-frame { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--pale); }
.delivery-map-frame iframe { display: block; width: 100%; height: 430px; border: 0; }
.delivery-city-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.delivery-city {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  font-weight: 800;
}
.delivery-city span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #227b36;
}
.delivery-city:hover { border-color: var(--blue); }

@media (min-width: 1024px) {
  .header-channels { grid-area: 1 / 6; }
  .header-main .nav { padding-right: 112px; }
  .header-cart { position: absolute; bottom: 3px; right: 56px; width: 44px; height: 32px; border-radius: 30px; background: #ffffff20; color: #fff; border-color: #ffffff60; }
}
@media (max-width: 1023px) {
  :root { --header-offset: 80px; }
  .header-main { min-height: 66px; gap: 8px; justify-content: flex-start; }
  .header-main .logo { width: clamp(100px, 100vw - 228px, 180px); margin-right: auto; }
  .header-main .logo img { max-height: 49px; }
  .header-main .header-phone { flex: 0 0 44px; width: 44px; height: 44px; justify-content: center; }
  .header-main .header-phone span { display: none; }
  .header-main .menu { display: grid; }
  .header-main .nav { position: absolute; inset: 100% 0 auto; display: none; color: var(--ink); background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); overflow-y: auto; max-height: calc(100dvh - 66px); }
  .header-main .nav.open { display: block; }
  .header-main .nav-inner { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 14px; max-height: none; }
  .header-main .nav a { display: block; padding: 11px 8px; font-size: 14px; }
  .header-main .mobile-channels { display: flex; flex-wrap: wrap; gap: 4px 12px; border-top: 1px solid var(--line); padding: 4px 14px 5px; }
  .header-main .mobile-channels .mobile-max {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 5px 12px;
    border: 1px solid var(--blue);
    border-radius: 999px;
    background: transparent;
    font-size: 13px;
    font-weight: 800;
  }
  .header-main .mobile-channels .mobile-max:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
  .home-density { padding: 12px; background: var(--pale); border: 1px solid var(--line); border-radius: 15px; }
  .density-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .cart-layout { grid-template-columns: 1fr; }
  .shop-product .product-detail-image { grid-row: 1; }
  .shop-product .product-detail-image img, .color-preview { max-height: 270px; object-fit: cover; }
}
@media (max-width: 420px) {
  .header-main { gap: 4px; }
  .density-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cart-item { grid-template-columns: 54px minmax(0, 1fr) 86px; gap: 8px; }
  .cart-item img { width: 54px; height: 60px; }
  .cart-item h3 { font-size: 14px; }
  .cart-item p { font-size: 12px; }
}


/* Company details on the contact page. */
.company-details {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.company-details h3 {
  margin: 0 0 .5rem;
  font-size: 1.125rem;
}
.info-card .company-details-name {
  margin: -.45rem 0 1rem;
  color: var(--ink);
  font-weight: 700;
}
.company-details-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: .2rem .85rem;
  margin: .65rem 0;
}
.company-details-list dt {
  color: var(--muted);
}
.company-details-list dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.company-details-address {
  margin: .65rem 0 0;
}

/* Privacy policy and links beside the request fields. */
.privacy-link {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: .15em;
}
.privacy-policy {
  max-width: 54rem;
  overflow-wrap: anywhere;
}
.privacy-policy h1 {
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  line-height: 1.15;
}
.privacy-policy h2 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  margin: 1.6rem 0 .55rem;
}
.privacy-policy p {
  margin: 0 0 .85rem;
}
.privacy-policy .privacy-draft {
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--bg);
}
.privacy-policy mark {
  color: #362709;
  background-color: #fff3ca;
}

.info-card .contact-privacy {
  margin: .75rem 0;
  font-size: .95rem;
  overflow-wrap: anywhere;
}
