/* Layout follows the available CSS width, including folded screens and split view. */
.mobile-menu-toggle{display:none}
.site-header :is(button,input,a):focus-visible{outline:3px solid #6970e8;outline-offset:3px}
.database-scroll-hint{margin:8px 0;color:#687480;font-size:13px}
.database-page .table-wrap:focus-visible{outline:3px solid #6970e8;outline-offset:3px}

@media(max-width:1180px){
  html{scroll-padding-top:16px}
  body .site-header{height:auto!important;min-height:64px;position:relative;top:auto}
  .site-header .top-nav{width:calc(100% - 24px)!important;min-height:64px;height:auto!important;padding:8px 0!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px!important;align-items:center!important}
  .site-header .brand{height:48px!important;min-width:0!important;gap:8px!important;justify-self:start}
  .site-header .brand-logo{width:36px!important;height:36px!important}
  .site-header .brand-wordmark{display:block!important;width:126px!important;height:26px!important}
  .site-header .mobile-menu-toggle{display:flex;align-items:center;justify-content:center;gap:8px;min-width:76px;min-height:44px;padding:8px 12px;border:1px solid #d9dfe8;border-radius:12px;background:#fff;color:#283549;font-size:14px;font-weight:700}
  .site-header .category-nav{display:none!important;width:100%;height:auto!important;grid-column:1/-1;grid-row:3;order:initial;overflow:visible!important;gap:6px!important;grid-template-columns:repeat(2,minmax(0,1fr));padding:4px 0 8px}
  .site-header .category-nav a{height:auto!important;min-height:44px;padding:10px 8px!important;font-size:14px!important;border-radius:10px!important;background:#f5f7fb;white-space:normal;text-align:center}
  .site-header .category-nav a.active{background:#eeeefe;color:#5156c8}
  .site-header .category-nav a.active:after{display:none}
  .site-header .global-search{display:none!important;width:100%!important;height:46px!important;grid-column:1/-1;grid-row:2;min-width:0;margin:0 0 2px}
  .site-header .global-search input{font-size:16px!important;height:44px}
  .site-header[data-menu-open] .category-nav{display:grid!important}
  .site-header[data-menu-open] .global-search{display:flex!important}
  .footer{padding-bottom:calc(20px + env(safe-area-inset-bottom,0px));font-size:12px}
  .footer-inner{gap:10px 18px;line-height:1.7}
  .footer-inner a,.footer .privacy-settings{display:inline-flex;align-items:center;min-height:44px}
  .product-detail-dialog{width:calc(100% - 20px);max-width:1060px;max-height:calc(100dvh - 20px)}
  .product-detail-content{max-height:calc(100dvh - 20px)}
  .product-detail-head{gap:12px;flex-shrink:0}
  .product-detail-head>div{min-width:0}
  .product-detail-head h2{overflow-wrap:anywhere}
  .product-detail-close{min-height:44px;min-width:60px;height:auto;flex-shrink:0;font-size:14px}
  .product-detail-scroll{min-height:0;overscroll-behavior:contain}
  .product-detail-summary{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}
  .product-detail-price{min-width:0;overflow-wrap:anywhere}
  .product-detail-price>span,.product-detail-price>em,.product-detail-price>small{font-size:12px}
  .product-detail-spec{grid-template-columns:minmax(0,38%) minmax(0,1fr);gap:10px;font-size:13px}
  .product-detail-spec-grid{grid-template-columns:minmax(0,1fr)}
  .product-detail-spec strong{overflow-wrap:anywhere}
  .product-detail-price a{display:inline-flex;align-items:center;min-height:44px}
  .database-page .toolbar{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  .database-page .toolbar #q{grid-column:1/-1}
  .database-page .control{min-width:0;width:100%;font-size:16px;min-height:44px}
  .database-page .table-wrap{max-width:100%;overscroll-behavior-x:contain;scrollbar-width:thin}
  .database-page .data-table{min-width:1050px}
  .database-page .data-table th,.database-page .data-table td{padding:10px 12px;font-size:13px}
  .database-page .link-btn{min-height:44px;font-size:14px;max-width:250px;overflow-wrap:anywhere}
  .contact-page input,.contact-page textarea,.contact-page select{font-size:16px}
  .finder-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .finder-card{grid-template-columns:minmax(0,1fr);min-height:0;padding:16px;gap:12px}
  .finder-card .product-visual{height:172px;margin:0}
  .finder-card h2{font-size:16px;line-height:1.5}
  .card-model,.card-topline,.card-specs,.card-meta{font-size:12px;overflow-wrap:anywhere}
  .card-actions{gap:12px;flex-wrap:wrap}
  .card-actions .detail-link{min-height:44px;display:inline-flex;align-items:center;font-size:13px}
  .build-add{min-height:44px;font-size:13px}
  .finder-search{grid-template-columns:44px minmax(0,1fr) 64px;height:48px}
  .finder-search input{min-width:0;width:100%;font-size:16px}
  .finder-search button{min-height:44px;font-size:13px;padding:0 8px}
  .filter-options{min-width:0;gap:8px;overscroll-behavior-x:contain;scrollbar-width:thin}
  .filter-chip{min-height:44px;height:auto;font-size:13px;padding:9px 14px}
  .result-bar{height:auto;min-height:64px;gap:10px}
  .result-controls{max-width:100%;flex-wrap:wrap;overflow:visible;gap:4px}
  .sort-button,.result-select{min-height:44px;height:auto;font-size:14px}
  .result-select{font-size:16px;min-width:0}
  .load-more{height:auto;min-height:48px;font-size:14px}
  .home-search input{min-width:0;font-size:16px}
  .home-search button{min-height:44px}
  .featured-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .featured-card{min-width:0}
  .home-quick{grid-template-columns:repeat(3,minmax(0,1fr))}
  .quick-card{min-width:0;padding:18px}
  .quick-card strong{font-size:15px}
}

@media(min-width:600px) and (max-width:1180px){
  .site-header .category-nav{grid-template-columns:repeat(5,minmax(0,1fr))}
  .finder-grid{gap:14px}
  .finder-page .filter-row{grid-template-columns:108px minmax(0,1fr);gap:10px}
  .finder-page .filter-options{flex-wrap:nowrap!important;overflow-x:auto!important;padding:6px 2px}
  .filter-chip{flex:0 0 auto}
}

@media(max-width:599px){
  .site-header .top-nav{width:calc(100% - 24px)!important}
  .site-header .brand-wordmark{width:116px!important}
  .page-head{padding:26px 0 16px}
  .page-head h1,.database-page .page-head h1{font-size:26px}
  .page-head p,.database-page .page-head p{font-size:13px;line-height:1.7}
  .database-page .toolbar{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .database-page .tiny{font-size:12px}
  .product-detail-summary{grid-template-columns:minmax(0,1fr);gap:10px}
  .product-detail-visual{min-height:150px;height:190px}
  .product-detail-photo{max-height:190px;padding:12px}
  .product-detail-price{padding:6px 0}
  .product-detail-price>strong{font-size:21px;margin:5px 0 8px}
  .product-detail-status{margin-bottom:12px}
  .product-detail-head{padding:12px}
  .product-detail-head h2{font-size:16px}
  .product-detail-scroll{padding:12px}
  .finder-hero{padding:16px 12px 0;display:flex;flex-direction:column}
  .finder-tabs{order:0;width:100%;margin:0 0 14px}
  .finder-search-row{order:1;margin:0 0 12px;padding-bottom:12px}
  .filter-shell{order:2}
  .filter-rows{padding:4px 10px}
  .filter-row{grid-template-columns:minmax(0,1fr);gap:2px;padding:8px 0;min-width:0}
  .filter-row>strong{font-size:13px}
  .filter-options,.filter-row[data-filter-row="manufacturer"] .filter-options{flex-wrap:nowrap!important;overflow-x:auto!important;padding:4px 1px 7px}
  .filter-chip{flex:0 0 auto;min-width:80px}
  .finder-results{width:calc(100% - 24px)}
  .finder-grid{grid-template-columns:minmax(0,1fr);gap:12px}
  .finder-card{grid-template-columns:110px minmax(0,1fr);gap:12px;padding:14px}
  .finder-card .product-visual{height:140px;align-self:center}
  .finder-card .card-topline{flex-wrap:wrap;gap:4px;margin-bottom:4px}
  .finder-card h2{font-size:15px}
  .finder-card .card-price{text-align:left}
  .finder-card .card-actions{justify-content:flex-start;gap:8px;margin-top:8px}
  .finder-card .build-add{padding:0 12px}
  .result-bar{align-items:flex-start;flex-direction:column;padding:12px 0}
  .result-controls{width:100%}
  .home-search-section{padding:24px 12px 18px}
  .home-search-section h1{font-size:27px;line-height:1.35;text-wrap:balance}
  .home-search-section p{font-size:14px;line-height:1.7}
  .home-search{grid-template-columns:40px minmax(0,1fr) 60px}
  .banner-shell{width:calc(100% - 24px);aspect-ratio:1920/500;border-radius:12px;margin-bottom:24px}
  .banner-slide img{object-fit:contain}
  .banner-arrow{width:44px;height:44px}
  .banner-dots{bottom:0;gap:0}
  .banner-dot{width:32px;height:28px;border-radius:0;background:transparent;position:relative}
  .banner-dot:after{content:"";position:absolute;inset:10px 12px;border-radius:8px;background:#cbd0eb}
  .banner-dot.active{width:32px;border-radius:0;background:transparent}
  .banner-dot.active:after{left:7px;right:7px;background:#655fee}
  .featured-section,.home-quick{width:calc(100% - 24px)}
  .featured-head{align-items:flex-start;gap:8px;flex-wrap:wrap}
  .featured-head a{display:inline-flex;align-items:center;min-height:44px}
  .featured-grid{gap:10px}
  .featured-card{padding:10px;min-height:245px}
  .featured-visual{height:126px}
  .featured-card h3{font-size:14px;line-height:1.5}
  .featured-card small,.featured-meta{font-size:12px}
  .featured-price{font-size:17px!important;overflow-wrap:anywhere}
  .home-quick{grid-template-columns:minmax(0,1fr);gap:10px}
  .quick-card{padding:18px}
}

@media(max-width:359px){
  .finder-card{grid-template-columns:minmax(0,1fr)}
  .finder-card .product-visual{height:160px}
  .featured-grid{grid-template-columns:minmax(0,1fr)}
  .featured-card{min-height:0}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .finder-card,.featured-card,.banner-slide{transition:none}
}
