/* =========================================================================
   Module-licence product layout (inc/product-modules.php) — PCMflash.
   Greys and black only; no orange accents in these elements.
   ========================================================================= */

/* ---- Summary: lead + checklist (short description) ------------------- */
.at-woo .at-sp-layout__summary .woocommerce-product-details__short-description .at-lead {
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg-1);
  margin: 0 0 12px;
}
.at-woo .at-checks {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
  display: grid;
  gap: 6px;
}
.at-woo .at-checks li {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-2);
}
.at-woo .at-checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 5px;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--rubber-black);
  border-bottom: 2px solid var(--rubber-black);
  transform: rotate(-45deg);
}

/* ---- Summary: "Find your module" ------------------------------------- */
.at-woo .at-modfind {
  position: relative;
  margin: 18px 0 14px;
  padding: 16px;
  background: var(--steel-silver-50);
  border: 1px solid var(--steel-silver-200);
  border-radius: var(--radius-md);
}
.at-woo .at-modfind__label {
  display: block;
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.at-woo .at-modfind__box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--pure-white);
  border: 1px solid var(--steel-silver);
  border-radius: var(--radius-sm);
  color: var(--fg-3);
}
.at-woo .at-modfind__box:focus-within { border-color: var(--rubber-black-70); }
.at-woo .at-modfind__box input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  border: 0 !important;
  background: transparent;
  box-shadow: none !important;
  outline: none;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--fg-1);
}
.at-woo .at-modfind__list {
  position: absolute;
  z-index: 30;
  left: 16px;
  right: 16px;
  top: calc(100% - 34px);
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--pure-white);
  border: 1px solid var(--steel-silver);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-3);
  max-height: 340px;
  overflow-y: auto;
}
.at-woo .at-modfind__opt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.at-woo .at-modfind__opt:hover,
.at-woo .at-modfind__opt.is-active { background: var(--steel-silver-100); }
.at-woo .at-modfind__t { font-size: 14px; font-weight: 700; color: var(--fg-1); }
.at-woo .at-modfind__s { font-size: 12.5px; color: var(--fg-2); }
.at-woo .at-modfind__none { padding: 10px; font-size: 13px; color: var(--fg-2); }
.at-woo .at-modfind__all {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.at-woo .at-modfind__all:hover { color: var(--fg-1); }

/* The selected variation's ECU list (WC prints the variation description). */
.at-woo .at-sp-layout__summary .woocommerce-variation-description,
.at-woo [data-combo-pcmflash] .woocommerce-variation-description {
  margin: 10px 0 12px;
  padding: 12px 14px;
  max-height: 220px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg-2);
  background: var(--steel-silver-50);
  border: 1px solid var(--steel-silver-200);
  border-radius: var(--radius-sm);
}
.at-woo .at-sp-layout__summary .woocommerce-variation-description p,
.at-woo [data-combo-pcmflash] .woocommerce-variation-description p { margin: 0; }

/* The popup uses the single page's finder and field styles at the same width. */
.at-woo .at-combo-modal:has([data-combo-pcmflash]) .at-combo-modal__panel { width: min(680px, 100%); }
.at-woo [data-combo-pcmflash] .at-modfind { margin-top: 0; margin-bottom: 28px; }
.at-woo [data-combo-pcmflash] .at-pcm { margin-bottom: 28px; }
.at-woo [data-combo-pcmflash] .at-pcm-serial { margin-top: 28px; }
.at-woo [data-combo-pcmflash] .woocommerce-variation-price { font-size: 20px; font-weight: 700; }

/* ---- Full-width product document ------------------------------------- */
.at-woo .at-pdoc {
  max-width: 1120px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg-2);
}
.at-woo .at-pdoc > section,
.at-woo .at-pdoc .at-pdoc__sec {
  padding: 40px 0;
  border-top: 1px solid var(--steel-silver-200);
}
.at-woo .at-pdoc .at-pdoc__sec:first-child { border-top: 0; padding-top: 8px; }
.at-woo .at-pdoc h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--rubber-black);
  margin: 0 0 6px;
}
.at-woo .at-pdoc .at-pdoc__intro { margin: 0 0 22px; max-width: 760px; color: var(--fg-2); }
.at-woo .at-pdoc h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: 0;
  color: var(--rubber-black);
  margin: 0 0 6px;
}
.at-woo .at-pdoc p { margin: 0 0 12px; }
.at-woo .at-pdoc a { color: var(--fg-1); text-decoration: underline; text-underline-offset: 3px; }
.at-woo .at-pdoc ul { margin: 0; padding-left: 18px; }
.at-woo .at-pdoc code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--steel-silver-100);
  padding: 1px 5px;
  border-radius: 3px;
}

/* Two-column bullet grid ("what it does" / "before you buy"). */
.at-woo .at-pdoc .at-grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.at-woo .at-pdoc .at-card {
  padding: 18px 20px;
  background: var(--steel-silver-50);
  border: 1px solid var(--steel-silver-200);
  border-radius: var(--radius-md);
}
.at-woo .at-pdoc .at-card p:last-child,
.at-woo .at-pdoc .at-card ul:last-child { margin-bottom: 0; }
.at-woo .at-pdoc .at-card li { margin: 0 0 6px; }

/* ---- Kit steps ------------------------------------------------------- */
.at-woo .at-kit {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  counter-reset: none;
}
.at-woo .at-kit__step {
  display: flex;
  flex-direction: column;
  background: var(--pure-white);
  border: 1px solid var(--steel-silver);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.at-woo .at-kit__media {
  position: relative;
  height: 220px;
  background: var(--steel-silver-100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.at-woo .at-kit__media img.at-kit__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  mix-blend-mode: multiply;
  padding: 14px;
}
.at-woo .at-kit__n {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--rubber-black);
  color: var(--pure-white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  line-height: 28px;
  text-align: center;
  z-index: 1;
}
.at-woo .at-kit__body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1 1 auto; }
.at-woo .at-kit__text { font-size: 14px; line-height: 1.6; }
.at-woo .at-kit__text p { margin: 0 0 8px; }
.at-woo .at-kit__foot {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  border-top: 1px solid var(--steel-silver-100);
}
.at-woo .at-kit__note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.at-woo .at-kit__price { font-family: var(--font-display); font-weight: 700; color: var(--fg-1); }
.at-woo .at-pdoc a.at-kit__link { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--fg-1); }
.at-woo .at-pdoc a.at-kit__link:hover { text-decoration: underline; }

/* ---- Module list ----------------------------------------------------- */
.at-woo .at-modlist__bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  background: var(--pure-white);
}
.at-woo .at-modlist__search {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--steel-silver);
  border-radius: var(--radius-sm);
  color: var(--fg-3);
  background: var(--pure-white);
}
.at-woo .at-modlist__search:focus-within { border-color: var(--rubber-black-70); }
.at-woo .at-modlist__search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  border: 0 !important;
  outline: none;
  box-shadow: none !important;
  background: transparent;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--fg-1);
}
.at-woo .at-modlist__count {
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-3);
}
.at-woo .at-modlist__list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  border-top: 1px solid var(--steel-silver-200);
}
.at-woo .at-modlist__item { border-bottom: 1px solid var(--steel-silver-200); }
.at-woo .at-modlist__item[hidden] { display: none; }
.at-woo .at-modlist__item summary {
  list-style: none;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto 20px;
  align-items: center;
  gap: 12px;
  padding: 12px 6px;
  cursor: pointer;
}
.at-woo .at-modlist__item summary::-webkit-details-marker { display: none; }
.at-woo .at-modlist__item summary:hover { background: var(--steel-silver-50); }
.at-woo .at-modlist__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  min-width: 34px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  background: var(--steel-silver-100);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-1);
}
.at-woo .at-modlist__item.is-included .at-modlist__num { background: var(--rubber-black); color: var(--pure-white); }
.at-woo .at-modlist__title { font-size: 15px; font-weight: 600; color: var(--fg-1); line-height: 1.35; }
.at-woo .at-modlist__tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--steel-silver-200);
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--fg-1);
  vertical-align: 1px;
}
.at-woo .at-modlist__meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-3); white-space: nowrap; }
.at-woo .at-modlist__price { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--fg-1); white-space: nowrap; }
.at-woo .at-modlist__chev { color: var(--fg-3); transition: transform 0.18s ease; }
.at-woo .at-modlist__item details[open] .at-modlist__chev { transform: rotate(180deg); }
.at-woo .at-modlist__body { padding: 2px 6px 16px 62px; }
.at-woo .at-modlist__ecus {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2 320px;
  column-gap: 28px;
}
.at-woo .at-modlist__ecus li {
  break-inside: avoid;
  padding: 3px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-2);
}
.at-woo .at-modlist__ecus li.is-hit { color: var(--fg-1); font-weight: 700; background: var(--steel-silver-100); }
.at-woo .at-modlist__foot {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.at-woo .at-modlist__funcs { font-size: 13px; font-style: italic; color: var(--fg-2); }
.at-woo .at-modlist__pick {
  appearance: none;
  border: 1px solid var(--rubber-black);
  background: var(--rubber-black);
  color: var(--pure-white);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.at-woo .at-modlist__pick:hover { background: var(--rubber-black-90); }
.at-woo .at-modlist__empty { margin: 16px 0 0; }
/* First 12 rows until "Show all" (search always looks at every row). */
.at-woo .at-modlist.is-capped:not(.is-searching) .at-modlist__item:nth-child(n+13) { display: none; }
.at-woo .at-modlist__more {
  display: none;
  width: 100%;
  margin-top: 12px;
  padding: 13px 16px;
  appearance: none;
  background: var(--pure-white);
  border: 1px solid var(--steel-silver);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-1);
  cursor: pointer;
}
.at-woo .at-modlist.is-capped:not(.is-searching) .at-modlist__more { display: block; }
.at-woo .at-modlist__more:hover { background: var(--steel-silver-50); }

/* ---- FAQ ------------------------------------------------------------- */
.at-woo .at-faq { border-top: 1px solid var(--steel-silver-200); }
.at-woo .at-faq details { border-bottom: 1px solid var(--steel-silver-200); }
.at-woo .at-faq summary {
  list-style: none;
  position: relative;
  padding: 16px 36px 16px 0;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--fg-1);
  cursor: pointer;
}
.at-woo .at-faq summary::-webkit-details-marker { display: none; }
.at-woo .at-faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 12px;
  font-size: 22px;
  font-weight: 400;
  color: var(--fg-3);
}
.at-woo .at-faq details[open] summary::after { content: "\2212"; }
.at-woo .at-faq details > div { padding: 0 36px 16px 0; }

/* ---- Small screens --------------------------------------------------- */
@media (max-width: 900px) {
  .at-woo .at-kit { grid-template-columns: 1fr; }
  .at-woo .at-kit__step { flex-direction: row; }
  .at-woo .at-kit__media { flex: 0 0 34%; height: auto; min-height: 160px; }
  .at-woo .at-pdoc .at-grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .at-woo .at-pdoc > section,
  .at-woo .at-pdoc .at-pdoc__sec { padding: 28px 0; }
  .at-woo .at-kit__step { flex-direction: column; }
  .at-woo .at-kit__media { flex: none; height: 180px; min-height: 0; }
  .at-woo .at-modlist__bar { flex-wrap: wrap; gap: 6px; }
  .at-woo .at-modlist__count { width: 100%; }
  .at-woo .at-modlist__item summary {
    grid-template-columns: 40px minmax(0, 1fr) 18px;
    grid-template-areas: "num title chev" "num meta chev";
    row-gap: 2px;
    column-gap: 10px;
  }
  .at-woo .at-modlist__num { grid-area: num; }
  .at-woo .at-modlist__title { grid-area: title; font-size: 14.5px; }
  .at-woo .at-modlist__meta { grid-area: meta; }
  .at-woo .at-modlist__price { grid-area: meta; justify-self: end; font-size: 14px; }
  .at-woo .at-modlist__chev { grid-area: chev; }
  .at-woo .at-modlist__body { padding-left: 6px; }
  .at-woo .at-modlist__pick { width: 100%; }
}
