/* AffiliateHub Connector: hub posts laid out like site-starter's (quick picks table, product cards
   with specs and buy box, pros/cons, good fit/skip if, verdict, spec table, FAQ).
   Colours follow the theme's --accent / --accent-dark / --accent-tint when it has them; any --ah-*
   token can be overridden in the theme or in Customizer → Additional CSS. */
:root{--ah-primary:#1f2328;--ah-primary-dark:#111418;--ah-accent:var(--accent,#b8322a);--ah-accent-dark:var(--accent-dark,#8f231d);--ah-soft:var(--accent-tint,#f6f1ea);--ah-surface:#fff;--ah-stripe:#f8f7f5;--ah-border:#e3e0da;--ah-text:#22252a;--ah-muted:#6b6f76;--ah-pro:#15803d;--ah-on:#fff;--ah-r:8px;--ah-font:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}

/* Components use a compact sans-serif type, whatever the article's body font. */
.ah-disclosure,.ah-quick-picks-wrap,.ah-products,.ah-hub-post .wp-block-table,.ah-hub-post .wp-block-details{font-family:var(--ah-font);font-size:1rem;line-height:1.5;color:var(--ah-text)}

.ah-disclosure{font-size:.875rem;background:var(--ah-soft);border-left:4px solid var(--ah-accent);border-radius:0 var(--ah-r) var(--ah-r) 0;padding:8px 12px;margin:0 0 1.2em}

.ah-badge{display:inline-block;background:var(--ah-accent);color:var(--ah-on);font:700 .78rem/1 var(--ah-font);letter-spacing:.02em;padding:6px 10px;border-radius:999px;vertical-align:middle;white-space:nowrap}
.ah-badge-sm{font-size:.7rem;padding:4px 8px;margin-left:4px}

/* Quick picks */
.ah-quick-picks-wrap{margin:1.5em 0}
.ah-quick-picks{width:100%;border-collapse:separate;border-spacing:0;margin:0;background:var(--ah-surface);border:1px solid var(--ah-border);border-radius:var(--ah-r);overflow:hidden;font-size:.95rem}
.ah-quick-picks-wrap .ah-quick-picks th,.ah-quick-picks-wrap .ah-quick-picks td{padding:11px 12px;text-align:left;vertical-align:top;border:0;border-top:1px solid var(--ah-border);font:400 .95rem/1.45 var(--ah-font);letter-spacing:0;text-transform:none;white-space:normal;color:var(--ah-text);background:none}
.ah-quick-picks-wrap .ah-quick-picks tbody tr{background:none}
.ah-quick-picks-wrap .ah-quick-picks thead th{background:var(--ah-primary);color:var(--ah-on);font-weight:700;border-top:0}
.ah-quick-picks-wrap .ah-quick-picks tbody tr:nth-child(even) td{background:var(--ah-stripe)}
.ah-quick-picks-wrap .ah-quick-picks .ah-qp-n{width:2.2em;text-align:center;color:var(--ah-muted);font-weight:700}
.ah-quick-picks-wrap .ah-quick-picks thead .ah-qp-n{color:var(--ah-on)}
.ah-quick-picks-wrap .ah-quick-picks .ah-qp-p{text-align:right;white-space:nowrap;min-width:6.5em}
.ah-quick-picks .ah-price{font-weight:700;font-size:1em;color:var(--ah-text)}
.ah-quick-picks .ah-price-asof{display:none}
.ah-quick-picks-wrap .ah-oos .ah-price{display:inline-block;max-width:7.5em;white-space:normal;text-align:right;font-weight:400;font-size:.8rem;line-height:1.3;color:var(--ah-muted)}
.ah-quick-picks-wrap a.ah-qp-link{color:var(--ah-accent-dark);font-weight:700;text-decoration:underline;text-underline-offset:2px;background:none}
.ah-quick-picks-wrap a.ah-qp-link:hover{color:var(--ah-accent);background:none}
@media (max-width:600px){
  .ah-quick-picks-wrap .ah-quick-picks thead{display:none}
  .ah-quick-picks-wrap .ah-quick-picks tr{display:grid;grid-template-columns:2em minmax(0,1fr) auto;column-gap:8px;border-top:1px solid var(--ah-border)}
  .ah-quick-picks-wrap .ah-quick-picks tbody tr:first-child{border-top:0}
  .ah-quick-picks-wrap .ah-quick-picks td{border:0;padding:10px 6px}
  .ah-quick-picks-wrap .ah-quick-picks tbody tr:nth-child(even){background:var(--ah-stripe)}
  .ah-quick-picks-wrap .ah-quick-picks tbody tr:nth-child(even) td{background:none}
  .ah-quick-picks-wrap .ah-quick-picks .ah-qp-n{grid-row:span 2}
  .ah-quick-picks-wrap .ah-quick-picks .ah-qp-for{grid-column:2/4;grid-row:2;padding-top:0;color:var(--ah-muted);font-size:.9rem}
  .ah-quick-picks-wrap .ah-quick-picks .ah-qp-p{min-width:0}
}

/* Product cards */
.ah-products{margin:1.5em 0}
.ah-product{background:var(--ah-surface);border:1px solid var(--ah-border);border-radius:var(--ah-r);padding:18px;margin:0 0 24px;box-shadow:0 1px 2px rgba(0,0,0,.04),0 6px 18px rgba(0,0,0,.04)}
.ah-product p,.ah-product ul,.ah-product dl{font-size:inherit;line-height:inherit}
.ah-card-hd{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.ah-num{display:inline-flex;align-items:center;justify-content:center;flex:none;width:36px;height:36px;border-radius:50%;background:var(--ah-primary);color:var(--ah-on);font:700 1.05rem/1 var(--ah-font)}
.ah-card-top{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
.ah-product-image{display:flex;align-items:center;justify-content:center;aspect-ratio:1;max-width:300px;width:100%;margin:0 auto;border:1px solid var(--ah-border);border-radius:var(--ah-r);overflow:hidden;background:var(--ah-surface)}
.ah-product-image a{display:flex;width:100%;height:100%;align-items:center;justify-content:center}
.ah-product-image img{width:100%;height:100%;max-width:none;max-height:none;margin:0;object-fit:contain;border:0;box-shadow:none}
.ah-card-info{min-width:0}
.ah-product .ah-product-name{font-family:var(--ah-font);font-size:1.25rem;font-weight:700;line-height:1.3;letter-spacing:0;text-transform:none;margin:0 0 .35em;padding:0;border:0}
.ah-product .ah-product-name::after,.ah-product .ah-product-name::before{display:none}
.ah-products .ah-product-name a{color:var(--ah-text);text-decoration:none;background:none}
.ah-products .ah-product-name a:hover{color:var(--ah-accent-dark);text-decoration:underline;background:none}
.ah-products .ah-product-image a,.ah-products .ah-product-image a:hover{background:none}
.ah-product .ah-best-for{margin:0 0 .6em;font-size:.95rem}
.ah-specs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 .6em;padding:0}
.ah-specs div{background:var(--ah-stripe);border:1px solid var(--ah-border);border-radius:var(--ah-r);padding:7px 10px;min-width:0}
.ah-specs dt{font-size:.72rem;font-weight:400;text-transform:uppercase;letter-spacing:.05em;color:var(--ah-muted);line-height:1.3;margin:0}
.ah-specs dd{margin:0;font-weight:700;font-size:.95rem;line-height:1.35;color:var(--ah-text);overflow-wrap:anywhere}
.ah-buy{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;margin:.7em 0 0}
.ah-price{font-size:1.55rem;font-weight:700;line-height:1.3;color:var(--ah-primary-dark)}
.ah-price:empty,.ah-price-asof:empty{display:none}
.ah-price-asof{flex-basis:100%;order:1;font-size:.78rem;color:var(--ah-muted)}
.ah-buy .ah-cta{order:2}
.ah-products a.ah-cta,.ah-products a.ah-cta:visited{display:inline-flex;align-items:center;justify-content:center;min-height:46px;margin-top:4px;padding:12px 22px;border:0;border-radius:var(--ah-r);background:var(--ah-accent);color:var(--ah-on);font:700 1rem/1.35 var(--ah-font);text-align:center;text-decoration:none;box-shadow:none}
.ah-products a.ah-cta:hover,.ah-products a.ah-cta:focus{background:var(--ah-accent-dark);color:var(--ah-on);text-decoration:none}
.ah-oos .ah-price{font-size:1rem;font-weight:700;color:var(--ah-text)}
.ah-product .ah-summary{margin:14px 0 0}
.ah-pc,.ah-fit{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin-top:14px}
.ah-pc>div,.ah-fit>div{border:1px solid var(--ah-border);border-radius:var(--ah-r);padding:12px 14px;background:var(--ah-stripe)}
.ah-fit>div{background:var(--ah-surface)}
.ah-pc strong,.ah-fit strong{display:block;margin:0 0 .4em;font-size:.95rem}
.ah-products .ah-pc ul,.ah-products .ah-fit ul{margin:0;padding:0 0 0 1.2em;font-size:.95rem;list-style:disc;background:none;border:0}
.ah-products .ah-pc ul>li,.ah-products .ah-fit ul>li{position:static;margin:0 0 .3em;padding:0;list-style:disc}
.ah-products .ah-pc ul>li::before,.ah-products .ah-fit ul>li::before{content:none;display:none}
.ah-pc .ah-pros{border-top:4px solid var(--ah-pro)}
.ah-pros strong{color:var(--ah-pro)}
.ah-pc .ah-cons{border-top:4px solid var(--ah-accent)}
.ah-cons strong{color:var(--ah-accent-dark)}
.ah-product .ah-verdict{background:var(--ah-soft);border:1px solid var(--ah-border);border-left:5px solid var(--ah-primary);border-radius:var(--ah-r);padding:14px 16px;margin:1em 0 0;font-style:normal}

@media (min-width:640px){
  .ah-card-top{grid-template-columns:240px minmax(0,1fr);gap:22px;align-items:start}
  .ah-pc,.ah-fit{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Spec table and FAQ of hub posts (core blocks) */
.ah-hub-post .wp-block-table{margin:1.5em 0;overflow-x:auto}
.ah-hub-post .wp-block-table table{border-collapse:separate;border-spacing:0;min-width:100%;width:auto;font-size:.93rem;border:1px solid var(--ah-border);border-radius:var(--ah-r);table-layout:auto}
.ah-hub-post .wp-block-table th,.ah-hub-post .wp-block-table td{font-family:var(--ah-font);white-space:normal;padding:10px 14px;text-align:left;vertical-align:top;border:0;border-bottom:1px solid var(--ah-border);min-width:150px;background:var(--ah-surface)}
.ah-hub-post .wp-block-table thead th{background:var(--ah-primary);color:var(--ah-on);font-weight:700;font-size:inherit;letter-spacing:0;text-transform:none}
.ah-hub-post .wp-block-table tbody tr{background:none}
.ah-hub-post .wp-block-table tbody tr:nth-child(even) td{background:var(--ah-stripe)}
.ah-hub-post .wp-block-table tbody tr>td:first-child,.ah-hub-post .wp-block-table tbody tr:nth-child(even)>td:first-child,.ah-hub-post .wp-block-table thead th:first-child{position:sticky;left:0;z-index:1;min-width:130px;max-width:160px;white-space:normal;overflow-wrap:normal;font-weight:600;color:var(--ah-text);background:var(--ah-soft);box-shadow:1px 0 0 var(--ah-border)}
.ah-hub-post .wp-block-table thead th:first-child{background:var(--ah-primary-dark);color:var(--ah-on);z-index:2}
.ah-hub-post .wp-block-table tbody tr:last-child>*{border-bottom:0}
.ah-hub-post .wp-block-details{background:var(--ah-surface);border:1px solid var(--ah-border);border-radius:var(--ah-r);margin:0 0 10px;padding:0 16px}
.ah-hub-post .wp-block-details summary{position:relative;cursor:pointer;font-weight:700;padding:14px 30px 14px 0;list-style:none}
.ah-hub-post .wp-block-details summary::-webkit-details-marker{display:none}
.ah-hub-post .wp-block-details summary::after{content:"+";position:absolute;right:2px;top:10px;font-size:1.4rem;line-height:1.2;color:var(--ah-accent)}
.ah-hub-post .wp-block-details[open] summary::after{content:"\2212"}
.ah-hub-post .wp-block-details[open]{padding-bottom:6px}
.ah-hub-post .wp-block-details>:not(summary){margin-top:0}
