/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* ==========================================================================
   TeslaMarkt article styling
   Added 2026-09-09. Presentation only: no markup, headings, schema or link
   targets are changed by anything in this file.

   Everything is scoped to .entry-content so the header search button and
   other chrome that share .wp-element-button are left alone.

   Colors come from the Blocksy palette variables, so editing the palette in
   Customizer keeps these in sync:
     --theme-palette-color-1  #FB7258  coral, primary action
     --theme-palette-color-4  #0e0c1b  ink
     --theme-palette-color-5  #DFDFE2  hairline
     --theme-palette-color-6  #F4F4F5  wash
   ========================================================================== */

:root {
  --tm-coral: var(--theme-palette-color-1, #FB7258);
  --tm-coral-deep: #E8543B;          /* pressed / hover, darkened from coral  */
  --tm-ink: var(--theme-palette-color-4, #0e0c1b);
  --tm-muted: var(--theme-palette-color-3, #6e6d76);
  --tm-line: var(--theme-palette-color-5, #DFDFE2);
  --tm-wash: var(--theme-palette-color-6, #F4F4F5);
}

/* --------------------------------------------------------------------------
   B. Affiliate CTA button
   -------------------------------------------------------------------------- */

.entry-content .wp-block-button__link {
  background-color: var(--tm-coral);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: .01em;
  padding: 15px 46px 15px 26px;
  border-radius: 8px;
  border: 0;
  text-decoration: none;
  box-shadow: 0 2px 0 var(--tm-coral-deep);
  transition: background-color .12s ease, box-shadow .12s ease, transform .12s ease;

  /* Chevron drawn as a background image rather than ::after content, so no
     stray glyph is announced by screen readers. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 16px 16px;
}

.entry-content .wp-block-button__link:hover,
.entry-content .wp-block-button__link:focus {
  background-color: var(--tm-coral-deep);
  color: #fff;
  box-shadow: 0 1px 0 var(--tm-coral-deep);
  transform: translateY(1px);
  background-position: right 16px center;
}

.entry-content .wp-block-button__link:focus-visible {
  outline: 2px solid var(--tm-ink);
  outline-offset: 3px;
}

/* Give each CTA room to breathe against the paragraph above it. */
.entry-content .wp-block-buttons {
  margin-top: 22px;
  margin-bottom: 34px;
}

/* Full width on phones: a thumb-sized target beats a small inline pill. */
@media (max-width: 600px) {
  .entry-content .wp-block-button {
    width: 100%;
  }
  .entry-content .wp-block-button__link {
    display: block;
    width: 100%;
    text-align: center;
    padding-right: 46px;
  }
}

/* --------------------------------------------------------------------------
   D. Comparison and fitment tables
   Replaces the bare Gutenberg default (a 1px box around every cell).
   -------------------------------------------------------------------------- */

.entry-content .wp-block-table table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 15px;
  line-height: 1.55;
  /* Keeps tire sizes and load indexes aligned column to column. */
  font-variant-numeric: tabular-nums;
}

.entry-content .wp-block-table thead {
  border-bottom: 0;
}

.entry-content .wp-block-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tm-muted);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--tm-ink);
  padding: 0 14px 9px;
  white-space: nowrap;
}

.entry-content .wp-block-table td {
  border: 0;
  border-bottom: 1px solid var(--tm-line);
  padding: 13px 14px;
  vertical-align: middle;
}

.entry-content .wp-block-table tbody tr:last-child td {
  border-bottom: 0;
}

.entry-content .wp-block-table tbody tr:nth-child(even) {
  background: var(--tm-wash);
}

/* First column carries the tire size or wheel, so keep it on one line. */
.entry-content .wp-block-table td:first-child {
  font-weight: 500;
  white-space: nowrap;
}

/* Inline "Check price" links in the last cell: these are the in-table CTAs. */
.entry-content .wp-block-table td a {
  color: var(--tm-coral-deep);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1.5px solid rgba(251, 114, 88, .45);
  padding-bottom: 1px;
  transition: border-color .12s ease;
}

.entry-content .wp-block-table td a:hover {
  border-bottom-color: var(--tm-coral-deep);
}

/* The fitment tables carry a caption explaining the staggered setup. */
.entry-content .wp-block-table figcaption,
.entry-content .wp-block-table caption {
  caption-side: bottom;
  text-align: left;
  font-size: 13.5px;
  color: var(--tm-muted);
  padding-top: 10px;
  font-style: normal;
}

/* Tables already scroll horizontally via the core .wp-block-table rule; make
   sure a narrow screen never squeezes them into unreadable columns instead. */
@media (max-width: 720px) {
  .entry-content .wp-block-table table {
    min-width: 520px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entry-content .wp-block-button__link,
  .entry-content .wp-block-table td a {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   C. Product cards
   Wraps a pick's heading, verdict, spec strip, trade-offs and CTA into one
   bounded object. Markup is core/group + core/heading + core/paragraph, so the
   h3 outline and the document structure are unchanged.
   -------------------------------------------------------------------------- */

.entry-content .tm-card {
  border: 1px solid var(--tm-line);
  border-radius: 12px;
  overflow: hidden;
  margin: 30px 0 36px;
  background: #fff;
}

.entry-content .tm-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  background: var(--tm-wash);
  border-bottom: 1px solid var(--tm-line);
}

.entry-content .tm-card-top > * {
  margin: 0;
}

.entry-content .tm-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--tm-coral);
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  line-height: 1.5;
}

/* Season-coded so a scanning reader can tell picks apart without reading. */
.entry-content .tm-badge.is-winter   { background: #2E5E8A; }
.entry-content .tm-badge.is-allseason{ background: #4A7C59; }
.entry-content .tm-badge.is-oe       { background: var(--tm-ink); }

.entry-content .tm-sidewall {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--tm-muted);
  font-variant-numeric: tabular-nums;
}

.entry-content .tm-card-body {
  padding: 22px 20px 20px;
}

.entry-content .tm-card-body > :first-child {
  margin-top: 0;
}

.entry-content .tm-card-body h3 {
  font-size: 21px;
  margin: 0 0 12px;
  line-height: 1.3;
}

/* Spec strip: every value is parsed from the product title in
   data/products.json, or from data/tire-fitment.json for the wheel it fits. */
.entry-content .tm-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 1px;
  background: var(--tm-line);
  border: 1px solid var(--tm-line);
  border-radius: 8px;
  overflow: hidden;
  margin: 18px 0;
}

.entry-content .tm-spec {
  background: #fff;
  padding: 11px 13px;
  margin: 0;
}

.entry-content .tm-spec-k {
  display: block;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--tm-muted);
  margin-bottom: 3px;
}

.entry-content .tm-spec-v {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--tm-ink);
  font-variant-numeric: tabular-nums;
}

/* Trade-offs: what it is good at, and who it is not for. */
.entry-content .tm-pc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 22px;
  margin: 16px 0 20px;
}

.entry-content .tm-pc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.entry-content .tm-pc li {
  font-size: 14.5px;
  line-height: 1.5;
  padding-left: 20px;
  position: relative;
}

.entry-content .tm-pc li::before {
  position: absolute;
  left: 0;
  font-weight: 700;
}

.entry-content .tm-pc-good li::before { content: "+"; color: #2E7D5B; }
.entry-content .tm-pc-bad  li::before { content: "\2212"; color: var(--theme-palette-color-2, #F74D67); }

/* The CTA sits inside the card, so it should not carry the standalone margin. */
.entry-content .tm-card .wp-block-buttons {
  margin-top: 0;
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .entry-content .tm-pc { grid-template-columns: 1fr; }
  .entry-content .tm-card-body { padding: 18px 16px 16px; }
  .entry-content .tm-card-top { padding: 12px 16px; }
}
