/* Shared responsive layer for storefront, checkout, and customer pages. */
html { scroll-padding-top:140px; }
body { min-width:0; }
main, .listing-content, .quote-card, .cart-list, .account-main { min-width:0; }
img, svg { max-width:100%; }
.mobile-bottom-nav { display:none; }
.button, .pagination a, .account-add-link { min-height:44px; }
.form-field input, .form-field select, .form-field textarea, .account-detail-form input, .account-detail-form textarea { min-width:0; }
.result-row > * { min-width:0; overflow-wrap:anywhere; }
.result-row strong, .result-row b { text-align:end; }

@media (max-width:1100px) and (min-width:901px) {
  .wrap { padding-inline:24px; }
  .header-inner { grid-template-columns:auto minmax(220px,1fr) auto; gap:14px; }
  .header-actions { gap:5px; }
  .header-actions a { padding-inline:8px; }
  .nav-inner { gap:13px; }
  .nav-links { gap:13px; }
  .nav-guide { display:none; }
  .category-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .listing-layout { grid-template-columns:220px minmax(0,1fr); gap:16px; }
  .product-layout { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .purchase-panel { grid-column:1/-1; }
}

@media (max-width:900px) {
  html { scroll-padding-top:24px; }
  .wrap { padding-inline:clamp(16px,3vw,24px); }
  .site-header { position:relative; }
  .site-header .wrap { padding-inline:clamp(16px,3vw,24px); }
  .header-inner { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"brand actions" "search search"; gap:10px 12px; min-height:0; padding-block:12px; }
  .logo { grid-area:brand; min-width:0; font-size:clamp(21px,3vw,26px); }
  .logo small { margin-top:2px; }
  .search-shell { grid-area:search; width:100%; justify-self:stretch; }
  .search-form { width:100%; min-height:46px; }
  .search-form input, .listing-search-form input, .filter-group input:not([type=checkbox]), .filter-group select { font-size:16px; }
  .header-actions { grid-area:actions; gap:4px; margin:0; }
  .header-actions a, .account-menu-trigger { min-width:44px; min-height:44px; }
  .main-nav { display:none; }
  .mobile-menu { display:block; border-top:1px solid var(--line); }
  .mobile-menu summary { display:flex; align-items:center; gap:9px; min-height:44px; padding-block:8px; font-size:12px; cursor:pointer; }
  .mobile-menu > div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 16px; padding-bottom:10px; }
  .mobile-menu a { display:flex; align-items:center; min-height:44px; padding-block:9px; border-top:1px solid var(--line); font-size:12px; }
  .search-suggestions { max-height:min(55vh,420px); }
  .hero-carousel { height:clamp(330px,45vw,400px); }
  .hero-slide .hero-copy { max-width:min(72%,550px); padding:30px; }
  .category-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .product-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .listing-layout { grid-template-columns:220px minmax(0,1fr); gap:16px; }
  .listing-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .product-layout { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .purchase-panel { grid-column:1/-1; }
  .cart-layout { grid-template-columns:minmax(0,1fr) 260px; gap:14px; }
  .quote-layout { grid-template-columns:minmax(0,1fr) 270px; gap:14px; }
  .footer-grid { gap:24px; }
  .mobile-bottom-nav { position:fixed; inset-inline:0; bottom:0; z-index:50; display:flex; justify-content:space-around; align-items:stretch; min-height:64px; padding:4px 8px calc(4px + env(safe-area-inset-bottom)); border-top:1px solid #e4e8eb; background:#fff; box-shadow:0 -8px 24px #25313a10; }
  .mobile-bottom-nav a { display:flex; flex:1 1 0; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-width:0; min-height:54px; border-radius:10px; color:#66727c; font-size:10px; font-weight:600; line-height:1.4; white-space:nowrap; }
  .mobile-bottom-nav a:active { background:#fff1f3; color:var(--red); }
  .mobile-bottom-nav svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
  .mobile-cart-count { color:var(--red); font-size:10px; }
  body { padding-bottom:calc(64px + env(safe-area-inset-bottom)); }
  .back-top { min-height:44px; }
}

@media (max-width:720px) {
  .store-intro { margin-block:14px 10px; }
  .hero-carousel { height:clamp(340px,95vw,430px); border-radius:14px; }
  .hero-slide .hero-copy { max-width:100%; padding:24px; align-self:center; }
  .hero-slide::before { background:linear-gradient(0deg,#14252aef 0%,#14252abc 55%,#14252a55 100%); }
  .hero-slide h1, .hero-slide h2 { font-size:clamp(23px,6vw,30px); line-height:1.5; }
  .hero-slide p { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; max-width:100%; font-size:12px; }
  .hero-controls { bottom:10px; }
  .hero-controls > button { min-width:40px; min-height:40px; }
  .section { margin-block:32px; }
  .section-title { margin-bottom:15px; }
  .section-title h2 { font-size:20px; }
  .category-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
  .category-card { min-height:132px; }
  .category-photo { height:85px; }
  .category-card strong { font-size:11px; overflow-wrap:anywhere; }
  .category-showcase { padding:16px 12px; }
  .showcase-heading { align-items:flex-start; }
  .showcase-heading-link { min-width:0; }
  .showcase-heading h2 { font-size:16px; }
  .showcase-heading p { display:none; }
  .showcase-all { min-height:40px; display:inline-flex; align-items:center; white-space:nowrap; }
  .showcase-products { scroll-padding-inline:12px; padding-bottom:4px; }
  .showcase-controls { display:none; }
  .product-grid, .listing-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .product-card { min-width:0; }
  .product-image, .listing-grid .product-image { height:clamp(135px,35vw,195px); }
  .product-card-body { padding:12px; }
  .product-card-title, .product-card h3 { min-height:46px; font-size:12px; line-height:1.7; }
  .product-card-bottom { margin-top:auto; font-size:12px; overflow-wrap:anywhere; }
  .product-card-bottom b { overflow-wrap:anywhere; }
  .listing-layout { display:flex; flex-direction:column; gap:13px; margin-bottom:40px; }
  .listing-layout > * { width:100%; min-width:0; }
  .filters { margin:0; padding:12px 16px; }
  .filter-details summary { position:relative; min-height:44px; display:flex; align-items:center; padding:0 0 0 85px; }
  .filter-details summary::after { content:"⌄"; margin-inline-start:8px; font-size:20px; line-height:1; }
  .filter-details[open] summary::after { transform:rotate(180deg); }
  .filter-header { top:22px; }
  .filter-group { padding-block:13px; }
  .filter-group .check { min-height:44px; }
  .filter-submit { min-height:46px; }
  .listing-heading { padding:18px; }
  .listing-heading h1 { font-size:21px; line-height:1.5; overflow-wrap:anywhere; }
  .sort-row { align-items:stretch; flex-direction:column-reverse; gap:0; }
  .sort-options { width:100%; gap:16px; }
  .sort-options a { min-height:46px; }
  .sort-count { padding-block:5px; }
  .pagination { flex-wrap:wrap; gap:8px; font-size:12px; }
  .pagination a { display:inline-flex; align-items:center; padding-inline:12px; }
  .product-layout { display:grid; grid-template-columns:1fr; gap:20px; padding:14px; }
  .product-gallery, .product-info, .purchase-panel { margin:0; }
  .product-main-image { height:clamp(255px,75vw,400px); padding:20px; }
  .gallery-thumbs { flex-wrap:nowrap; overflow-x:auto; padding:3px 2px; }
  .gallery-thumbs a { flex:0 0 64px; }
  .product-info h1 { font-size:22px; line-height:1.5; }
  .quick-specs li { align-items:flex-start; }
  .quick-specs li b { text-align:end; overflow-wrap:anywhere; }
  .purchase-panel { grid-column:auto; padding:18px; }
  .panel-price { margin:12px 0; }
  .panel-separator { margin:12px 0; }
  .detail-section, .seo-content { padding:18px; }
  .spec-table > div { min-width:0; padding-inline:7px; }
  .spec-table strong { text-align:end; overflow-wrap:anywhere; }
  .product-feedback-grid { grid-template-columns:1fr; }
  .product-feedback-grid > div + div { border-top:1px solid var(--line); padding-top:14px; }
  .quote-layout, .cart-layout { display:grid; grid-template-columns:1fr; gap:14px; margin-block:18px 48px; }
  .quote-card, .quote-help, .cart-list, .cart-summary { min-width:0; margin:0; padding:18px; }
  .quote-form { grid-template-columns:1fr; gap:14px; }
  .quote-form .form-field { grid-column:auto; }
  .quote-form button { justify-self:stretch; }
  .form-field input, .form-field select, .form-field textarea, .account-form input, .account-detail-form input, .account-detail-form textarea { min-height:44px; font-size:16px; }
  .quote-result { margin-block:20px 48px; padding:20px; }
  .quote-result form .button { width:100%; }
  .cart-summary { order:2; }
  .cart-line { grid-template-columns:82px minmax(0,1fr); gap:12px; }
  .cart-line-actions { grid-column:1/-1; gap:12px; }
  .cart-line-total { white-space:normal; }
  .cart-line-controls { gap:12px; }
  .cart-line input, .cart-line .remove-button { min-height:44px; }
  .checkout-addresses a { min-height:44px; display:inline-flex; align-items:center; }
  .account-layout { margin-bottom:48px; }
  .account-sidebar { border-radius:12px; }
  .account-side-nav { scroll-snap-type:x proximity; scrollbar-width:none; }
  .account-side-nav::-webkit-scrollbar, .account-tabs::-webkit-scrollbar { display:none; }
  .account-side-nav a { display:inline-flex; align-items:center; min-height:44px; scroll-snap-align:start; }
  .account-panel { padding:18px; }
  .account-panel-heading { align-items:flex-start; flex-wrap:wrap; }
  .account-panel-heading h1 { font-size:20px; }
  .account-order-search { width:100%; }
  .account-order-search input { flex:1; width:auto; min-width:0; min-height:44px; font-size:16px; }
  .account-order-search button { min-height:44px; padding-inline:16px; }
  .account-tabs { gap:17px; scrollbar-width:none; }
  .account-tabs a { min-height:44px; }
  .account-detail-form { grid-template-columns:1fr; }
  .account-form-actions { flex-wrap:wrap; }
  .account-verification-banner { flex-wrap:wrap; }
  .account-address-grid, .account-favorite-grid { grid-template-columns:1fr; }
  .account-card-actions a, .account-card-actions button, .account-favorite button, .account-feedback-item button { display:inline-flex; align-items:center; min-height:40px; }
  .account-card { margin-block:20px 48px; }
  .footer-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; padding-block:34px; }
  .footer-grid > div:first-child { grid-column:1/-1; }
  .footer-bottom { padding-inline:16px; }
}

@media (max-width:480px) {
  .header-actions { gap:0; }
  .header-actions a, .account-menu-trigger { min-width:40px; min-height:40px; }
  .header-account span:last-child { display:none; }
  .logo { font-size:21px; }
  .logo small { font-size:8px; }
  .search-form input { font-size:16px; }
  .category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .category-card { min-height:145px; }
  .category-photo { height:94px; }
  .showcase-heading-image { width:38px; height:38px; }
  .showcase-heading h2 { font-size:14px; }
  .showcase-all { font-size:10px; }
  .product-card-body { padding:10px; }
  .product-card-bottom { align-items:flex-end; }
  .product-card-bottom .card-arrow { display:none; }
  .service-strip { gap:12px; }
  .service-strip > div { font-size:11px; }
  .account-quick-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .order-summary-grid { gap:5px; }
  .order-summary-item { min-width:0; }
  .account-address-card, .account-favorite { padding:14px; }
  .result-row { gap:10px; }
  .footer-grid { grid-template-columns:1fr; }
  .footer-grid > div:first-child { grid-column:auto; }
}

@media (max-width:360px) {
  .wrap, .site-header .wrap { padding-inline:12px; }
  .mobile-bottom-nav { padding-inline:2px; }
  .mobile-bottom-nav a { font-size:9px; }
  .mobile-bottom-nav svg { width:20px; height:20px; }
  .hero-slide .hero-copy { padding:19px; }
  .hero-slide h1, .hero-slide h2 { font-size:22px; }
  .product-grid, .listing-grid { gap:7px; }
  .product-card-title, .product-card h3 { font-size:11px; }
}
