/* WordPress glue: menus rendered as lists, account link, search dialog field,
   and generic page/post content. Prototype styles stay untouched in the other files. */

/* Header ------------------------------------------------------------------ */
.fm-brand {
  flex:0 1 160px;
  min-width:0;
}
.fm-brand img {
  width:100%;
}
.fm-cart-toggle,.fm-account-link {
  color:inherit;
}
.fm-desktop-nav__list {
  display:flex;
  gap:inherit;
}
.fm-desktop-nav a:hover {
  color:var(--fm-green);
  text-decoration:underline;
  text-underline-offset:6px;
}
@media(min-width:480px) {
  .fm-brand {
    flex-basis:150px;
  }
}
@media(min-width:768px) {
  .fm-brand {
    flex-basis:190px;
  }
}

/* Mobile menu dialog ------------------------------------------------------ */
.fm-mobile-nav__list {
  display:flex;
  flex-direction:column;
}

/* Search dialog ----------------------------------------------------------- */
.fm-search-field {
  display:flex;
  gap:8px;
}
#search-form .fm-search-field input {
  flex:1;
}
.fm-search-field .fm-button {
  flex:none;
  min-height:44px;
  padding-inline:16px;
}
@media(max-width:379px) {
  .fm-search-field .fm-button span {
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip-path:inset(50%);
  }
}

/* Footer ------------------------------------------------------------------ */
.fm-footer__menu {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}
.fm-footer__links a {
  display:block;
}

/* Generic content --------------------------------------------------------- */
.fm-site-main {
  padding-block:32px 56px;
  min-height:50vh;
}
.fm-page-header {
  margin-bottom:24px;
}
.fm-page-title {
  font-size:32px;
  letter-spacing:-.7px;
}
.fm-page-header .fm-eyebrow {
  margin-bottom:10px;
}
.fm-page-description,.fm-entry-meta {
  margin-top:8px;
  color:var(--fm-muted);
}
.fm-entry-content {
  max-width:72ch;
  font-size:16px;
  line-height:1.6;
}
.fm-entry-content>*+* {
  margin-top:1em;
}
.fm-entry-content :is(.alignwide,.alignfull,.wp-block-woocommerce-cart,.wp-block-woocommerce-checkout) {
  max-width:none;
}
.fm-entry:has(.wp-block-woocommerce-cart,.wp-block-woocommerce-checkout,.woocommerce) .fm-entry-content {
  max-width:none;
}
.fm-entry-content :is(h2,h3,h4) {
  margin-top:1.6em;
}
.fm-entry-content ul {
  list-style:disc;
  padding-left:1.4em;
}
.fm-entry-content ol {
  padding-left:1.4em;
}
.fm-entry-content a:not(.fm-button,.wp-element-button,.button) {
  color:var(--fm-green);
  text-decoration:underline;
  text-underline-offset:3px;
}
.fm-entry-thumbnail {
  margin:0 0 24px;
}
.fm-post-list {
  display:grid;
  gap:28px;
}
.fm-entry--summary {
  padding-bottom:24px;
  border-bottom:1px solid var(--fm-border);
}
.fm-entry-title {
  font-size:24px;
}
.fm-entry-summary {
  margin-top:10px;
}
.fm-pagination {
  margin-top:32px;
}
.fm-pagination .nav-links {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.fm-pagination .page-numbers {
  display:inline-grid;
  place-items:center;
  min-width:44px;
  min-height:44px;
  padding:0 12px;
  border:1px solid var(--fm-border);
  border-radius:30px;
}
.fm-pagination .current {
  background:var(--fm-green);
  border-color:var(--fm-green);
  color:#fff;
}
.search-form {
  display:flex;
  gap:8px;
  max-width:480px;
}
.search-form label {
  flex:1;
}
.search-form .search-field {
  width:100%;
  min-height:44px;
  padding:9px 14px;
  border:1px solid var(--fm-border);
  border-radius:30px;
  background:var(--fm-surface);
}
.search-form .search-submit {
  min-height:44px;
  padding:0 18px;
  border-radius:30px;
  background:var(--fm-green);
  color:#fff;
}
.fm-not-found__actions {
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}
@media(min-width:768px) {
  .fm-site-main {
    padding-block:48px 80px;
  }
  .fm-page-title {
    font-size:44px;
  }
}

/* Homepage additions ------------------------------------------------------ */
/* Keeps visually hidden text inside the scrolling rail (it would otherwise widen the page). */
.fm-product-card {
  position:relative;
}
.fm-product-card h3 a {
  color:inherit;
}
.fm-product-card h3 a:hover {
  text-decoration:underline;
}
.fm-purchase__actions {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.fm-purchase__buy {
  width:100%;
  font-size:15px;
}
.fm-purchase__pack {
  font-weight:600;
}
.fm-purchase__status:empty {
  display:none;
}
.fm-purchase__status {
  font-size:12px;
  color:var(--fm-green);
}
.fm-button.is-loading {
  opacity:.7;
  cursor:progress;
}
.fm-button.is-added {
  background:var(--fm-clay);
  border-color:var(--fm-clay);
}
@media(min-width:480px) and (max-width:767px) {
  .fm-purchase :is(.fm-purchase__actions,.fm-purchase__status) {
    grid-column:1 / -1;
  }
}
.fm-purchase .fm-purchase__actions>.fm-button {
  grid-column:auto;
  width:100%;
}
.fm-dialog--video {
  width:min(860px,calc(100% - 28px));
}
.fm-video-player :is(iframe,video) {
  display:block;
  width:100%;
  aspect-ratio:16 / 9;
  border:0;
  border-radius:var(--fm-radius);
  background:#000;
}

/* WordPress / WooCommerce screen-reader text (e.g. quantity field labels). */
.screen-reader-text {
  position:absolute!important;
  width:1px;
  height:1px;
  margin:-1px;
  padding:0;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
  border:0;
}
.screen-reader-text:focus {
  position:static!important;
  width:auto;
  height:auto;
  margin:0;
  clip-path:none;
}
