/* Flying Hands Learning: phone layout fixes (24 Nov 2026). Loaded after fh-redesign.css on every public page. */

/* Product pages: keep the cover in proportion (it was stretched to 250x800) and not taller than the screen. */
.product-media img{height:auto !important;object-fit:contain}
@media (max-width:760px){
  .product-media{max-width:280px;margin-left:auto;margin-right:auto}
  .product-media img{width:auto !important;max-width:100%;max-height:60vh;display:block;margin:0 auto}
}

@media (max-width:600px){
  /* Home: show every class button; 11 and 12 were hidden off the right edge. */
  .fx-classes{flex-wrap:wrap;overflow-x:visible !important;row-gap:8px}
  .fx-classes > :not(a):not(button){flex-basis:100%}

  /* Headings with a side link (cart, bookshop): stack and align left instead of pushing the title right. */
  .section-heading{flex-direction:column;align-items:flex-start !important;justify-content:flex-start !important;text-align:left;gap:6px}
  .section-heading > *{text-align:left !important;margin-left:0 !important}

  /* Compare books: each seller row becomes a small card, so nothing needs sideways scrolling. */
  .comparison-table-wrap{overflow-x:visible}
  .comparison-table{width:100% !important;min-width:0 !important;border-collapse:separate}
  .comparison-table thead{display:none}
  .comparison-table,.comparison-table tbody,.comparison-table tr,.comparison-table td{display:block;width:100%}
  .comparison-table tr{border:1px solid #e3e8ef;border-radius:12px;padding:6px 12px;margin:0 0 10px;background:#fff}
  .comparison-table td{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:6px 0;border:0 !important;text-align:right;white-space:normal}
  .comparison-table td::before{font-weight:700;color:#14213d;text-align:left;flex:0 0 auto}
  .comparison-table td:nth-child(1)::before{content:"Seller"}
  .comparison-table td:nth-child(2)::before{content:"Format"}
  .comparison-table td:nth-child(3)::before{content:"Item price"}
  .comparison-table td:nth-child(4)::before{content:"Shipping"}
  .comparison-table td:nth-child(5)::before{content:"Total / status"}
  .comparison-table td:last-child{display:block;padding-top:8px}
  .comparison-table td:last-child::before{content:none}
  .comparison-table td:last-child .button{display:block;width:100%;text-align:center}

  /* Tiny labels: at least 11px so they can be read. */
  .continue-studying-label{font-size:11px}
}
