/* ==========================================================================
   Cosara.in — WordPress additions

   Everything the prototype did not need, because it had no CMS: the two-column
   mega menu the content document specifies, core's alignment and caption
   classes, pagination, and the admin bar offset.

   The five prototype sheets are kept byte-for-byte as lifted from the approved
   build. Nothing is overridden here — only added. Values still resolve through
   tokens.css.
   ========================================================================== */

/* ---- Mega menu: 1, 2 and 4 column variants -----------------------------
   components.css ships --3col only. The content document's Products menu has
   two columns, each with a clickable heading. */
.megamenu--1col .megamenu__inner { grid-template-columns: minmax(0, 1fr); }
.megamenu--2col .megamenu__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.megamenu--4col .megamenu__inner { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1024px) {
  .megamenu--1col .megamenu__inner,
  .megamenu--2col .megamenu__inner,
  .megamenu--4col .megamenu__inner { grid-template-columns: minmax(0, 1fr); }
}

/* A column heading is a link now, so it needs the same affordance as the
   items below it without changing its weight. */
.megamenu__heading a { color: inherit; text-decoration: none; }
.megamenu__heading a:hover { color: var(--c-cyan-deep); text-decoration: underline; text-underline-offset: 3px; }

/* Family headings on the product archive link through to the family page. */
.kitsec__title a { color: inherit; text-decoration: none; }
.kitsec__title a:hover { color: var(--c-cyan-deep); }

/* ---- Kit card photography -----------------------------------------------
   The prototype's cards hold an icon; once real pack shots are uploaded they
   fill the same 16:10 panel. */
.kitcard__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kitcard__media:has(.kitcard__img) { padding: 0; }

/* ---- Utility bar images ------------------------------------------------- */
.utility__powered img,
.utility__iso img { height: 26px; width: auto; display: block; }
@media (max-width: 600px) {
  .utility__powered img,
  .utility__iso img { height: 20px; }
}

/* ---- Core alignment and media classes ---------------------------------- */
.alignleft { float: left; margin: 0 var(--s-6) var(--s-4) 0; }
.alignright { float: right; margin: 0 0 var(--s-4) var(--s-6); }
.aligncenter { display: block; margin-inline: auto; }
.alignwide { width: min(100%, var(--w-container-wide)); margin-inline: auto; }
.alignfull { width: 100%; }

.wp-caption { max-width: 100%; }
.wp-caption-text,
.wp-element-caption {
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  color: var(--c-grey);
  margin-top: var(--s-2);
}

.prose img { height: auto; border-radius: var(--r-card); }
.prose ul, .prose ol { margin: 0 0 var(--s-6) var(--s-6); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: var(--s-2); }
.prose a { color: var(--c-cyan-deep); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--c-slate); }
.prose h3 { font-size: var(--fs-h4); line-height: var(--lh-h4); margin-top: var(--s-10); }
.prose blockquote {
  margin: var(--s-8) 0;
  padding-left: var(--s-6);
  border-left: 3px solid var(--c-cyan);
  font-size: 21px;
  line-height: 1.45;
}
.prose table { width: 100%; border-collapse: collapse; margin-bottom: var(--s-6); }
.prose th, .prose td { text-align: left; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--c-line); }
.prose th { font-weight: var(--fw-bold); color: var(--c-slate); }

/* ---- Pagination -------------------------------------------------------- */
.pagination { margin-top: var(--s-15); }
.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
}
.page-numbers {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding-inline: var(--s-3);
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  color: var(--c-slate);
  text-decoration: none;
  font-size: var(--fs-meta);
  transition: border-color var(--t-base), color var(--t-base), background var(--t-base);
}
.page-numbers:hover { border-color: var(--c-cyan-deep); color: var(--c-cyan-deep); }
.page-numbers.current {
  background: var(--c-cyan-deep);
  border-color: var(--c-cyan-deep);
  color: var(--c-white);
  font-weight: var(--fw-semi);
}
.page-numbers.dots { border-color: transparent; }

/* ---- Logged-in admin bar ------------------------------------------------
   The header is sticky, so it has to clear the bar rather than sit under it. */
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

/* ---- Screen reader text (core) ----------------------------------------- */
.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
