/* Mobile only. Desktop and tablet retain their existing layout. */
.mobile-account-links { display: none; }
.mobile-prices-action { display: none; }
@media (max-width: 600px) {
  :root { --mobile-nav-height: 66px; }
  body { padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom)); }
  .wrap, body > main.wrap { width: 100%; padding-inline: 12px; }
  header .head > .primary { margin-left: auto; }
  header .head.wrap { display: flex; height: auto; min-height: 56px; padding-block: 6px; flex-wrap: wrap; gap: 6px 12px; }
  .head > .primary { display: block; margin-left: auto; min-height: 44px; padding: 8px 14px; font-size: 14px; }
  header .head .search { display: flex; order: 2; flex: 1 1 100%; width: 100%; min-width: 0; height: 46px; margin: 0; }
  .head .search input { width: 100%; min-width: 0; font-size: 16px; }
  .head .search select { max-width: 104px; min-width: 0; font-size: 12px; padding-inline: 6px; }
  .head .search button { min-width: 52px; min-height: 44px; }
  body.mobile-discover header .head .search { display: none; }
  .mobile-bottom-nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); height: auto; min-height: var(--mobile-nav-height); gap: 2px; padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -3px 16px #083f4c0c; }
  .mobile-bottom-nav [data-mobile-destination="home"] { display: none; }
  .mobile-bottom-nav button { min-width: 0; min-height: 56px; gap: 3px; border-radius: 12px; padding: 4px; color: #60747a; }
  .mobile-bottom-nav button.active { color: var(--petrol-dark); background: var(--petrol-soft); box-shadow: inset 0 3px var(--petrol); }
  .mobile-nav-icon { display: grid; place-items: center; width: 28px; height: 26px; font-size: 24px; line-height: 1; }
  .mobile-nav-icon svg { width: 23px; height: 23px; }
  .mobile-nav-logo img { width: 42px; height: 26px; object-fit: contain; }
  .mobile-nav-label { font-size: 12px; line-height: 16px; font-weight: 650; }
  .mobile-chat-button { bottom: calc(78px + env(safe-area-inset-bottom)); right: 12px; width: 44px; height: 44px; min-width: 44px; padding: 0; font-size: 0; }
  .mobile-chat-button::after { content: '?'; font-size: 21px; font-weight: 700; }
  button, a, input, select, textarea { touch-action: manipulation; }
  input, select, textarea { font-size: 16px; }
  :is(button,a,input,select,textarea):focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
  #marketplaceMain .discovery-hero { min-height: 0; padding: 14px; margin-block: 8px; }
  #marketplaceMain .discovery-hero h1 { font-size: 20px; }
  #marketplaceMain .discovery-hero p { font-size: 13px; }
  #marketplaceMain .discovery-hero-cta { display: none; }
  #siteResultsSection .listing-section-heading { margin-block: 14px 10px; }
  #grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  #grid .listing { display: grid; grid-template-columns: 42% minmax(0,1fr); min-height: 166px; border-radius: 14px; }
  #grid .photo { height: 100%; min-height: 166px; aspect-ratio: auto; }
  #grid .body { padding: 12px 10px; }
  #grid .body h2 { min-height: 0; margin-bottom: 10px; font-size: 14px; }
  #grid .title-open { -webkit-line-clamp: 3; }
  #grid .price { font-size: 18px; line-height: 1.3; }
  #grid .meta { font-size: 12px; margin-top: 8px; padding-top: 6px; gap: 3px; }
  #grid .pill { font-size: 10px; padding: 3px 5px; }
  .filter-summary { min-height: 46px; padding: 10px 12px; }
  body.filter-sheet-open { overflow: hidden; }
  #filterPanel[open]::before { z-index: 1000; }
  #filterPanel[open] .filter { z-index: 1001; max-height: 86dvh; padding: 12px 16px calc(18px + env(safe-area-inset-bottom)); overscroll-behavior: contain; border-radius: 20px 20px 0 0; }
  #filterPanel .filter :is(input,select,button) { min-height: 44px; }
  #filterPanel .mobile-filter-close { position: sticky; top: -12px; z-index: 3; background: #fff; border-bottom: 1px solid var(--line); width: 100%; min-height: 48px; }
  #webSearchView.web-search-page { padding-bottom: 16px; }
  #webSearchView .web-search-hero { min-height: 0; padding: 12px; border-radius: 14px; }
  #webSearchView .web-search-brand { transform: none; gap: 8px; }
  #webSearchView .web-search-brand img { width: 80px; }
  #webSearchView .compare-search input { font-size: 16px !important; }
  #webSearchView .compare-search button { min-height: 44px; }
  #webSearchView .web-results-main { padding: 12px 0; background: transparent; }
  #webSearchView .web-popular-head h2 { font-size: 18px; }
  #webSearchView .discovery-category { flex-basis: 92px; min-height: 80px; font-size: 12px; }
  #webSearchView .discovery-category small { font-size: 11px; }
  #webSearchView .discovery-category img { width: 40px; height: 34px; }
  #webSearchView .discovery-modes button { min-height: 44px; font-size: 12px; }
  #webSearchView .discovery-toolbar label { font-size: 13px; }
  #webSearchView .discovery-toolbar select { min-height: 44px; }
  #webSearchView .web-popular-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  #webSearchView .web-popular-product { border-radius: 14px; background: #fff; overflow: hidden; }
  #webSearchView .web-popular-product-select { display: grid; grid-template-columns: 112px minmax(0,1fr); align-items: center; width: 100%; text-align: left; }
  #webSearchView .web-popular-photo { width: 112px; height: 128px; padding: 12px; }
  #webSearchView .web-popular-photo img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
  .mobile-prices-action { display: block; width: calc(100% - 24px); margin: 0 12px 10px; min-height: 44px; border: 0; border-radius: 8px; background: var(--petrol-soft); color: var(--petrol-dark); font-size: 13px; font-weight: 700; }
  #webSearchView .web-popular-copy { padding: 12px; min-width: 0; }
  #webSearchView .web-popular-copy strong { font-size: 14px; line-height: 1.45; -webkit-line-clamp: 3; }
  #webSearchView .web-popular-copy small { font-size: 12px; }
  #webSearchView .web-popular-offer { display: flex; justify-content: space-between; gap: 10px; min-height: 60px; padding: 9px 12px; }
  #webSearchView .web-popular-offer-meta { min-width: 0; }
  #webSearchView .web-popular-offer-meta strong { font-size: 13px; overflow-wrap: anywhere; }
  #webSearchView .web-popular-offer-price { flex-shrink: 0; }
  #webSearchView .web-popular-offer-price strong { font-size: 17px; }
  #webSearchView .web-popular-offer-price small { font-size: 11px; }
  #webSearchView .web-popular-more { min-height: 44px; font-size: 13px; }
  #webSearchView .discovery-checked { font-size: 11px; padding: 7px 12px; }
  #webSearchView .buula-product-summary { grid-template-columns: 88px minmax(0,1fr); padding: 12px; }
  #webSearchView .buula-product-image { width: 88px; height: 104px; object-fit: contain; }
  #webSearchView .buula-product-copy h2 { font-size: 15px; -webkit-line-clamp: 3; }
  #webSearchView .buula-lowest-price strong { font-size: 21px; }
  #webSearchView .buula-offer { padding: 12px; gap: 8px; min-height: 110px; }
  #webSearchView .buula-offer-store { min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
  #webSearchView .buula-offer-price { font-size: 18px; }
  #webSearchView .buula-store-link { min-height: 44px; font-size: 13px; padding-inline: 12px; }
  #storesView .public-store-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  #storesView .public-store-card { min-height: 170px; padding: 14px 12px; border-radius: 14px; }
  #storesView .public-store-card strong { font-size: 15px; overflow-wrap: anywhere; }
  #storesView .public-store-card small { display: flex; align-items: center; min-height: 44px; font-size: 13px; }
  #publicStoreGrid[aria-hidden="true"],
  #publicStoreRows[aria-hidden="true"] { display: none; }
  .store-detail-head { gap: 10px; align-items: center; }
  .store-detail-head h2 { font-size: 20px; overflow-wrap: anywhere; }
  .store-detail-product { min-width: 0; padding: 12px; grid-template-columns: 80px minmax(0,1fr); }
  .store-detail-product img { width: 80px; height: 92px; object-fit: contain; }
  .store-detail-product strong { font-size: 14px; }
  #account.modal { bottom: calc(66px + env(safe-area-inset-bottom)); padding: 0; }
  #account .sheet { width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  #account .sheet-head { position: sticky; top: 0; z-index: 2; background: #fff; min-height: 56px; }
  #account .content { padding: 16px 12px; }
  #account :is(input,button) { min-height: 44px; font-size: 14px; }
  #account input { font-size: 16px; }
  .mobile-account-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 16px 0; }
  .mobile-account-links button { border: 1px solid var(--line); background: var(--petrol-soft); color: var(--petrol-dark); border-radius: 10px; padding: 12px 8px; }
  #account :is(.account-listing-row,.draft-row,.conversation-row) { padding: 14px 12px; gap: 10px; border-radius: 12px; overflow-wrap: anywhere; }
  #account .listing-actions { display: flex; flex-wrap: wrap; gap: 6px; }
  #account .listing-actions button { flex: 1 1 auto; }
  #account .account-store-card { flex-wrap: wrap; }
  #account [hidden] { display: none !important; }
  #account h3 { scroll-margin-top: 75px; }
  .sheet { max-width: 100%; }
  .sheet-head .close { min-width: 44px; min-height: 44px; }
  .loading { min-height: 120px; font-size: 14px; }
}
