/* Phone layout for the RIFQA concept (the pages are laid out with inline styles). */
@media (max-width: 760px) {
  /* Header: logo and icons on one line, the menu scrolls sideways underneath */
  header .wrap { gap: 4px 12px !important; min-height: 0 !important; padding-top: 10px !important; }
  header .wrap > div:last-child { order: 2; gap: 0 !important; }
  header .wrap > div:last-child .ibtn { width: 40px; height: 40px; }
  header nav { order: 3; flex: 0 0 100%; flex-wrap: nowrap !important; overflow-x: auto; gap: 22px !important; padding: 4px 0 12px; white-space: nowrap; scrollbar-width: none; font-size: 14px !important; }
  header nav::-webkit-scrollbar { display: none; }

  /* Wide two-column sections stack */
  [style*="minmax(360px"], [style*="minmax(420px"], [style*="minmax(300px"], [style*="minmax(280px"] { grid-template-columns: minmax(0, 1fr) !important; gap: 28px !important; }
  [style*="minmax(360px"] > *, [style*="minmax(420px"] > *, [style*="minmax(300px"] > *, [style*="minmax(280px"] > * { min-width: 0; }
  /* Product grids: two per row */
  [style*="minmax(180px"], [style*="minmax(200px"], [style*="minmax(210px"], [style*="minmax(230px"], [style*="minmax(250px"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  /* Footer columns */
  [style*="grid-template-columns:2fr 1fr 1.4fr 1fr"], [style*="grid-template-columns:1.6fr 1.2fr 1fr 1fr 1fr"] { grid-template-columns: 1fr 1fr !important; gap: 24px !important; }
  [style*="grid-template-columns:2fr 1fr 1.4fr 1fr"] > :first-child, [style*="grid-template-columns:1.6fr 1.2fr 1fr 1fr 1fr"] > :first-child { grid-column: 1 / -1; }
  /* Flex items with large bases take the full width */
  [style*="flex:2 1 420px"], [style*="flex:1 1 420px"], [style*="flex:1 1 360px"] { flex-basis: 100% !important; min-width: 0 !important; overflow-x: auto; }
  [style*="padding:32px 36px 48px"] { padding: 20px 16px 40px !important; }
  /* Big boxes and padding */
  [style*="padding:44px"] { padding: 24px !important; }
  [style*="min-height:420px"], [style*="min-height:380px"] { min-height: 300px !important; }
  /* Side-by-side comparison box */
  [style*="gap:72px"] { gap: 20px !important; }
  [style*="gap:72px"] [style*="width:200px"] { width: 104px !important; }
  /* Headings */
  [style*="font-size:68px"] { font-size: 44px !important; line-height: 1.15 !important; }
  [style*="font-size:46px"], [style*="font-size:44px"] { font-size: 32px !important; line-height: 1.25 !important; }
  [style*="font-size:40px"], [style*="font-size:42px"] { font-size: 30px !important; }
  /* Wide tables scroll inside their card */
  [style*="min-width:640px"], [style*="min-width:860px"] { max-width: none; }
  table { display: block; overflow-x: auto; }
}
