/**
 * Editorial single layout (Task 3 §3): content + sidebar for the blog article
 * single (.bk-guide-article) and the SEO landing single (.bk-landing-template).
 * The sidebar carries a compact product rail + related links / store card, and
 * drops below the content on mobile. Reuses the content-hub tokens with literal
 * fallbacks so it works in the landing context too.
 */

.bk-editorial-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 324px;
  gap: 52px;
  align-items: start;
  margin-top: 44px;
}

.bk-editorial-main {
  min-width: 0;
}

/* Inside the 2-col layout the body loses its centered narrow max-width. */
.bk-editorial-layout .bk-guide-article__body,
.bk-editorial-layout .bk-landing-template__content,
.bk-editorial-layout .bk-landing-template__content .bk-seo-landing,
.bk-editorial-layout .bk-editorial-article {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.bk-editorial-aside {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: sticky;
  top: 96px;
}

/* ---- Sidebar product rail (compact horizontal cards) ------------------- */

.bk-product-rail-section--sidebar {
  margin: 0;
}

.bk-product-rail-section--sidebar .bk-product-rail-section__head {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bk-hub-line, #e7dfe9);
}

.bk-product-rail-section--sidebar .bk-product-rail-section__head h2 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bk-product-rail-section--sidebar .bk-product-rail-section__head a {
  font-size: 10px;
  letter-spacing: 0.08em;
}

/* Override the horizontal scroll rail → vertical compact list. */
.bk-product-rail-section--sidebar .bk-product-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: visible;
  scroll-snap-type: none;
  padding: 0;
}

.bk-product-rail-section--sidebar .bk-product-rail product-card.bk-product-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  position: relative;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
}

/* Full-card overlay link stays out of the grid flow. */
.bk-product-rail-section--sidebar .bk-product-card__link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* Fixed square thumbnail — overrides the portrait card's tall media height. */
.bk-product-rail-section--sidebar .bk-product-card__media {
  grid-column: 1;
  width: 84px;
  height: 84px;
  min-height: 0;
  aspect-ratio: auto;
  margin: 0;
  overflow: hidden;
}

.bk-product-rail-section--sidebar .bk-product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bk-product-rail-section--sidebar .bk-product-card__copy {
  grid-column: 2;
}

.bk-product-rail-section--sidebar .quick-add,
.bk-product-rail-section--sidebar .bk-product-card__copy > p {
  display: none;
}

.bk-product-rail-section--sidebar .bk-product-card__copy {
  padding: 0;
}

.bk-product-rail-section--sidebar .bk-product-card__vendor {
  font-size: 10px;
}

.bk-product-rail-section--sidebar .bk-product-card__copy h3 {
  font-size: 14px;
  line-height: 1.25;
  margin: 2px 0 4px;
}

.bk-product-rail-section--sidebar .bk-product-card__price {
  font-size: 13px;
}

/* ---- Store card + related links --------------------------------------- */

.bk-aside-store {
  border: 1px solid var(--bk-hub-line, #e7dfe9);
  padding: 22px;
}

.bk-aside-store .bk-guide-meta {
  margin: 0 0 8px;
}

.bk-aside-store strong {
  display: block;
  margin-bottom: 14px;
  color: var(--bk-hub-ink, #1a0628);
  font-family: var(--font-heading--family, Montserrat, sans-serif);
  font-size: 19px;
  line-height: 1.1;
  text-transform: uppercase;
}

.bk-aside-store__link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  color: var(--bk-hub-ink, #1a0628);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.bk-aside-store__link + .bk-aside-store__link {
  margin-left: 18px;
}

.bk-aside-store__link:hover {
  color: var(--bk-hub-accent, #bb3a72);
}

.bk-aside-related h2 {
  margin: 0 0 4px;
  color: var(--bk-hub-accent, #bb3a72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.bk-aside-related ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bk-aside-related li {
  border-top: 1px solid var(--bk-hub-line, #e7dfe9);
}

.bk-aside-related a {
  display: block;
  padding: 13px 0;
  color: var(--bk-hub-ink, #1a0628);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

.bk-aside-related a:hover {
  color: var(--bk-hub-accent, #bb3a72);
}

/* ---- Responsive: sidebar below content -------------------------------- */

@media (max-width: 991px) {
  .bk-editorial-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 36px;
  }

  .bk-editorial-aside {
    position: static;
    top: auto;
  }

  /* On mobile the sidebar is full width; keep the square thumbnail. */
  .bk-product-rail-section--sidebar .bk-product-rail product-card.bk-product-card {
    grid-template-columns: 84px minmax(0, 1fr);
  }
}
