/* Quote cart (cart.js), shared by the home, HDPE and metal pages. Self-contained
   on purpose: the HDPE page doesn't load swenson.css, so nothing here leans on
   it. Colors match the brand tokens (ink #10181e, accent #f25c0a). */

/* Tappable price rows: home page .price-row divs and landing-page table rows */
.price-link { cursor: pointer; transition: background .15s; }
.price-link:hover, .price-link:focus-visible { background: rgba(242,92,10,0.07); outline: none; }
.price-link:focus-visible { box-shadow: inset 0 0 0 2px rgba(242,92,10,.5); }
.price-row.price-link span:first-child::after,
tr.price-link td.size::after {
  content: " \2192"; color: #f25c0a; opacity: 0; transition: opacity .15s;
}
.price-row.price-add span:first-child::after,
tr.price-add td.size::after { content: " + Add"; font-size: .8em; font-weight: 600; }
/* Touch screens can't hover, so the label is always there */
@media (hover: none) {
  .price-row.price-add span:first-child::after, tr.price-add td.size::after { opacity: .9; }
}
.price-link:hover span:first-child::after, .price-link:focus-visible span:first-child::after,
tr.price-link:hover td.size::after, tr.price-link:focus-visible td.size::after { opacity: 1; }
tr.price-link td.size { white-space: nowrap; }

/* The bar */
.cart-bar {
  position: fixed; left: 50%; bottom: 12px; z-index: 60;
  width: min(560px, calc(100% - 24px));
  transform: translate(-50%, calc(100% + 160px));
  background: #10181e; color: #fff; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  transition: transform .25s ease, bottom .2s ease;
}
.cart-bar.show { transform: translate(-50%, 0); }
.cart-bar.bump { animation: cart-bump .35s ease; }
@keyframes cart-bump { 40% { transform: translate(-50%, -6px); } }
.cart-main { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; }
.cart-toggle {
  flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0;
  background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; padding: 4px 0;
}
.cart-count { font-weight: 700; white-space: nowrap; }
.cart-sub { font-size: .95rem; white-space: nowrap; }
.cart-sub small { opacity: .75; font-size: .8rem; }
.cart-caret { margin-left: auto; font-size: .7rem; opacity: .7; }
.cart-go {
  white-space: nowrap; padding: 11px 16px; min-height: 44px; border: 0; border-radius: 6px;
  background: #f25c0a; color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.cart-go:hover { filter: brightness(1.05); }
.cart-panel { padding: 14px 16px 4px; border-bottom: 1px solid rgba(255,255,255,.12); max-height: 50vh; overflow: auto; }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.cart-name small { display: block; opacity: .65; font-size: .78rem; }
.cart-qty { display: flex; align-items: center; gap: 8px; }
.cart-qty button {
  width: 32px; height: 32px; border-radius: 6px; border: 1px solid rgba(255,255,255,.3);
  background: none; color: #fff; font-size: 1rem; line-height: 1; cursor: pointer;
}
.cart-qty b { min-width: 18px; text-align: center; }
.cart-amt { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }
.cart-fine { margin: 10px 0 8px; font-size: .78rem; opacity: .75; }
.cart-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
body.has-cart { padding-bottom: 90px; }
@media (max-width: 420px) {
  .cart-main { padding-left: 12px; }
  .cart-toggle { flex-wrap: wrap; gap: 2px 10px; }
  .cart-sub small { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .cart-bar, .cart-bar.bump { transition: none; animation: none; }
}
