/* Card model "editorial" — magazine, minimal, person, portfolio.
   Blog: one column of entries with a large display title, a small-caps meta
   line, a modest thumbnail at the side and a hairline rule between entries;
   no card box. Single post: centred title, hero image, a comfortable reading
   measure. Shop: product rows instead of boxes. Loaded after the layout file
   and reads its --page-* tokens. */

/* --- Blog index / archives --- */
body.cards-editorial .post-list {
  grid-template-columns: 1fr;
  grid-auto-rows: auto;
  gap: 0;
  max-width: 800px;
  margin: 0 auto;
}

body.cards-editorial .post-list > article,
body.cards-editorial .post-list > article.clickable-card {
  padding: 2.25rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--page-rule, var(--gray-200));
  border-radius: 0;
  box-shadow: none;
  height: auto;
}

body.cards-editorial .post-list > article:first-child {
  padding-top: 0.5rem;
}

body.cards-editorial .post-list > article:hover,
body.cards-editorial .post-list > article:focus-within {
  box-shadow: none;
}

body.cards-editorial .post-list .card-link,
body.cards-editorial .clickable-card .card-link {
  height: auto;
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  grid-template-areas:
    "meta thumb"
    "title thumb"
    "excerpt thumb"
    "more thumb";
  column-gap: 2rem;
  row-gap: 0.5rem;
  align-items: start;
}

body.cards-editorial .post-list .entry-meta {
  grid-area: meta;
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.cards-editorial .post-list .entry-header {
  grid-area: title;
  margin: 0;
}

body.cards-editorial .post-list .entry-title,
body.cards-editorial .post-list .card-link .entry-title {
  display: block;
  min-height: 0;
  -webkit-line-clamp: unset;
  font-family: var(--page-display, var(--font-display));
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--page-ink, var(--text-primary));
}

body.cards-editorial .post-list .card-link:hover .entry-title {
  color: var(--page-accent, var(--accent-color));
}

body.cards-editorial .post-list .post-thumbnail {
  grid-area: thumb;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--border-radius);
  overflow: hidden;
}

body.cards-editorial .post-list .post-thumbnail img,
body.cards-editorial .post-list .post-thumbnail-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.cards-editorial .post-list .excerpt-content,
body.cards-editorial .clickable-card .excerpt-content {
  grid-area: excerpt;
  flex-grow: 0;
  min-height: 0;
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.6;
}

body.cards-editorial .post-list .read-more-link,
body.cards-editorial .clickable-card .read-more-link,
body.cards-editorial .clickable-card:hover .read-more-link {
  grid-area: more;
  justify-self: start;
  margin: 0.25rem 0 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--page-accent, var(--accent-color));
  font-family: var(--page-display, var(--font-display));
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transform: none;
}

body.cards-editorial .post-list .read-more-link::after {
  content: " \2192";
}

body.cards-editorial .blog-page-title,
body.cards-editorial .page-title {
  text-align: center;
  font-family: var(--page-display, var(--font-display));
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* --- Single post --- */
body.cards-editorial .post-content {
  max-width: 760px;
}

body.cards-editorial.single-post .post-content > article {
  display: flex;
  flex-direction: column;
}

body.cards-editorial.single-post .entry-hero {
  order: 3;
  margin: 0.5rem 0 2rem;
  border-radius: var(--border-radius);
  overflow: hidden;
}

body.cards-editorial.single-post .entry-hero img {
  display: block;
  width: 100%;
  height: auto;
}

body.cards-editorial.single-post .entry-header {
  order: 1;
  text-align: center;
  margin-bottom: 0.75rem;
}

body.cards-editorial.single-post .entry-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

body.cards-editorial.single-post .entry-meta {
  order: 2;
  justify-content: center;
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.cards-editorial.single-post .entry-content {
  order: 4;
  font-size: 1.1rem;
  line-height: 1.75;
}

body.cards-editorial.single-post .entry-content > p:first-of-type::first-letter {
  float: left;
  margin: 0.1em 0.35rem 0 0;
  font-family: var(--page-display, var(--font-display));
  font-size: 3.4em;
  line-height: 0.85;
  color: var(--page-accent, var(--accent-color));
}

body.cards-editorial.single-post .entry-footer {
  order: 5;
}

/* --- Generic pages --- */
body.cards-editorial.page:not(.home) .site-main > article,
body.cards-editorial.page:not(.home) .site-main > .content-card {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

body.cards-editorial.page:not(.home) .entry-header h1 {
  font-family: var(--page-display, var(--font-display));
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
}

body.cards-editorial.page:not(.home) .entry-content {
  font-size: 1.08rem;
  line-height: 1.7;
}

/* --- Shop: product rows --- */
body.cards-editorial ul.products.rtsb-product-grid {
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

body.cards-editorial .rtsb-product-card,
body.cards-editorial .products .rtsb-product-card:not(.storefront-product-card) {
  padding: 2rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--page-rule, var(--gray-200));
  border-radius: 0;
  box-shadow: none;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-areas:
    "image link"
    "image action";
  column-gap: 2rem;
  align-items: start;
  overflow: visible;
}

body.cards-editorial .rtsb-product-card:hover {
  box-shadow: none;
  transform: none;
}

body.cards-editorial .rtsb-product-link {
  grid-area: link;
  display: flex;
  flex-direction: column;
}

body.cards-editorial .rtsb-product-link .rtsb-product-image {
  position: absolute;
  left: 0;
  top: 0;
  width: 220px;
  height: 100%;
  min-height: 165px;
  aspect-ratio: 4 / 3;
  border-radius: var(--border-radius);
}

body.cards-editorial .rtsb-product-card {
  position: relative;
}

body.cards-editorial .rtsb-product-link .rtsb-product-image img {
  height: 100%;
}

body.cards-editorial .rtsb-product-title {
  padding: 0;
  min-height: 0;
  font-family: var(--page-display, var(--font-display));
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

body.cards-editorial .rtsb-product-price {
  padding: 0.35rem 0 0;
  font-size: 1.05rem;
}

body.cards-editorial .rtsb-product-card .rtsb-product-rating {
  margin: 0.35rem 0 0;
}

body.cards-editorial .rtsb-product-excerpt {
  padding: 0.5rem 0 0;
  min-height: 0;
  font-size: 0.98rem;
}

body.cards-editorial .rtsb-product-action {
  grid-area: action;
  padding: 0.75rem 0 0;
  text-align: left;
}

@media (max-width: 640px) {
  body.cards-editorial .post-list .card-link {
    grid-template-columns: 1fr;
    grid-template-areas:
      "thumb"
      "meta"
      "title"
      "excerpt"
      "more";
  }

  body.cards-editorial .post-list .post-thumbnail {
    aspect-ratio: 16 / 9;
  }

  body.cards-editorial .rtsb-product-card,
  body.cards-editorial .products .rtsb-product-card:not(.storefront-product-card) {
    grid-template-columns: 1fr;
    grid-template-areas:
      "link"
      "action";
  }

  body.cards-editorial .rtsb-product-link .rtsb-product-image {
    position: static;
    width: 100%;
    height: auto;
    margin-bottom: 0.75rem;
  }
}
