/* latest-rows.css
   Gear Patrol-style "The Latest" list rows for product, gear,
   article and link cards. Loaded after styles.css. Written from scratch;
   not a copy of any third-party CSS. Does not restyle the header, footer,
   home hero, or the Articles page Third-Party box. */

.section-label {
  font-family: var(--font-sans, "Source Sans 3", "Segoe UI", sans-serif);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.2;
  color: var(--text, #141414);
  text-align: left;
  border-top: 0;
  position: relative;
  margin: 2.5rem 0 1.35rem;
  padding-top: 1.05rem;
}
.section-label::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: #D6D6D4;
}
.section-label::after {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 3.25rem;
  height: 3px;
  background: #141414;
}

.latest-list {
  display: grid !important;
  flex-wrap: unset;
  justify-content: start;
  align-items: stretch;
  grid-template-columns: 1fr;
  column-gap: 70px;
  row-gap: 2.5rem; /* ~40px on a one-column (phone) list */
  margin: 0 0 2rem !important;
  width: 100%;
}
.latest-list > * {
  flex: none !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0;
}

@media (min-width: 768px) {
  .latest-list {
    /* Two flexible columns inside the 830px content cap (not a fixed 2x480 that would overflow). */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 70px;
    /* ~72px edge-to-edge, in the 70–75px range of Gear Patrol "The Latest". */
    row-gap: 72px;
  }
}

.latest-list .latest-row,
.latest-list .product-card.latest-row,
.latest-list .article-card.latest-row,
.latest-list .category-card.latest-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 23px;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 120px !important;
  max-height: none !important;
  margin: 0;
  padding: 0 !important;
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  text-align: left;
  color: var(--text, #141414);
  position: relative;
  z-index: 0;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  transform: none;
}
.latest-list .latest-row:hover h5,
.latest-list .latest-row:hover .h5,
.latest-list .latest-row:hover .latest-title,
.latest-list .latest-row:hover .latest-title-link {
  transform: none;
  color: inherit;
}

.latest-list .latest-thumb {
  flex: 0 0 90px;
  width: 90px !important;
  height: 90px !important;
  max-width: 90px !important;
  max-height: 90px !important;
  object-fit: cover !important;
  object-position: center !important;
  background: #E8E7E3;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  align-self: center;
  overflow: hidden;
  flex-shrink: 0;
  pointer-events: none;
}
.latest-list .latest-thumb svg {
  width: 54px;
  height: 54px;
  display: block;
  overflow: visible;
}
@media (min-width: 768px) {
  .latest-list .latest-thumb {
    flex-basis: 87px;
    width: 87px !important;
    height: 87px !important;
    max-width: 87px !important;
    max-height: 87px !important;
  }
}

.latest-list .latest-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.08rem;
  overflow: visible;
}

.latest-list .latest-title,
.latest-list .latest-row h5,
.latest-list .latest-row .h5,
.latest-list .latest-row h3.h5 {
  font-family: var(--font-sans, "Source Sans 3", "Segoe UI", sans-serif);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  color: #141414;
  margin: 0;
  max-width: 100%;
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

.latest-list .latest-title-link {
  color: #141414 !important;
  text-decoration: none;
}
.latest-list .latest-title-link:hover,
.latest-list .latest-title-link:focus-visible {
  color: #141414 !important;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.latest-list .latest-kicker {
  font-family: var(--font-sans, "Source Sans 3", "Segoe UI", sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4A5A68;
  margin: 0;
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  max-width: 100%;
}

.latest-list .latest-row .why,
.latest-list .latest-why,
.latest-list .latest-row .latest-links {
  font-family: var(--font-sans, "Source Sans 3", "Segoe UI", sans-serif);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  color: #4A4A4A;
  margin: 0;
  max-width: 100%;
  display: block;
  -webkit-box-orient: initial;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}
.latest-list .latest-links {
  list-style: none;
  padding: 0;
}
.latest-list .latest-links li { margin: 0.1rem 0; }

.latest-list .latest-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.2rem;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  flex-shrink: 0;
}

.latest-list .latest-shop,
.latest-list .latest-row .btn-primary,
.latest-list .latest-row a.btn {
  flex: 0 0 auto;
  margin: 0 !important;
  align-self: center;
  width: auto !important;
  max-width: 100%;
  height: auto;
  padding: 0.12rem 0.4rem;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
  border-radius: 0;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
  box-shadow: none;
}
.latest-list .latest-row .btn-primary.product-btn {
  max-width: 100%;
  overflow: visible;
  text-overflow: unset;
  white-space: nowrap;
}
.latest-list .latest-row:hover .btn-primary,
.latest-list .latest-row.card-linked:hover .stretched-link.btn-primary {
  box-shadow: none;
}

.latest-list .latest-shop,
.latest-list .latest-title-link {
  position: relative;
}
.latest-list .visually-hidden {
  left: 0;
  top: 0;
}

/* Informational panels and the Third-Party box are not list rows. */
.card-std,
#tip-jar,
.latest-skip {
  /* leave existing panel styles from styles.css */
}

/* Beat styles.css `.card-grid .product-card` width/min-height !important rules. */
.card-grid.latest-list .product-card.latest-row,
.card-grid.latest-list .article-card.latest-row,
.card-grid.latest-list .category-card.latest-row {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 120px !important;
  height: auto !important;
}


/* Hover/focus glow and overlay only on fine-pointer desktops, so mobile long-press
   and back-navigation cannot stick a hover or focus overlay. */
@media (hover: hover) and (pointer: fine) {
  .latest-list .latest-row:hover,
  .latest-list .latest-row:focus-within {
    box-shadow: 0 0 0 1px #C23A2B, 0 8px 22px rgba(194, 58, 43, 0.36);
    z-index: 1;
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .latest-list .latest-row:hover,
  .latest-list .latest-row:focus-within {
    animation: vcCardGlow 1.8s ease-in-out infinite;
  }
}
@keyframes vcCardGlow {
  0%, 100% { box-shadow: 0 0 0 1px #C23A2B, 0 8px 22px rgba(194, 58, 43, 0.32); }
  50% { box-shadow: 0 0 0 2px #C23A2B, 0 12px 30px rgba(194, 58, 43, 0.5); }
}

.latest-list .latest-main {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 23px;
  width: 100%;
  min-width: 0;
  transition: filter 0.25s ease;
}

/* Whole-card link: one focusable control covering the row. */
.latest-list .latest-card-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
}
.latest-list .latest-card-link:focus {
  outline: none;
}
.latest-list .latest-row:focus-within {
  /* glow (above) is the focus cue; keep a visible ring for keyboard users */
}
.latest-list .latest-row:focus-within:has(.latest-card-link:focus-visible) {
  outline: 3px solid #C23A2B;
  outline-offset: 3px;
}

/* Thorne-style description overlay. Pointer-events none so the single card link stays clickable. */
.latest-list .latest-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.7rem 0.85rem;
  background: rgba(255, 255, 255, 0.84);
  color: #141414;
  opacity: 0;
  pointer-events: none;
  overflow: auto;
  box-sizing: border-box;
  transition: opacity 0.25s ease;
}
.latest-list .latest-overlay-title {
  font-family: var(--font-sans, "Source Sans 3", "Segoe UI", sans-serif);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  max-width: 100%;
}
.latest-list .latest-overlay-text {
  font-family: var(--font-sans, "Source Sans 3", "Segoe UI", sans-serif);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  color: #4A4A4A;
  margin: 0;
  max-width: 100%;
}

/* Desktop fine-pointer: hover and keyboard focus still show the description overlay.
   Touch/mobile: overlay stays off except when the info button opens .latest-info-open. */
@media (hover: hover) and (pointer: fine) {
  .latest-list .latest-row.latest-has-overlay:hover .latest-overlay,
  .latest-list .latest-row.latest-has-overlay:focus-within .latest-overlay {
    opacity: 1;
  }
  .latest-list .latest-row.latest-has-overlay:hover .latest-main,
  .latest-list .latest-row.latest-has-overlay:focus-within .latest-main {
    filter: blur(4px);
  }
  .latest-list .latest-info-btn,
  .latest-list .latest-info-close {
    display: none !important;
  }
}
/* JS mirrors the media query on <html> so tests and mixed-input devices stay in sync. */
html.latest-fine-pointer .latest-list .latest-row.latest-has-overlay:hover .latest-overlay,
html.latest-fine-pointer .latest-list .latest-row.latest-has-overlay:focus-within .latest-overlay {
  opacity: 1;
}
html.latest-fine-pointer .latest-list .latest-row.latest-has-overlay:hover .latest-main,
html.latest-fine-pointer .latest-list .latest-row.latest-has-overlay:focus-within .latest-main {
  filter: blur(4px);
}
html.latest-fine-pointer .latest-list .latest-info-btn,
html.latest-fine-pointer .latest-list .latest-info-close {
  display: none !important;
}

.latest-list .latest-row.latest-info-open .latest-overlay {
  opacity: 1;
}
.latest-list .latest-row.latest-info-open .latest-main {
  filter: blur(4px);
}

/* Touch-only info control: 44px target, sibling of the card link, top-right. */
.latest-list .latest-info-btn,
.latest-list .latest-info-close {
  position: absolute;
  z-index: 4;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #141414;
  -webkit-tap-highlight-color: transparent;
}
.latest-list .latest-info-btn { top: 0; right: 0; }
.latest-list .latest-info-close { top: 0; left: 0; display: none; }
.latest-list .latest-row.latest-info-open .latest-info-close { display: flex; }
.latest-list .latest-info-btn-mark,
.latest-list .latest-info-close-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #141414;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans, "Source Sans 3", "Segoe UI", sans-serif);
  font-size: 13px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  color: #141414;
  box-shadow: 0 1px 3px rgba(20, 20, 20, 0.18);
}
.latest-list .latest-info-close-mark {
  font-style: normal;
  font-size: 16px;
  font-weight: 600;
}
.latest-list .latest-info-btn:focus-visible,
.latest-list .latest-info-close:focus-visible {
  outline: 3px solid #C23A2B;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .latest-list .latest-row,
  .latest-list .latest-overlay,
  .latest-list .latest-main {
    transition: none !important;
    animation: none !important;
  }
}
