/* Keep intrinsic image, select and table widths inside their layout tracks. */
.hero-grid{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}
.product-detail{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr)}
.product-lower{grid-template-columns:repeat(2,minmax(0,1fr))}
.container,.hero-grid>*,.product-detail>*,.product-lower>*,.catalogue-layout>*,
.footer-grid>*,.filter-panel form>*,.pc-budget>*,.spec-list>div>*{min-width:0}
.product-page,.page-content,.catalogue,.product-card,.saved-item,.mobile-nav,.hero-copy,.footer-grid{overflow-wrap:anywhere}
.detail-image{max-width:100%;min-width:0}
.detail-image img{min-width:0;max-width:100%;height:auto}
.product-detail form,.product-detail select{min-width:0;max-width:100%;width:100%}
.spec-list>div{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr)}
.table-scroll{min-width:0;max-width:100%}
.pc-cell-value{min-width:0;max-width:100%;overflow-wrap:anywhere}
.filter-panel :where(label,fieldset,select,input){min-width:0;max-width:100%}
.search-form{min-width:0;max-width:100%}
.search-form input{min-width:0}
.pc-search-suggestions a{min-width:0;overflow-wrap:anywhere}
.hero-tags{flex-wrap:wrap}
.saved-item>a{min-width:0}
.desktop-nav,.desktop-nav ul{min-width:0}
.desktop-nav ul{flex-wrap:wrap}

@media(max-width:760px){
  .hero-grid,.product-detail,.product-lower,.catalogue-layout{grid-template-columns:minmax(0,1fr)}
  .filter-panel form,.pc-budget{grid-template-columns:repeat(2,minmax(0,1fr))}
  .footer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .brand,.custom-logo-link{min-width:0}
  .header-actions{flex-shrink:0}
  .product-detail h1{font-size:clamp(25px,6vw,30px);overflow-wrap:anywhere}
  .product-detail p,.product-page>.filter-note p{font-size:15px;line-height:1.65}
  .product-page .button{min-height:44px;max-width:100%;white-space:normal;text-align:center}
  .price-summary>strong{overflow-wrap:anywhere}
  .spec-list>div{font-size:14px;gap:12px}
  .spec-list dd,.spec-list dt{overflow-wrap:anywhere}

  .compare-bar{max-width:calc(100% - 16px);min-width:0}
  .compare-bar>div{min-width:0}
}

@media(max-width:1050px){
  /* Readable controls avoid automatic focus zoom, including phone landscape. */
  .search-form input,.filter-panel select,.filter-panel input,
  .product-detail select,.product-detail input{font-size:16px}
  .spec-list>div{font-size:14px}
  /* Mobile comparisons are vertical cards; the page and table do not pan. */
  .table-scroll{overflow:visible;border:0;border-radius:0}
  .table-scroll table{display:block;position:relative;width:100%;min-width:0;max-width:100%;font-size:14px}
  .table-scroll caption{display:block;width:100%;min-width:0;max-width:100%;overflow-wrap:anywhere}
  .table-scroll thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap}
  .table-scroll tbody{display:grid;gap:14px;width:100%;min-width:0}
  .table-scroll tbody tr{display:block;min-width:0;max-width:100%;border:1px solid var(--line);border-radius:12px;background:#fff}
  .table-scroll tbody th{display:block;width:100%;max-width:100%;padding:14px 16px;background:var(--soft);border-radius:12px 12px 0 0;font-size:15px;line-height:1.5;overflow-wrap:anywhere}
  .table-scroll tbody td{display:block;width:100%;max-width:100%;padding:11px 16px;line-height:1.6;overflow-wrap:anywhere}
  .table-scroll [data-label]{display:grid;grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr);column-gap:12px;align-items:start}
  .table-scroll [data-label]::before{content:attr(data-label);font-size:12px;font-weight:650;color:var(--muted);line-height:1.65;overflow-wrap:anywhere}
  .table-scroll td[colspan]{display:block}
  .table-scroll td[colspan]::before{display:none}
  .table-scroll .pc-cell-value>small{font-size:12px;line-height:1.6}
  .table-scroll .button{font-size:13px;padding:10px 12px;white-space:normal}
  .table-scroll tbody tr:last-child th,.table-scroll tbody tr:last-child td{border-bottom:1px solid var(--line)}
  .table-scroll tbody tr>th:last-child,.table-scroll tbody tr>td:last-child{border-bottom:0}
  /* Long model names stay above their values in the comparison matrix. */
  .table-scroll .model-table [data-label]{grid-template-columns:minmax(0,1fr);row-gap:4px}
  .table-scroll .model-table [data-label]::before{font-size:13px}
}
