/* Header, navigation, footer, pictures. */

/* header: utility bar (folds away on scroll), then wordmark, links, search, cart and the one action; sticky */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--bg); }
.utility { background: var(--dark); color: var(--dark-ink); max-height: 2.5rem; overflow: hidden; transition: max-height var(--t-ui) var(--ease-in-out); }
.utility.hide { max-height: 0; }
.utility__bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 2.5rem; padding-inline: var(--margin); font-size: var(--step-small); white-space: nowrap; }
.utility__left, .utility__right { display: flex; align-items: center; gap: 1.5rem; min-width: 0; }
.utility__right span { color: var(--dark-muted); }
.utility a { text-decoration: none; }
.site-header__bar { display: flex; align-items: center; gap: var(--gutter); min-height: var(--header-h); padding-inline: var(--margin); }
.wordmark { display: inline-flex; align-items: center; margin-right: auto; text-decoration: none; }
.site-header .wordmark__img { height: 2.4rem; width: auto; } /* outranks the WooCommerce img rule on shop pages */
.site-header__phone { display: none; align-items: center; gap: 0.75rem; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; font-size: var(--step-small); }
.site-nav .menu { display: flex; gap: 1.4rem; }
.site-nav .menu a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; transition: text-decoration-color var(--t-hover) ease; }
.site-nav .menu .current-menu-item > a, .site-nav .menu .current_page_item > a { text-decoration-color: currentColor; }
.site-search form { display: flex; align-items: center; gap: 0.4rem; margin: 0; }
.site-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.site-search input[type="search"] { width: 10.5rem; min-height: 2.5rem; padding: 0.4rem 0.75rem; background: var(--surface); border: 0; border-radius: var(--radius); font: inherit; font-size: var(--step-small); color: var(--ink); }
.site-search button { min-height: 2.5rem; padding: 0 0.6rem; font-weight: 500; }
/* the basket: Basket (n) in the header and its side panel (assets/js/basket.js); nothing without scripting */
.basket-toggle { display: none; min-height: 44px; padding: 0 0.25rem; background: none; border: 0; color: inherit; font: inherit; font-size: var(--step-small); font-weight: 500; cursor: pointer; }
.has-basket .basket-toggle { display: inline-flex; align-items: center; gap: 0.35rem; }
.basket-toggle__icon { flex: none; }
/* narrow phones: a slightly smaller logo, and the header button is the bag and count (the word stays for screen readers) */
@media (max-width: 26em) {
  .site-header .wordmark__img { height: 2rem; }
  .site-header__phone { gap: 0.5rem; }
  .site-header__phone .basket-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.basket-toggle__count { min-width: 1.5rem; padding: 0.1rem 0.45rem; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 0.75rem; text-align: center; font-variant-numeric: tabular-nums; }
.basket { width: min(30rem, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; padding: 0; border: 0; background: var(--bg); color: var(--ink); }
.basket[open] { display: flex; flex-direction: column; }
.basket::backdrop { background: rgb(8 8 8 / 0.45); }
.basket__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--surface-2); }
.basket__title { margin: 0; font-family: var(--font-display); font-size: var(--step-lead); }
.basket__close, .basket__remove { min-height: 44px; padding: 0 0.4rem; background: none; border: 0; color: inherit; font: inherit; font-size: var(--step-small); text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.basket__remove { color: var(--muted); }
.basket__body { flex: 1; overflow: auto; padding: 1rem 1.25rem 1.5rem; }
.basket__msg { margin: 0 0 0.75rem; font-size: var(--step-small); }
.basket__msg:empty { display: none; }
.basket__msg.is-bad, .basket__problem, .basket__error { color: #9b1c1c; }
.basket__lines { margin: 0; padding: 0; list-style: none; }
.basket__line { padding: 0.9rem 0; border-bottom: 1px solid var(--surface-2); }
.basket__line.is-problem { border-left: 3px solid #9b1c1c; padding-left: 0.75rem; }
.basket__name { margin: 0 0 0.5rem; font-weight: 500; }
.basket__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; font-size: var(--step-small); }
.basket__qty { width: 6rem; min-height: 2.75rem; padding: 0.4rem 0.6rem; }
.basket__unit { color: var(--muted); }
.basket__price { flex: 1; text-align: right; font-variant-numeric: tabular-nums; }
.basket__problem { margin: 0.4rem 0 0; font-size: var(--step-small); }
.basket__total { margin: 1rem 0 0; font-size: var(--step-lead); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.basket__note, .basket__empty, .basket__intro { margin: 0.75rem 0 0; color: var(--muted); font-size: var(--step-small); }
.basket__note a { color: var(--ink); text-decoration: underline; text-underline-offset: 0.18em; }
.basket__form { display: grid; gap: 0.9rem; margin-top: 1.25rem; }
.basket__form[hidden] { display: none; }
.basket__field label { display: block; margin-bottom: 0.3rem; font-size: var(--step-small); font-weight: 500; }
.basket__error { margin: 0.25rem 0 0; font-size: 0.8125rem; }
.basket__error:empty { display: none; }
.basket__pay { display: grid; gap: 0.25rem; margin: 0; padding: 0; border: 0; }
.basket__pay legend { margin-bottom: 0.5rem; font-weight: 500; }
.basket__radio { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; }
.basket__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.basket-add { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.basket-add__label { font-size: var(--step-small); font-weight: 500; }
.basket-add__qty { width: 6rem; min-height: 3rem; }

/* search as you type: sizes under their product, no prices */
.has-search-pop { position: relative; }
.search-pop { position: absolute; top: calc(100% + 0.4rem); right: 0; z-index: 40; width: min(30rem, calc(100vw - 2 * var(--margin))); max-height: min(70vh, 34rem); overflow: auto; background: var(--bg); border: 1px solid var(--surface-2); border-radius: var(--radius); box-shadow: 0 12px 32px rgb(8 8 8 / 0.12); font-size: var(--step-small); }
.search-pop[hidden] { display: none; }
.search-pop__list { margin: 0; padding: 0.25rem 0; list-style: none; }
.search-pop__group { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 0.75rem; padding: 0.75rem 1rem 0.25rem; }
.search-pop__group:not(:first-child) { border-top: 1px solid var(--surface); margin-top: 0.25rem; }
.search-pop__product { font-weight: 600; }
.search-pop__path { color: var(--muted); font-size: 0.8125rem; }
.search-pop__option a { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 1rem; color: inherit; text-decoration: none; }
.search-pop__option.is-active a, .search-pop__option a:hover { background: var(--surface); }
.search-pop__sku { color: var(--muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.search-pop__status { margin: 0; padding: 0.6rem 1rem; border-top: 1px solid var(--surface); color: var(--muted); font-size: 0.8125rem; }
.site-nav__actions { display: flex; align-items: center; gap: 1.25rem; }
.site-nav__login { display: none; }
.menu-toggle { min-height: 44px; padding: 0 0.5rem; font-size: var(--step-small); font-weight: 500; }
@media (hover: hover) and (pointer: fine) {
  .site-nav .menu a:hover, .utility a:hover { text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 0.2em; }
}
@media (max-width: 72em) {
  .utility__right, .utility__email { display: none; }
  .site-nav { display: none; }
  .site-header__phone { display: flex; }
  html:not(.js) .site-nav { display: flex; flex-wrap: wrap; gap: 1rem; padding: 0 var(--margin) 1rem; }
  .js .site-nav.is-open { display: flex; position: fixed; inset: var(--header-h) 0 0 0; z-index: 30; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 1.75rem; padding: 1.5rem var(--margin) 2rem; background: var(--bg); font-size: 1.5rem; overflow: auto; }
  .js .site-nav.is-open .menu { flex-direction: column; gap: 1rem; }
  .js .site-nav.is-open .site-search input[type="search"] { width: min(20rem, 70vw); }
  .js .site-nav.is-open .search-pop { left: 0; right: auto; }
  .js .site-nav.is-open .site-search input[type="search"], .js .site-nav.is-open .site-search button { font-size: 1rem; }
  .js .site-nav.is-open .site-nav__actions { flex-direction: column; align-items: flex-start; gap: 1rem; margin-top: auto; font-size: 1.125rem; }
  .js .site-nav.is-open .site-nav__login { display: inline; }
  body.menu-open { overflow: hidden; }
  body.menu-open .utility { max-height: 0; } /* the sheet is pinned below the bar row, so the bar row must sit at the top */
}

/* footer: the way to get in touch is the headline */
.site-footer { background: var(--dark); color: var(--dark-ink); padding: 2.5rem var(--margin) 1.5rem; display: grid; grid-template-rows: auto 1fr auto; row-gap: 3rem; }
.is-marketing .site-footer { min-height: 72svh; }
.site-footer__top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--gutter); }
.site-footer__logo { flex: none; width: clamp(11rem, 18vw, 15rem); height: auto; }
.site-footer__notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); max-width: 60%; line-height: 1.45; }
.site-footer__contact { align-self: end; }
.site-footer__phone { display: block; font-family: var(--font-display); font-weight: 500; font-size: var(--step-poster); line-height: 1; letter-spacing: -0.03em; text-decoration: none; font-variant-numeric: tabular-nums; }
.site-footer__also { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 1.5rem; max-width: none; }
.site-footer__meta { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: var(--gutter); font-size: var(--step-small); line-height: 1.45; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 1rem; }
.site-footer__links .menu { display: flex; flex-wrap: wrap; gap: 1rem; }
.site-footer__links a { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.07em; }
.site-footer__credits { text-align: center; max-width: 56ch; }
.site-footer__credits a { text-decoration: underline; text-underline-offset: 0.18em; }
.site-footer__legal { text-align: right; max-width: none; }
@media (max-width: 56em) {
  .site-footer__top { flex-direction: column; }
  .site-footer__notes { grid-template-columns: 1fr; max-width: none; gap: 0.5rem; }
  .site-footer__meta { grid-template-columns: 1fr; }
  .site-footer__credits, .site-footer__legal { text-align: left; }
}

/* pictures */
.thumb { display: inline-block; width: 1.25em; height: 0.85em; vertical-align: -0.1em; margin: 0 0.12em; border-radius: 0.14em; overflow: clip; background: var(--surface); }
.thumb__img { width: 100%; height: 100%; object-fit: cover; }
figure img { background: var(--surface); }
figcaption { margin-top: 0.5rem; color: var(--muted); }

/* forms from plugins (Contact Form 7, WooCommerce) take the same fields and buttons */
.site-main input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]), .site-main textarea, .site-main select { width: 100%; min-height: 3rem; padding: 0.7rem 0.9rem; background: var(--surface); border: 0; border-radius: var(--radius); font: inherit; font-size: max(1rem, var(--step-body)); color: var(--ink); }
.site-main textarea { min-height: 8rem; resize: vertical; }
.site-main input[type="submit"], .site-main button[type="submit"], .site-main .wpcf7-submit { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.4rem; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--radius); font: inherit; font-weight: 500; cursor: pointer; }
.site-main label { display: block; margin-bottom: 0.4rem; font-weight: 500; }
.site-main .wpcf7-form p { max-width: none; margin-bottom: 1rem; }
.site-main .wpcf7-not-valid-tip { display: block; margin-top: 0.4rem; color: var(--ink); }
.site-main .wpcf7-response-output { margin: 1.25rem 0 0; padding: 0.9rem 1rem; background: var(--surface); border: 0; }
.site-main .wpcf7-spinner { display: none; }
