/* Q59: Design deals-structure-20261128 (b), isolated from legacy .dh-rows rules.
   Loaded only by DEALS_HOME_SPEC_ON; off leaves the existing assets and markup unchanged. */
.q59-rows{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:stretch}
.q59-rows>.q59-row{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 1fr;gap:8px;margin:0;padding:12px 16px;min-width:0;border:1px solid var(--line);border-radius:6px;background:var(--card,var(--surface))}
.q59-row>.dv-h{grid-column:1;grid-row:1;min-width:0;align-self:center;margin:0}
.q59-row>.dv-h h2{font-size:16px;line-height:1.5;margin:0;overflow-wrap:normal;word-break:normal}
.q59-row>.dv-h p{display:none}
.q59-row>.dv-more{grid-column:2;grid-row:1;align-self:center;display:inline-flex;align-items:center;min-height:44px;margin:0;white-space:nowrap;font-size:14px;font-weight:600}
.q59-row>.dv-grid{grid-column:1/-1;grid-row:2;display:flex;flex-direction:column;align-items:stretch;min-width:0;margin:12px 0 0;padding:0;overflow:visible}
.q59-rows .q59-row article.d3{display:flex;flex:1 1 auto;flex-direction:column;align-items:stretch;gap:4px;grid-row:auto;margin:0;padding:0;border:0;background:none;min-height:0;height:auto;max-height:none}
.q59-row article.d3>*{min-width:0;grid-column:auto;grid-row:auto;margin-left:0;margin-right:0}
.q59-row article.d3>.d3-photo{float:none;position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:140px;aspect-ratio:auto;margin:0 0 8px;flex:none}
.q59-row article.d3>.d3-photo img{position:static;max-height:140px;max-width:100%;width:auto;height:auto;object-fit:contain}
.q59-row article.d3>.d3-name{display:block;min-height:0;margin:0;font-size:16px;line-height:1.5;overflow:visible;-webkit-line-clamp:unset}
/* The legacy phone rule reserves name space for a Save button; these spec cards hide it. */
.q59-rows .q59-row article.d3>.d3-name{padding-right:0!important}
/* The old phone card rules force these slots visible with !important. */
.q59-rows .q59-row article.d3>:is(.d3-src,.d3-scores,.d3-save,.d3-foot){display:none!important}
.q59-row .d3-slot-line{font-size:14px;line-height:1.4}
.q59-row .dh-stock{font-size:14px;line-height:1.4;margin:0}
/* Q60 owns the shared .sb internals; this wrapper only pins the whole block. */
.q59-row article.d3>.sb{margin-top:auto}
.q59-row article.d3>a.pm-srow,.q59-row article.d3>.d3-go{margin-top:auto;width:100%;box-sizing:border-box}
.q59-row article.d3>.d3-ck{margin:4px 0 0;font-size:12px;line-height:1.35}
.q59-rows>.deals-amazon-notes{grid-column:1/-1;max-width:none;width:100%;box-sizing:border-box}
/* Also fixes the existing non-Hot Biggest % view's overflowing phone tab strip. */
main .dh-tabs{overflow-x:auto;max-width:100%;min-width:0}
@media(max-width:860px){.q59-rows{grid-template-columns:minmax(0,1fr)}}
@media(max-width:359px){
 .q59-rows>.q59-row{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto 1fr}
 .q59-row>.dv-more{grid-column:1;grid-row:2;justify-self:start}
 .q59-row>.dv-grid{grid-row:3}
}

/* The existing all-card phone rule fixes photos to 96px with !important. */
.q59-rows .q59-row article.d3>.d3-photo{width:100%!important;height:140px!important;padding:0!important}
/* Share only the outer heading/card tracks; the card itself stays flexible flow. */
@supports(grid-template-rows:subgrid){
 @media(min-width:861px){.q59-rows>.q59-row{grid-row:span 2;grid-template-rows:subgrid}}
}

/* Deal and price-only cards share the same vertical spec layout. The legacy
   phone stylesheet forces deal-card grid/spacing with !important. */
@media(max-width:767px){
 main .q59-rows .q59-row article.d3.deal-card{display:flex!important;flex-direction:column!important;grid-template-columns:none!important;grid-template-rows:none!important;padding:0!important;margin:0!important;border:0!important;background:none!important;box-shadow:none!important;width:100%!important;min-width:0!important;max-width:none!important;height:auto!important;flex:1 1 auto!important}
 main .q59-rows .q59-row article.d3>.d3-photo{margin:0 0 8px!important}
 main .q59-rows .q59-row article.d3>.d3-go{margin-top:auto!important}
}
