/* FISCHRAINE Phase 172 — Card Detail Layout Fix
   Repairs metadata overlap in the Collection card detail view and lets the
   existing card photograph use more of the visual panel. No image assets are changed. */

/* Keep the detail column self-contained so long labels/values cannot overlap
   neighboring cells or the title/market blocks. */
.card-detail-content,
.card-detail-specs,
.card-detail-spec{
  min-width:0;
  box-sizing:border-box;
}

.card-detail-title{
  position:relative;
  z-index:1;
  display:block;
  margin-bottom:clamp(26px,2.2vw,36px)!important;
}

.card-detail-lede{
  position:relative;
  z-index:1;
}

.card-detail-specs{
  position:relative;
  z-index:2;
  grid-auto-rows:auto;
  align-items:stretch;
  overflow:visible;
}

.card-detail-spec{
  min-height:82px;
  height:auto;
  overflow:visible;
}

.card-detail-spec strong,
.card-detail-spec span{
  max-width:100%;
  min-width:0;
}

.card-detail-spec span{
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:normal;
}

/* Let the existing photograph breathe less inside the frame so the card itself
   reads larger, while preserving the original image and its full composition. */
.card-detail-visual{
  min-height:460px;
}

.card-detail-visual img{
  width:100%;
  max-height:76vh;
  padding:clamp(10px,1.45vw,20px)!important;
  object-fit:contain;
  object-position:center center;
}

@media (max-width:1024px){
  .card-detail-visual img{
    max-height:68vh;
    padding:16px!important;
  }
}

@media (max-width:760px){
  .card-detail-title{
    margin-bottom:24px!important;
  }

  .card-detail-specs{
    grid-template-columns:1fr!important;
  }

  .card-detail-spec{
    min-height:0;
    padding:15px 0!important;
    border-left:0!important;
  }

  .card-detail-visual{
    min-height:0;
  }

  .card-detail-visual img{
    max-height:none;
    padding:12px!important;
  }
}

/* Phase 172.1 hotfix — neutralize legacy inline card-detail row layout.
   collection-home.html still contains an older 120px/1fr grid rule for each
   spec row; at desktop widths that rule compresses values into a few pixels. */
.card-detail-spec{
  display:block!important;
  grid-template-columns:none!important;
  gap:0!important;
}
.card-detail-spec strong,
.card-detail-spec span{
  display:block!important;
  width:auto!important;
  max-width:100%!important;
  text-align:left!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
}
.card-detail-spec span{
  white-space:normal!important;
}
