/*
 * TCC Smart Card M — Editable Product Rhythm RC6
 * Shared skeleton for Product, Experience and Journal cards.
 * Scope: homepage public canvas only. Final values remain auditable until Approved.
 */
body.tcc-design-sync{
  --tcc-card-m-height:500px;
  --tcc-card-m-height-tablet:480px;
  --tcc-card-m-media-height:220px;
  --tcc-card-m-media-height-tablet:205px;
  --tcc-card-m-padding-x:24px;
  --tcc-card-m-padding-y:20px;
  --tcc-card-m-bottom-safe-area:24px;
  --tcc-card-m-action-height:38px;
  --tcc-card-m-content-gap:12px;
  --tcc-product-content-lift:30px;
  --tcc-product-title-content-gap:8px;
  --tcc-product-description-price-gap:8px;
  --tcc-product-price-bottom-gap:0px;
  --tcc-product-divider-top-gap:8px;
  --tcc-product-cta-gap:8px;
  --tcc-card-m-title-lines:2;
  --tcc-card-m-copy-lines:3;
  --tcc-card-m-radius:18px;
  --tcc-card-m-border:1px solid rgba(15,74,56,.12);
  --tcc-card-m-shadow:0 10px 30px rgba(15,45,35,.055);
  --tcc-card-m-shadow-hover:0 18px 42px rgba(15,45,35,.10);
}

/* Shared card shell. */
body.tcc-design-sync .tcc-home .tcc-smart-card--m{
  display:grid!important;
  grid-template-rows:var(--tcc-card-m-media-height) minmax(0,1fr)!important;
  height:var(--tcc-card-m-height)!important;
  min-height:var(--tcc-card-m-height)!important;
  max-height:var(--tcc-card-m-height)!important;
  overflow:hidden!important;
  border:var(--tcc-card-m-border)!important;
  border-radius:var(--tcc-card-m-radius)!important;
  background:#fff!important;
  box-shadow:var(--tcc-card-m-shadow)!important;
  transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease!important;
}
body.tcc-design-sync .tcc-home .tcc-smart-card--m:hover{
  transform:translateY(-3px)!important;
  border-color:rgba(15,74,56,.18)!important;
  box-shadow:var(--tcc-card-m-shadow-hover)!important;
}

/* Identical media zone height; image behavior changes by content role only. */
body.tcc-design-sync .tcc-home .tcc-smart-card--m :where(
  .tcc-product-card__media,
  .tcc-experience-card__media,
  .tcc-journal-card__media
){
  position:relative!important;
  display:block!important;
  width:100%!important;
  height:var(--tcc-card-m-media-height)!important;
  min-height:var(--tcc-card-m-media-height)!important;
  max-height:var(--tcc-card-m-media-height)!important;
  aspect-ratio:auto!important;
  overflow:hidden!important;
  flex:none!important;
  background:var(--home-soft,#f7f4ee)!important;
}
body.tcc-design-sync .tcc-home .tcc-smart-card--m :where(
  .tcc-product-card__media img,
  .tcc-experience-card__media img,
  .tcc-journal-card__media img
){
  position:static!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-height:none!important;
  padding:0!important;
  border-radius:0!important;
  object-position:center!important;
}
body.tcc-design-sync .tcc-home .tcc-smart-card--product .tcc-product-card__media img{
  object-fit:contain!important;
  padding:8px!important;
}
body.tcc-design-sync .tcc-home :where(.tcc-smart-card--experience,.tcc-smart-card--journal) :where(.tcc-experience-card__media img,.tcc-journal-card__media img){
  object-fit:cover!important;
}

/* Shared body rhythm. */
body.tcc-design-sync .tcc-home .tcc-smart-card--m :where(
  .tcc-product-card__body,
  .tcc-experience-card__body,
  .tcc-journal-card__body
){
  position:static!important;
  display:flex!important;
  flex-direction:column!important;
  align-content:initial!important;
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  padding:var(--tcc-card-m-padding-y) var(--tcc-card-m-padding-x) var(--tcc-card-m-bottom-safe-area)!important;
  color:var(--home-ink,#14392f)!important;
  gap:0!important;
}
body.tcc-design-sync .tcc-home .tcc-smart-card--m h3{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:var(--tcc-card-m-title-lines)!important;
  overflow:hidden!important;
  min-height:calc(1.2em * 2)!important;
  margin:0 0 var(--tcc-card-m-content-gap)!important;
  line-height:1.2!important;
}
body.tcc-design-sync .tcc-home .tcc-smart-card--m :where(
  .tcc-product-card__body>p,
  .tcc-experience-card__body>p:not(.tcc-experience-category),
  .tcc-journal-card__body>p:not(.tcc-journal-meta)
){
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:var(--tcc-card-m-copy-lines)!important;
  overflow:hidden!important;
  margin:0 0 var(--tcc-card-m-content-gap)!important;
  line-height:1.55!important;
}
body.tcc-design-sync .tcc-home .tcc-smart-card--m :where(.tcc-experience-category,.tcc-journal-meta){
  margin:0 0 8px!important;
  line-height:1.35!important;
}
body.tcc-design-sync .tcc-home .tcc-smart-card--m .tcc-experience-address{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  overflow:hidden!important;
  min-height:0!important;
  margin:0 0 12px!important;
  line-height:1.45!important;
}
body.tcc-design-sync .tcc-home .tcc-smart-card--m .tcc-product-price{
  margin:0 0 12px!important;
  line-height:1.35!important;
}


/* RC4 — restore the preferred product-card content rhythm.
 * One-line product titles no longer reserve a two-line title block, so the
 * description and price move upward while the footer remains bottom-aligned.
 */
body.tcc-design-sync .tcc-home .tcc-smart-card--product h3{
  min-height:0!important;
  margin-bottom:var(--tcc-product-title-content-gap)!important;
}
body.tcc-design-sync .tcc-home .tcc-smart-card--product .tcc-product-card__body>p{
  margin-bottom:var(--tcc-product-description-price-gap)!important;
}
body.tcc-design-sync .tcc-home .tcc-smart-card--product .tcc-product-price{
  margin-bottom:var(--tcc-product-price-bottom-gap)!important;
}

/* RC5 — move the complete description + price group toward the product title.
 * The original document flow remains intact, so the released space becomes
 * extra breathing room between the price and the CTA divider.
 */
@media (min-width:769px){
  body.tcc-design-sync .tcc-home .tcc-smart-card--product :where(
    .tcc-product-card__body>p,
    .tcc-product-price
  ){
    transform:translateY(calc(-1 * var(--tcc-product-content-lift)))!important;
  }
}

/* Every action sits on the same visual baseline. */
body.tcc-design-sync .tcc-home .tcc-smart-card--m :where(
  .tcc-product-card__footer,
  .tcc-experience-card__body>a,
  .tcc-journal-card__body>.tcc-journal-link
){
  margin-top:auto!important;
}
body.tcc-design-sync .tcc-home .tcc-smart-card--m .tcc-product-card__footer{
  display:flex!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  flex-direction:column!important;
  gap:var(--tcc-product-cta-gap)!important;
  padding-top:var(--tcc-product-divider-top-gap)!important;
}
body.tcc-design-sync .tcc-home .tcc-smart-card--m :where(.tcc-product-action,.tcc-product-card__link){
  min-width:0!important;
  max-width:100%!important;
}
body.tcc-design-sync .tcc-home .tcc-smart-card--m .tcc-product-card__link{
  display:inline-flex!important;
  align-items:center!important;
  width:max-content!important;
  white-space:normal!important;
  line-height:1.3!important;
}
body.tcc-design-sync .tcc-home .tcc-smart-card--m .tcc-product-action{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-height:var(--tcc-card-m-action-height)!important;
  height:var(--tcc-card-m-action-height)!important;
  padding:7px 11px!important;
  font-size:.74rem!important;
  white-space:normal!important;
  text-align:center!important;
  line-height:1.25!important;
}

/* RC3 — compact actions and a consistent 24px bottom safe area. */
body.tcc-design-sync .tcc-home .tcc-smart-card--m .tcc-product-action svg{
  width:16px!important;
  height:16px!important;
  flex-basis:16px!important;
}
body.tcc-design-sync .tcc-home .tcc-smart-card--m :where(
  .tcc-experience-card__body>a,
  .tcc-journal-card__body>.tcc-journal-link
){
  display:inline-flex!important;
  align-items:center!important;
  min-height:24px!important;
  line-height:1.3!important;
}

@media (min-width:769px) and (max-width:1024px){
  body.tcc-design-sync .tcc-home .tcc-smart-card--m{
    grid-template-rows:var(--tcc-card-m-media-height-tablet) minmax(0,1fr)!important;
    height:var(--tcc-card-m-height-tablet)!important;
    min-height:var(--tcc-card-m-height-tablet)!important;
    max-height:var(--tcc-card-m-height-tablet)!important;
  }
  body.tcc-design-sync .tcc-home .tcc-smart-card--m :where(.tcc-product-card__media,.tcc-experience-card__media,.tcc-journal-card__media){
    height:var(--tcc-card-m-media-height-tablet)!important;
    min-height:var(--tcc-card-m-media-height-tablet)!important;
    max-height:var(--tcc-card-m-media-height-tablet)!important;
  }
}

@media (max-width:768px){
  body.tcc-design-sync .tcc-home .tcc-smart-card--m{
    grid-template-rows:auto auto!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
  }
  body.tcc-design-sync .tcc-home .tcc-smart-card--m :where(.tcc-product-card__media,.tcc-experience-card__media,.tcc-journal-card__media){
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:16/10!important;
  }
  body.tcc-design-sync .tcc-home .tcc-smart-card--product .tcc-product-card__media{aspect-ratio:1.35/1!important}
  body.tcc-design-sync .tcc-home .tcc-smart-card--m .tcc-product-action{width:100%!important}
}

@media print{
  body.tcc-design-sync .tcc-home .tcc-smart-card--m{
    display:block!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    box-shadow:none!important;
  }
}
