/* normally 1024px */
#news-container {
  display: flex;
  max-width: 1232px;
  margin: 0 auto;
  margin-top: 5vh;
  gap: 24px;
  flex-direction: row-reverse;
  align-items: flex-start; }

#article-container {
  text-align: left;
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  width: 70%;
  justify-content: center;
  background-color: #fff;
  padding: 24px;
  border: 1px solid #ccc; }

#article-container h1 {
  margin: initial;
  font-size: 280%;
  line-height: 1; }

#other-articles {
  display: flex;
  flex-wrap: wrap;
  width: 30%;
  background: #fff;
  /*border: 1px solid #ccc;*/ }

#other-articles .header {
  display: flex;
  width: 100%; }

#other-articles .header h3 {
  margin: 24px auto 24px auto;
  font-weight: bold;
  font-size: 160%; }

#main-photo {
  margin: 24px -24px 0 -24px;
  display: flex;
  width: calc(100% + 48px); }

.other-photos {
  flex-direction: row;
  display: flex;
  flex-wrap: wrap;
  margin: 24px -24px 0 -24px;
  width: calc(100% + 48px); }

.other-photos img {
  /*width: 50%;*/
  object-fit: contain;
  flex: 1 0 50%; }

#main-photo img {
  width: 100%; }

#article-container h2 {
  font-weight: bold;
  font-size: 180%;
  margin: 24px 0; }

#article-container h3, #article-container h4 {
  font-weight: bold; }

#article-container iframe, #article-container object, #article-container embed {
  margin: 24px -24px 0 -24px;
  width: calc(100% + 48px);
  aspect-ratio: 16 / 9; }

.other-article-container {
  display: flex;
  flex-direction: column;
  align-content: center;
  align-items: center;
  padding: 0 0 16px 0;
  border-bottom: 1px solid #ccc;
  width: 100%; }

.other-article-container a {
  color: #141414;
  text-decoration: none;
  width: 100%; }

.other-article-container:first-child {
  padding-top: 0 !important; }

.other-article-container:last-child {
  border-bottom: none; }

.other-article-pic {
  width: 100%;
  /**/
  aspect-ratio: 16 / 9;
  overflow: hidden;
  align-content: center;
  background-position: center center;
  background-size: cover; }

.other-article-pic img {
  justify-content: center;
  align-content: center;
  width: auto;
  height: auto;
  /*transform: translateY(-33.333%);*/ }

.other-article-text {
  display: flex;
  width: 100%;
  align-content: center;
  flex-direction: column;
  flex-wrap: wrap; }

.article-headline {
  padding: 12px 12px 0 12px;
  text-align: center;
  width: 100%;
  font-weight: bold; }

.article-date {
  width: 100%;
  color: #868686;
  margin-top: 6px; }

@media only screen and (max-width: 1024px) {
  #news-container {
    flex-wrap: wrap; }

  #article-container {
    width: 100%; }

  #article-container h1 {
    margin: initial;
    font-size: 280%;
    line-height: 1; }

  #other-articles {
    width: 100%; }

  .other-article-container {
    width: 50%;
    gap: 24px; }

  .other-article-container {
    border-bottom: none; } }

/* Moved from inline <style> in news.read.cfm. */
    #news-parts-container { margin: 8px 0 40px; }
    #news-parts-container h3 { margin-bottom: 16px; }
    /* auto-fill + capped column width: a single part shows a normal-sized card
       (not stretched, not squashed); multiple parts pack left and wrap. */
    #news-parts-strip {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(210px, 250px));
        justify-content: start;
        gap: 18px;
    }
    @media (max-width: 520px) { #news-parts-strip { grid-template-columns: 1fr; } }

    .np-card {
        display: flex; flex-direction: column;
        border: 1px solid #e4e4e4;
        border-radius: 10px;
        overflow: hidden;               /* clip the full-bleed image corners */
        background: #fff;
        transition: box-shadow .15s ease, border-color .15s ease;
    }
    .np-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.10); border-color: #d0d0d0; }
    /* The product link wraps image + text; the foot (price / stock or ETA /
       View Details) is a sibling so the ETA button isn't inside the link. */
    .np-card > a.np-main { display: flex; flex-direction: column; flex: 1 1 auto; text-decoration: none; color: #1a1a1a; }

    /* Full-bleed image: spans the card edge-to-edge along the top. */
    .np-image {
        position: relative;
        width: 100%;
        aspect-ratio: 1 / 1;
        background: #f6f6f6;
        border-bottom: 1px solid #eee;
    }
    .np-image img {
        position: absolute; inset: 0;
        width: 100%; height: 100%;
        object-fit: contain;
        padding: 10px;
        box-sizing: border-box;
    }

    .np-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 14px 15px 0; }

    .np-brand { height: 24px; margin-bottom: 8px; display: flex; align-items: center; }
    .np-brand img { max-height: 24px; max-width: 55%; width: auto; object-fit: contain; }
    .np-brandtext { font-size: 11px; letter-spacing: .5px; color: #999; text-transform: uppercase; font-weight: 600; }

    .np-title { font-size: 15px; font-weight: 700; line-height: 1.3; color: #1a1a1a; }
    .np-pn { font-size: 13px; color: #777; margin-top: 3px; }

    .np-lbl { color: #999; }
    .np-fitpos { font-size: 12.5px; color: #555; line-height: 1.35; margin-top: 6px; }

    /* Vehicle-fitment summary: clamped to N lines then ellipsis; full list on
       hover (title attr). Line count steps down with viewport -- 5 desktop,
       3 tablet, 2 mobile -- since narrower cards fit fewer models per line. */
    .np-fits {
        font-size: 12.5px; color: #555; line-height: 1.4; margin-top: 6px;
        display: -webkit-box; -webkit-box-orient: vertical;
        -webkit-line-clamp: 5; line-clamp: 5;
        overflow: hidden;
    }
    @media (max-width: 1024px) { .np-fits { -webkit-line-clamp: 3; line-clamp: 3; } }
    @media (max-width: 640px)  { .np-fits { -webkit-line-clamp: 2; line-clamp: 2; } }
    .np-fits strong { color: #1a1a1a; font-weight: 700; }

    /* Foot pinned to the bottom so price / stock / button line up across a row. */
    .np-foot { margin-top: auto; padding: 12px 15px 15px; }
    .np-price { text-align: center; font-size: 16px; }
    .np-stock { text-align: center; font-size: 13px; color: #777; margin-top: 4px; }
    .np-stock.in { color: #2e7d32; font-weight: 700; }
    .np-despatch { text-align: center; font-size: 12px; color: #555; margin-top: 2px; }
    /* Out of stock: "Request an ETA" link (eta-request.css styles the button
       itself) or the "ETA requested" note once they've asked. */
    .np-eta { text-align: center; font-size: 13px; margin-top: 4px; }
    .np-eta .eta-request-trigger { font-size: 13px; }
    .np-eta-done { color: #2D4646; font-weight: 700; }
    .np-eta .eta-tick { color: #3C8500; }
    .np-eta .eta-request-done { display: inline; font-size: 13px; }
    .np-eta .eta-request-done small { display: none; }
    .np-button { margin-top: 10px; }
    .np-button .primaryButton {
        text-decoration: none;
        display: block; width: 100%; box-sizing: border-box;
        background-color: #141414; border: none; cursor: pointer;
        padding: 12px 8px; text-align: center; font-weight: 700; color: #fff;
        border-radius: 6px; transition: background-color .12s ease-in;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .np-card:hover .np-button .primaryButton { background-color: #5a554e; }
    .np-button .primaryButton span { display: inline; float: none; padding: 0; margin: 0; background: none; color: #fff; }

/* ============================================================================
   ARTICLE-NOT-AVAILABLE PANEL
   ----------------------------------------------------------------------------
   The recovery page news.read.cfm renders when getArticle() comes back empty:
   a withdrawn article, a dealer-feed-only article, a mistyped ID, or no ID at
   all. It replaced a bare "Article error / Article could not be found."

   None of the #news-container / #article-container rules above apply to it --
   it is deliberately NOT laid out like an article, because it isn't one. The
   card grid and the search box come from css/news.cards.css (core bundle);
   only the panel itself is here.
============================================================================ */

.nf-panel {
    /* White, not --oct-surface-alt: the site body behind it is already a light
       grey, and an alt-surface panel on it read as a slightly different grey
       rather than as a panel. */
    background: var(--oct-surface);
    border: 1px solid var(--oct-line);
    border-radius: var(--oct-radius);
    padding: var(--oct-space-6);
    margin: var(--oct-space-5) 0 var(--oct-space-7);
    text-align: left;
}

.nf-flag {
    display: inline-block;
    font-size: var(--oct-text-xs);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    background: var(--oct-ink);
    border-radius: var(--oct-radius-pill);
    padding: 5px 12px;
    margin-bottom: var(--oct-space-4);
}

.nf-heading {
    margin: 0 0 var(--oct-space-3);
    /* .fixedwidth centres every heading on the site and the global h1 rule is
       display:table;margin:0 auto -- both have to be undone here or the panel
       reads as a centred error box again. */
    display: block;
    text-align: left;
}

/* Capped to a comfortable measure: the explanation is prose and should not run
   the full 1232px of the panel. */
.nf-body {
    max-width: var(--oct-measure);
    margin: 0 0 var(--oct-space-5);
}

.nf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--oct-space-3);
    margin: 0 0 var(--oct-space-5);
}

.nf-search { max-width: 620px; }

.nf-results { margin-top: var(--oct-space-7); }

.nf-latest__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--oct-space-3);
    border-bottom: 1px solid var(--oct-line-soft);
    padding-bottom: var(--oct-space-3);
    margin-bottom: var(--oct-space-5);
}

.nf-latest__head h2 { margin: 0; text-align: left; display: block; }

.nf-latest__all {
    font-size: var(--oct-text-sm);
    font-weight: 700;
    color: var(--oct-accent);
    text-decoration: none;
    white-space: nowrap;
}

.nf-latest__all:hover { text-decoration: underline; }

@media only screen and (max-width: 640px) {
    .nf-panel { padding: var(--oct-space-5) var(--oct-space-4); }
    .nf-actions .oct-btn { flex: 1 1 100%; text-align: center; }
}
