/* lm-site.css — site-wide tweaks layered on top of the mirrored WP chrome.
   Extracted from Layout.astro's inline block. Load order: after wp-inline so
   these win on ties. */

/* Ad slot above nav: reserve height so async injection doesn't shift content (CLS). */
.lm-top-container { display: flex; justify-content: center; }
.lm-top-placement { width: 100%; max-width: 970px; min-height: 90px; }
@media (max-width: 921.99px) {
  .lm-top-placement { min-height: 50px; }
}

/* Logo image cap. HTML width/height attrs are 294; cap to keep the header short. */
.site-branding img.custom-logo,
.site-logo-img img.custom-logo {
  width: auto !important;
  height: auto !important;
  max-width: 150px !important;
  max-height: 150px !important;
}
body.ast-header-break-point .site-branding img.custom-logo,
body.ast-header-break-point .site-logo-img img.custom-logo {
  max-width: 100px !important;
  max-height: 100px !important;
}

/* Cap .site-branding so the logo doesn't inflate the desktop flex row;
   image overflows visibly below. */
body.ast-desktop .site-branding {
  max-height: 100px;
  overflow: visible;
}

/* Safety cap on the desktop primary-menu height when items wrap. */
body.ast-desktop #primary-menu,
body.ast-desktop .main-header-menu {
  max-height: 200px;
  overflow: visible;
}

/* Archive pagination. Astra styles .ast-pagination; we emit .navigation.pagination. */
.navigation.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.navigation.pagination .page-numbers {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
  text-decoration: none;
  line-height: 1.2;
  min-width: 32px;
  text-align: center;
}
.navigation.pagination .page-numbers.current {
  background: var(--ast-global-color-0, #0066c0);
  color: #fff;
  border-color: var(--ast-global-color-0, #0066c0);
}
.navigation.pagination .page-numbers.dots {
  border-color: transparent;
  padding: 6px 4px;
}
.navigation.pagination .page-numbers:hover:not(.current):not(.dots) {
  background: #f5f5f5;
}

/* PostTOC — fallback styles when the ez-toc plugin CSS isn't mirrored. */
#ez-toc-container {
  margin: 1.5em 0;
  padding: 1em 1.5em;
  background: #f7f7f7;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  font-size: 14px;
  max-width: 100%;
}
#ez-toc-container .ez-toc-title { font-weight: 700; margin: 0 0 0.5em; font-size: 15px; }
#ez-toc-container nav > ul { margin: 0; padding-left: 1.25em; list-style: decimal; }
#ez-toc-container nav ul ul { list-style: lower-alpha; padding-left: 1.5em; margin-top: 0.25em; }
#ez-toc-container .ez-toc-link { color: #0066c0; text-decoration: none; }
#ez-toc-container .ez-toc-link:hover { text-decoration: underline; }

/* AmazonCard — compact Amazon product card on /tool-shop/ etc. */
.lm-amazon-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px;
  margin: 0 0 12px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  background: #fff;
  max-height: 180px;
  overflow: hidden;
}
.lm-amazon-card__img {
  display: block;
  width: 140px;
  height: 140px;
  overflow: hidden;
  border-radius: 4px;
  background: #fafafa;
}
.lm-amazon-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.lm-amazon-card__img--placeholder { background: #f0f0f0; }
.lm-amazon-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.lm-amazon-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #0066c0;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
}
.lm-amazon-card__title:hover { text-decoration: underline; }
.lm-amazon-card__specs {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.4;
  color: #555;
}
.lm-amazon-card__specs li { margin: 0; }
.lm-amazon-card__cta { margin: 0; }
.lm-amazon-card__cta .wp-block-button__link {
  display: inline-block;
  background: #ff9900;
  color: #111;
  border: 1px solid #a88734;
  border-radius: 3px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
}
.lm-amazon-card__cta .wp-block-button__link:hover { background: #f0a030; }
@media (max-width: 520px) {
  .lm-amazon-card {
    grid-template-columns: 96px 1fr;
    max-height: 160px;
    padding: 10px;
    gap: 12px;
  }
  .lm-amazon-card__img { width: 96px; height: 96px; }
  .lm-amazon-card__title { font-size: 14px; }
}
