.portal-shell { --paper:#f2f5ef; --forest:#17382b; --green:#c8f583; --line:#dce6d9; }
.portal-shell .sidebar { position: sticky; top: 0; align-self: start; min-height: 100dvh; padding: 31px 18px 20px; background: #eaf0e8; gap: 37px; }
.portal-sidebar .wordmark { margin-inline: 6px; }
.portal-sidebar .navlabel { padding-top: 4px; }
.portal-sidebar .nav button { min-height: 44px; gap: 10px; }
.portal-sidebar .nav button::before { content: ''; width: 8px; height: 8px; border-radius: 2px; border: 1px solid #56755b; flex: none; }
.portal-sidebar .nav button[aria-current=true] { background: #dae9d4; }
.portal-sidebar .nav button[aria-current=true]::before { background: #365e39; }
.portal-sidebar .sidefooter { display: flex; flex-direction: column; gap: 6px; }
.portal-shell .top { background: #f9fbf7; }
.portal-shell .top select { max-width: 180px; }
.portal-shell .top .btn { min-height: 38px; }
.portal-shell .top .portal-logout { color: #415548; }
.portal-shell .main { max-width: 1260px; }
.portal-shell .hero { border-radius: 22px; min-height: 255px; }
.portal-shell .hero h1 { font-size: clamp(2.05rem, 4vw, 3.25rem); }
.portal-shell .panel, .portal-shell .card { box-shadow: 0 2px 5px #263c2810; }
.portal-shell .btn, .prelogin-application .btn { min-height: 41px; }
.portal-shell .field, .prelogin-application .field { font-size: .875rem; }
.portal-shell .pagehead h1 { margin-bottom: .4rem; color: #1c392b; }
.portal-shell .pagehead + .metrics .metric { color: #23503a; }
.portal-shell .pagehead + .metrics .card { min-height: 106px; }
.portal-shell .pagehead + .metrics .metric { font-size: clamp(1.15rem, 2.8vw, 1.9rem); }
.portal-shell select, .portal-shell textarea, .portal-shell input:not([type=checkbox]):not([type=radio]) { min-height: 39px; }
.prelogin-application { max-width: 960px; padding: 0 0 38px; }
.prelogin-application .pagehead h1 { color: #1c392b; }

.portal-shell:has(.floating-repair) .main { padding-bottom: 90px; }
.portal-shell .floating-repair {
  position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 5; margin: 0; min-height: 50px; padding-inline: 19px; border-radius: 30px;
  box-shadow: 0 5px 19px #14352c46;
}
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.product-card { border: 1px solid var(--line); border-radius: 16px; background: white; overflow: hidden; display: flex; flex-direction: column; }
.product-picture { display: block; width: 100%; aspect-ratio: 1.35; object-fit: cover; background-color: #e8f0e7; }
.picture-table, .picture-tiles, .picture-parts, .picture-renew { background-image: url('./catalog.webp'); background-size: 200% 200%; }
.picture-table { background-position: 0 0; }
.picture-tiles { background-position: 100% 0; }
.picture-parts { background-position: 0 100%; }
.picture-renew { background-position: 100% 100%; }
.product-copy { display: flex; flex: 1; flex-direction: column; gap: 5px; padding: 14px; }
.product-copy h3 { color: #1d3728; font-size: 1rem; }
.product-copy .sub { margin: 0; }
.product-eyebrow { color: #557462; font-size: 13px; }
.product-bottom { margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.product-bottom strong { font-size: 1.12rem; color: #264d34; }
.product-bottom small { font-size: .75rem; font-weight: 400; white-space: nowrap; }
.offer-label { color: #755623; font-size: .8rem; }
.offer-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; align-items: center; }
.offer-detail .product-picture { border-radius: 11px; }
.offer-detail h2 { margin-bottom: .45rem; }
.offer-detail .money { display: block; margin-bottom: .4rem; }
.local-map { position: relative; min-height: 250px; overflow: hidden; border-radius: 14px; background-color: #dce8d8; background-image: repeating-linear-gradient(32deg, transparent 0 30px, #f5f1e2 31px 43px, transparent 44px 102px), repeating-linear-gradient(126deg,#e8f0e5 0 58px,#fff 59px 64px,#dde9dd 65px 95px); }
.local-map::before { content: ''; position: absolute; top: 47%; left: 49%; width: min(50%, 260px); aspect-ratio: 1; border-radius: 50%; transform: translate(-50%,-50%); background: #82c76128; border: 1px dashed #72986e; }
.local-pin { position: absolute; padding: 6px 9px; border-radius: 16px; background: #fff; color: #2d4a34; font-size: .81rem; font-weight: 700; box-shadow: 0 2px 5px #41664e30; white-space: nowrap; }
.pin-ready { background: #e5f7d6; }
.pin-busy { background: #ffefcb; }
.pin-store { top: 47%; left: 38%; background: #224333; color: #fff; }
.pin-zhou { top: 19%; left: 14%; }
.pin-li { top: 36%; right: 8%; }
.pin-chen { top: 69%; right: 19%; }
.map-range { position: absolute; left: 10px; bottom: 8px; color: #385243; font-size: .75rem; background: #f5f9f5; padding-inline: 5px; }

@media (max-width: 1050px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .product-copy { padding: 9px; }
  .product-copy h3 { font-size: .94rem; }
  .offer-detail { grid-template-columns: 1fr; gap: 12px; }
  .portal-shell .floating-repair { right: 13px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .local-map { min-height: 211px; }
}

@media (max-width: 760px) {
  .portal-shell { display: block; }
  .portal-shell .sidebar { position: static; min-height: 0; padding: 12px 13px 9px; gap: 10px; border: 0; }
  .portal-sidebar .wordmark { margin: 0; }
  .portal-sidebar .navlabel { display: none; }
  .portal-sidebar .nav { display: flex; flex-wrap: wrap; gap: 5px; }
  .portal-sidebar .nav button { justify-content: center; padding: 7px 8px; min-height: 36px; flex: 1 0 auto; white-space: nowrap; }
  .portal-sidebar .nav button::before { display: none; }
  .portal-sidebar .sidefooter { position: absolute; top: 13px; right: 13px; padding: 0; border: 0; }
  .portal-sidebar .sidefooter span { display: none; }
  .portal-shell .top { min-height: 56px; height: auto; padding: 8px 13px; flex-wrap: wrap; align-content: center; }
  .portal-shell .top-right { gap: 5px; flex-wrap: wrap; }
  .portal-shell .top select { max-width: 132px; }
  .portal-shell .top .btn { min-height: 34px; }
  .portal-shell .main { padding-inline: 12px; }
}
@media (max-width: 400px) {
  .portal-shell .top-right { width: 100%; }
  .portal-shell .top strong { font-size: 1rem; }
  .portal-shell .top select { max-width: 132px; }
  .portal-sidebar .nav button { font-size: .78rem; }
}

.portal-shell .availability-toggle { min-width: 150px; min-height: 58px; font-size: 1.18rem; font-weight: 750; border-radius: 12px; }
.location-strip { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; background:#edf4ea; border-radius:12px; flex-wrap:wrap; }
.person-link { border:0; background:transparent; color:#245334; font:inherit; font-size:1.12rem; font-weight:bold; padding:3px 0; cursor:pointer; }
.expert-card p { margin:5px 0; }
.spec-sheet { white-space:pre-line; line-height:1.9; }
.gallery figure { max-width:720px; margin:12px auto; }
.gallery figure img { display:block; width:100%; height:auto; border-radius:10px; }
.gallery figcaption,.chat-line time { color:#536758; font-size:.85rem; }
.chat-line,.portal-shell details { padding:12px 0; border-bottom:1px solid #dce5db; }
.portal-shell summary { cursor:pointer; font-weight:bold; }
.portal-shell form .formgrid { margin-block:12px; }
.portal-shell .panel form .actions { margin-top:10px; }
.portal-shell .panel { overflow-wrap:anywhere; }
.portal-shell .panel img { max-width:100%; }
.portal-shell .field, .portal-shell .field input { min-width:0; }
@media(max-width:600px){.expert-card{align-items:flex-start;flex-direction:column}.portal-shell .availability-toggle{min-height:52px}.portal-shell .inline{flex-wrap:wrap}}

html { scroll-behavior:auto; }

.quote-line { display:grid; grid-template-columns:minmax(120px,2fr) repeat(2,minmax(76px,1fr)) auto auto; align-items:end; gap:10px; min-width:0; border:1px solid var(--line); border-radius:12px; padding:12px; margin:10px 0; }
.quote-line legend,.line-total { color:#446449; font-weight:600; }
.quote-total { margin:12px 0; text-align:right; }
.portal-shell .worker-status { display:grid; justify-items:end; gap:4px; }
.portal-shell .worker-row.busy { opacity:1; }
.portal-shell .worker-row.busy .worker-choice { opacity:1; }
@media(max-width:850px){ .quote-line { grid-template-columns:repeat(2,minmax(0,1fr)); } .quote-line .field:first-of-type {grid-column:1/-1} }
@media(max-width:530px){ .portal-shell .worker-row {align-items:start;flex-direction:column} .portal-shell .worker-status{justify-items:start} }

.order-metrics {display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}
.order-metrics strong {font-size:1.5rem;color:#284b37}
.review-fields {display:grid;grid-template-columns:minmax(85px,auto) 1fr;gap:7px 16px}
.review-fields dt {color:#536758}.review-fields dd {margin:0;overflow-wrap:anywhere}
.tracking-box {margin:10px 0}.tracking-result {margin-top:8px}
.portal-shell .top-right .merchant-back {margin-left:auto}

@media(min-width:1050px){#parts-filter{grid-template-columns:repeat(3,minmax(0,1fr)) auto;align-items:end}#parts-filter .actions{align-self:end;padding-bottom:1px}}

.portal-sidebar .brand-contact .wordmark {margin:0}
.dealer-product-grid {grid-template-columns:repeat(auto-fill,minmax(min(235px,100%),1fr))}
.product-intro {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.dealer-product-grid .product-bottom {padding-bottom:6px}
@media(max-width:600px){.dealer-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dealer-product-grid .actions{flex-wrap:wrap}}
