/* Visible artwork only: losslessly cropped first, then scaled from the accepted
   red/white logo's alpha bounds (1921/2500) by 15%. Retain its layout box. */
body #masthead .container .site-branding .custom-logo-link {
  position:relative;
  aspect-ratio:2500 / 555;
}
body #masthead .container .site-branding img {
  position:absolute;
  left:50%;
  top:50%;
  width:97.2026%; /* 1921/2500 × accepted 1.1 transform × 1.15 */
  max-width:none;
  height:auto;
  transform:translate(-50%,-50%);
}
@media(max-width:419px) {
  body #masthead .container .site-branding img { width:88.366%; }
}
/* Keep the icon/right cap and all narrow-screen behavior in place. */
@media(min-width:901px) {
  body #masthead .site-search .search-form input[type=search] { padding-left:12px; }
}
/* Counts remain available to assistive technology and filtering logic only.
   The existing fixed-height toolbar now centers just its reset control. */
body #page .compact-catalog .catalog-status { position:relative; }
/* Only the first visible Tile material heading loses excess top spacing.
   12px toolbar margin minus 2px = the existing 10px gap below the heading. */
body #page .compact-catalog #products-container .material-heading.first-material { margin-top:-2px; }
/* Match the accepted testimonial-card fill. Keep the arrow's 28.5px line box
   (and therefore the original button dimensions) while centering both parts. */
body #page .back-to-top { display:inline-flex; align-items:center; background:#5b5753; }
body #page .back-to-top .back-label { font-size:inherit; margin:0; }

/* The measured column offset must apply immediately, including reduced motion. */
body #page .visit-information { transition-property:none !important; }

/* Follow-up: natural-width links arranged around the unchanged central logo.
   Keep the existing grid's center column in flow to preserve header height. */
@media(min-width:901px) {
  body #masthead[data-balanced-navigation] .container .navs-wrapper #primary-menu { position:relative; }
  body #masthead[data-balanced-navigation] .container .navs-wrapper #primary-menu > .menu-brand { grid-column:3; }
  body #masthead[data-balanced-navigation] .container .navs-wrapper #primary-menu > li:not(.menu-brand) {
    position:absolute;
    top:50%;
    left:var(--navigation-left);
    width:max-content;
    margin:0;
    transform:translateY(-50%);
    justify-self:auto;
  }
  body #masthead[data-balanced-navigation] .container .navs-wrapper #primary-menu > li > a { white-space:nowrap; flex-direction:row; }
}
/* Remove only the extra exterior focus treatment on catalog dropdowns.
   The existing ordinary border and beige hover/focus fill remain intact. */
body #page .compact-catalog .catalog-filter :is(.choices, .choices__inner, .choices__input, select.filters-select) {
  outline:none !important;
  outline-offset:0;
  box-shadow:none !important;
}
body #page .compact-catalog .catalog-filter .choices:focus-within .choices__inner,
body #page .compact-catalog .catalog-filter .choices:focus-visible .choices__inner,
body #page .compact-catalog select.filters-select:focus { background:#f1ecdf; }

/* Approved additional page surfaces. The opaque stone/footer wrappers retain
   their own fills; body coverage includes Search's collapsed top/side margins. */
body.catalog-page,
body.privacy-policy,
body.search,
body:has(#products-selection),
body.privacy-policy #primary { background-color:var(--cactus-content-background,#302e2b) !important; }

/* Search-page controls reuse the established primary-button interactions. */
body.search #primary .search-submit {
  display:grid; place-items:center; flex:0 0 50px; width:50px; height:48px;
  min-height:48px; padding:0; border:0; font-size:16px; line-height:1; letter-spacing:0;
}
body.search #primary .page-search-field { position:relative; flex:1; min-width:0; }
body.search #primary .page-search-field label { display:block; }
body.search #primary .page-search-field input[type=search] { padding-right:34px; }
body.search #primary input[type=search]::-webkit-search-cancel-button { -webkit-appearance:none; display:none; }
body.search #primary input[type=search]::-ms-clear { display:none; }
body.search #primary .page-search-clear {
  position:absolute; right:2px; top:50%; transform:translateY(-50%);
  display:grid; place-items:center; width:32px; height:32px; min-height:0;
  padding:0; border:0; border-radius:2px; background:transparent; color:#b71d24;
  box-shadow:none; cursor:pointer;
}
body.search #primary .page-search-clear[hidden] { display:none !important; }

/* Place the existing moving highlight between the beige fill and the content.
   Isolation keeps the negative layer inside the button, including plain text. */
body .cst-button.cst-primary { isolation:isolate; }
body .cst-button.cst-primary::before { z-index:-1; pointer-events:none; }

/* Only the main Search area absorbs surplus viewport space. */
body.search #primary { padding-bottom:var(--search-page-space,0px); }
