/* Narrow corrections to the existing Alpha design, not a replacement theme. */
/* Compact product galleries, 2026-09-11. Preserve original media and lightbox. */
.ap-product-page .ap-product-grid > .ap-product-gallery {
  width: 100%;
  max-width: 420px;
  justify-self: center;
}
.ap-product-page .ap-product-gallery .woocommerce-product-gallery__image > a > img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
}
@media (max-width: 780px) {
  .ap-product-page .ap-product-grid > .ap-product-gallery {
    width: 80%;
    max-width: 280px;
  }
  .ap-product-page .ap-product-gallery .woocommerce-product-gallery__image > a > img {
    max-height: 280px;
  }
}

/* Mobile width repair, 2026-09-11: contain padding and remove the shared header's 90px gap. */
header.wp-block-template-part:has(.ah-brand),
header.wp-block-template-part:has(.ah-brand) .ah-header-inner,
.alpha-signature .ah-site-footer,
.mailpoet_form_popup {
  box-sizing: border-box;
}
@media (max-width: 700px) {
  header.wp-block-template-part .is-layout-flex:has(> .ah-brand) {
    gap: 12px !important;
    min-width: 0;
    max-width: 100% !important;
  }
  header.wp-block-template-part .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none !important;
  }
  header.wp-block-template-part .wp-block-navigation__responsive-container-open {
    display: flex !important;
  }
  header.wp-block-template-part .ah-brand {
    width: 160px !important;
    max-width: min(40vw, 160px) !important;
    min-width: 0;
    flex: 0 1 160px;
  }
  header.wp-block-template-part .is-layout-flex:has(> .ah-brand) > .wp-block-group {
    gap: 0 !important;
    flex: 0 0 auto;
  }
  .mailpoet_form_popup {
    box-sizing: border-box !important;
    max-width: 100% !important;
  }
}
body.home main.has-global-padding > .wp-block-group.alignfull.has-global-padding {
  margin-inline: 0 !important;
  width: auto !important;
  max-width: 100% !important;
  box-sizing: border-box;
}
body.woocommerce-cart [id^="mp_form_below_posts"],
body.woocommerce-checkout [id^="mp_form_below_posts"],
body.woocommerce-cart .mailpoet_form_popup_overlay,
body.woocommerce-checkout .mailpoet_form_popup_overlay,
body.woocommerce-cart .mailpoet_form_popup,
body.woocommerce-checkout .mailpoet_form_popup { display: none !important; }
body.term-build-a-research-set .woocommerce-result-count,
body.term-build-a-research-set .woocommerce-ordering { display: none !important; }
.alpha-account-help, .alpha-compare-note { max-width: 1080px; margin: 2rem auto; padding: 1.5rem; border-top: 1px solid #c7b995; color: #252525; }
.alpha-cookie-panel[hidden], .alpha-cookie-actions [hidden] { display: none !important; }
.alpha-cookie-panel { position: fixed; z-index: 10000; inset: auto 20px 20px auto; width: min(640px, calc(100vw - 40px)); max-height: calc(100dvh - 40px); overflow: auto; box-sizing: border-box; padding: 24px; color: #222; background: #fffdf8; border: 1px solid #b59a60; box-shadow: 0 8px 40px #0003; font-size: 15px; line-height: 1.5; }
.alpha-cookie-panel * { box-sizing: border-box; }
.alpha-cookie-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 6px; color: #705727; }
.alpha-cookie-panel h2 { font-size: 25px; margin: 0 0 10px; }
.alpha-cookie-panel p { margin: 0 0 14px; }
.alpha-cookie-panel .alpha-cookie-detail { font-size: 13px; }
.alpha-cookie-panel a { color: #4f401d; text-decoration: underline; }
.alpha-cookie-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0; }
.alpha-cookie-options label { display: flex; gap: 10px; align-items: start; cursor: pointer; }
.alpha-cookie-options input { width: 20px; height: 20px; margin-top: 3px; accent-color: #57431c; flex-shrink: 0; }
.alpha-cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.alpha-cookie-actions button { flex: 1 1 150px; min-height: 44px; padding: 10px 14px; border: 1px solid #333; color: #fff; background: #252525; border-radius: 0; font: inherit; cursor: pointer; }
.alpha-cookie-actions button:hover { background: #443c2d; }
.alpha-cookie-actions button:focus-visible, .alpha-cookie-panel a:focus-visible, .alpha-cookie-footer button:focus-visible { outline: 3px solid #9b6f1e; outline-offset: 3px; }
.alpha-cookie-footer { padding: 12px 24px; text-align: center; background: #f8f6f0; color: #222; }
.alpha-cookie-footer button { font: inherit; background: transparent; color: inherit; border: 0; text-decoration: underline; cursor: pointer; min-height: 44px; padding: 8px 16px; }
.alpha-cookie-noscript { text-align: center; font-size: 13px; }
@media (max-width: 540px) { .alpha-cookie-panel { inset: auto 10px 10px 10px; width: auto; max-height: calc(100dvh - 20px); padding: 18px; } .alpha-cookie-options { grid-template-columns: 1fr; gap: 10px; } }
@media (prefers-reduced-motion: reduce) { .alpha-cookie-panel { scroll-behavior: auto; } }
