/* Shop layer on top of the existing CNC theme (../css/main.css + ../css/cnc.css, loaded first by head.html).
   Colours come from assets-src/css/theme.css (loaded BEFORE this file). Reference ONLY var(--shop-*)
   tokens here — never hardcode a hex — so switching the body.theme-* class re-skins the whole shop. */
.skip{position:absolute;left:-999px}.skip:focus{left:var(--gap);top:var(--gap);background:var(--shop-text);color:var(--shop-bg);padding:.5rem;z-index:100}
body.shop #header .logo img{height:2em;vertical-align:middle;margin-right:.5em;display:inline-block}
/* CB-56: slim pinned header (theme cnc.css forces min-height:300px for old nav pills) */
body.shop #header{min-height:0;height:auto;padding:.4em 0}
body.shop #header .inner{display:flex;align-items:center;gap:1em;padding:0 1.5em;max-width:none}
body.shop #header .logo{font-size:1em;margin:0;line-height:1}
body.shop #header .logo img{height:44px;margin-right:.6em}
body.shop #header .logo span{font-size:1.5em;margin-left:0;color:var(--shop-text)}
.shop-nav-wrap{padding-top:4.5em}
/* Nav pill buttons: dark pills, accent hover/active — driven by the active palette */
body.shop .link-bar{display:flex;flex-wrap:wrap;gap:.45rem;padding:.35rem .15rem}
body.shop .link-pill{background:var(--shop-bg-hi);border:1px solid var(--shop-line);border-radius:999px;color:var(--shop-text);padding:.45em 1.1em;font-size:.92em;letter-spacing:.02em;transition:background .18s ease,border-color .18s ease,color .18s ease}
body.shop .link-pill:hover{background:var(--shop-surface);border-color:var(--shop-accent);color:var(--shop-text)}
.link-pill.active{background:var(--shop-accent);border-color:var(--shop-accent);color:var(--shop-accent-ink);font-weight:600}
.link-pill.active:hover{background:var(--shop-accent-hi);border-color:var(--shop-accent-hi)}
/* Category strip header (admin btp-facet-strip look, adapted to the shop palette): panel bar above category chips */
.cat-strip{background:var(--shop-bg-hi);border:1px solid var(--shop-line);border-radius:10px;padding:.9rem 1.1rem;margin:0 0 1.5em}
.cat-strip-head{display:flex;align-items:baseline;gap:.75rem;border-bottom:1px solid var(--shop-line);padding-bottom:.5rem;margin-bottom:.65rem}
.cat-strip-title{color:var(--shop-muted);font-size:.8rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase}
.cat-strip-count{color:var(--shop-muted);font-size:.8rem}
.cat-chips{margin-bottom:0}
.cat-chips a.active{background:var(--shop-accent);border-color:var(--shop-accent);color:var(--shop-accent-ink);font-weight:600}
/* Thumbnail inside category pills: fixed square so varying image sizes cannot rearrange the strip */
.cat-chips a img{display:inline-block;width:1.5em;height:1.5em;object-fit:cover;border-radius:4px;margin:-.15em .5em -.15em 0;background:var(--shop-surface)}
/* Product main photo: fixed frame so cards/photos stay sized consistently */
.product-main{aspect-ratio:4/3;background:var(--shop-well);border-radius:var(--shop-radius);overflow:hidden}
.product-thumbs .product-thumb{width:5em;height:5em;padding:0;overflow:hidden;border-radius:6px;border:1px solid var(--shop-line);background:var(--shop-well)}
.product-thumbs .product-thumb img{width:100%;height:100%;object-fit:cover;display:block;border-radius:0}

@media (max-width:736px){body.shop #header .logo img{height:34px}body.shop #header .logo span{font-size:1.1em}.shop-nav-wrap{padding-top:3.5em}}
body.shop #wrapper > .wrapper > .inner{padding:2em 2em 3em}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(14rem,1fr));gap:var(--gap);margin-bottom:2em}
.card{background:var(--shop-card);border:1px solid var(--shop-line);border-radius:var(--shop-radius);padding:var(--gap)}
.card img{max-width:100%;height:auto;display:block;border-radius:var(--shop-radius)}
.card h3{margin:.5rem 0}
.price{font-weight:600}
.btn{display:inline-block;margin:.25em .25em .25em 0}
.hero{padding:1rem 0 2rem}
.lead,.empty,.small{color:var(--shop-muted)}.small{font-size:.875rem}
.notice{border:1px solid var(--shop-accent);padding:.75rem;border-radius:var(--shop-radius);margin-bottom:1em}
.error{color:var(--shop-danger);display:block;font-size:.875rem}
.field{margin:0 0 var(--gap)}
.field label{display:block}
.chips,.trust,.footer-links{list-style:none;margin:0 0 1.5em;padding:0;display:flex;flex-wrap:wrap;gap:.5rem 1rem}
.chips li,.trust li,.footer-links li{padding:0}
.chips a{display:inline-block;padding:.4em 1.1em;border:1px solid var(--shop-line);border-radius:999px}
.opt{display:block}
.hp{position:absolute;left:-9999px}
.inline{display:inline}
.lines{list-style:none;padding:0}
.lines li{background:var(--shop-card);border:1px solid var(--shop-line);border-radius:var(--shop-radius);padding:.75rem;margin-bottom:.5rem}
.totals{display:grid;grid-template-columns:1fr auto;max-width:20rem}.totals dd{margin:0;text-align:right}
.stepper{list-style:none;display:flex;flex-wrap:wrap;gap:.5rem;padding:0}
.stepper li{padding:.25rem .75rem;border:1px solid var(--shop-line);border-radius:999px;color:var(--shop-muted)}
.stepper li.done{border-color:var(--shop-accent);color:var(--shop-accent)}
.stepper li.current{background:var(--shop-accent);color:#fff;border-color:var(--shop-accent)}
.pager{display:flex;gap:.5rem;margin:var(--gap) 0}
.shop-footer{padding:2em 0;color:var(--shop-muted);border-top:1px solid var(--shop-line)}
.shop-footer .inner{padding:0 2em}
/* Order chat (templates/pages/order.php). Colours come from the --shop-* variables above so a theme swap restyles it. */
:root{--chat-mine:rgba(91,155,213,.18);--chat-theirs:var(--shop-card)}
.chat{margin-top:2em}
.chat-log{list-style:none;padding:0;margin:0 0 1em;display:flex;flex-direction:column;gap:.5rem}
.chat-msg{max-width:42rem;padding:.6rem .8rem;border:1px solid var(--shop-line);border-radius:var(--shop-radius);background:var(--chat-theirs)}
.chat-msg--customer{align-self:flex-end;background:var(--chat-mine);border-color:var(--shop-accent)}
.chat-meta{margin-bottom:.25rem}
.chat-body{white-space:normal;overflow-wrap:anywhere}
.chat-form textarea{width:100%}
/* Order page: customer-visible job photos (Tracker ON) */
.order-photos { margin: 1.5em 0; }
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10em, 1fr)); gap: .75em; }
.photo-grid li { margin: 0; padding: 0; }
.photo-grid a { display: block; border-radius: var(--shop-radius, 6px); overflow: hidden; border: 1px solid var(--shop-border, rgba(0,0,0,.15)); }
.photo-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
/* Info pages (info.php) */
.info-page h2 { margin-top: 1.5em; }
.info-links { padding-left: 1.2em; }
.info-links li { margin: .4em 0; }
.info-slot { margin-top: 2em; padding: 1em; border: 1px dashed var(--shop-border, rgba(255,255,255,.25)); border-radius: var(--shop-radius, 6px); }

/* Product page + cart (2026-11-28). Number inputs were unstyled by the theme (white text on a white box). */
input[type="number"]{-moz-appearance:textfield;appearance:textfield;background:rgba(255,255,255,.06);border:solid 2px rgba(255,255,255,.2);border-radius:5px;color:inherit;height:2.75em;padding:0 .5em;font:inherit;text-align:center;outline:0}
input[type="number"]:focus{border-color:var(--shop-accent)}
input[type="number"]::-webkit-outer-spin-button,input[type="number"]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.qty-stepper{display:inline-flex;align-items:stretch;gap:0}
.qty-stepper .qty-input{width:4.5em;border-radius:0;border-left:0;border-right:0}
.qty-btn{min-width:2.75em;height:2.75em;padding:0;line-height:2.5em;font-size:1.25em;background:rgba(255,255,255,.08);border:solid 2px rgba(255,255,255,.2);color:inherit;cursor:pointer;box-shadow:none}
.qty-btn:first-child{border-radius:5px 0 0 5px}.qty-btn:last-child{border-radius:0 5px 5px 0}
.qty-btn:hover{background:var(--shop-accent);border-color:var(--shop-accent);color:#fff}
.product-page{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:2em;align-items:start}
.product-media{position:relative;min-width:0;overflow:hidden}
.product-main{display:block;border-bottom:0;cursor:zoom-in}
.product-main img,#product-main-img{width:100%;max-height:34em;object-fit:contain;background:rgba(0,0,0,.25);border:1px solid var(--shop-line);border-radius:var(--shop-radius);display:block}
.product-thumbs{display:flex;flex-wrap:wrap;gap:.5em;margin-top:.75em}
.product-thumb{width:4.5em;height:4.5em;padding:0;border:2px solid var(--shop-line);border-radius:var(--shop-radius);overflow:hidden;background:none;cursor:pointer;box-shadow:none}
.product-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.product-thumb.is-active{border-color:var(--shop-accent)}
.product-noimg{aspect-ratio:4/3;display:flex;align-items:center;justify-content:center;border:1px dashed var(--shop-line);border-radius:var(--shop-radius);color:var(--shop-muted);padding:1em;text-align:center}
.product-info h1{margin:0 0 .25em;font-size:1.9em;line-height:1.2}
.product-sku{margin:0 0 .5em;letter-spacing:.05em}
.product-price{font-size:1.6em;margin:0 0 .5em;color:var(--shop-text)}
.product-specs{display:grid;grid-template-columns:auto 1fr;gap:.35em 1.25em;margin:1em 0 1.5em;padding:1em;background:var(--shop-card);border:1px solid var(--shop-line);border-radius:var(--shop-radius)}
.product-specs dt{color:var(--shop-muted);font-weight:600;margin:0}.product-specs dd{margin:0;overflow-wrap:anywhere}
.buy fieldset{margin:0 0 1em;padding:.75em 1em;border:1px solid var(--shop-line);border-radius:var(--shop-radius)}
.buy-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:1em;margin-top:.5em}
.buy-row .qty-field{margin:0}
.buy-row .buy-btn{margin:0;height:2.75em;line-height:2.75em;padding:0 2em}
.product-about{grid-column:1 / -1;border-top:1px solid var(--shop-line);padding-top:1.5em}
.product-about .prose{max-width:48em}
.cart-layout{display:grid;grid-template-columns:minmax(0,1fr) 18em;gap:1.5em;align-items:start}
.cart-line{display:grid;grid-template-columns:5.5em minmax(0,1fr) auto;gap:1em;align-items:start}
.cart-thumb{display:block;width:5.5em;height:5.5em;border-radius:var(--shop-radius);overflow:hidden;background:rgba(0,0,0,.25);border-bottom:0}
.cart-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.cart-title{border-bottom:0}
.cart-qty{display:flex;flex-wrap:wrap;align-items:center;gap:.5em;margin-top:.6em}
.cart-qty label{margin:0}
.cart-qty .btn{margin:0}
.cart-price{font-size:1.15em;white-space:nowrap}
.cart-summary{background:var(--shop-card);border:1px solid var(--shop-line);border-radius:var(--shop-radius);padding:1em}
.cart-summary .totals{max-width:none;gap:.35em 1em;margin:0 0 1em}
.cart-summary .grand{font-weight:700;font-size:1.15em;border-top:1px solid var(--shop-line);padding-top:.4em;margin-top:.2em}
.cart-summary .btn.fit{display:block;width:100%;text-align:center;margin:0 0 .5em}
.cart-clear{margin-top:.5em;text-align:center}
@media (max-width:820px){
  .product-page{grid-template-columns:1fr}
  .cart-layout{grid-template-columns:1fr}.cart-summary{position:static}
  .cart-line{grid-template-columns:4em minmax(0,1fr)}.cart-thumb{width:4em;height:4em}.cart-price{grid-column:2}
}
/* In-page photo viewer (product gallery) */
.shop-lightbox{position:fixed;inset:0;z-index:10050;background:var(--shop-bg);display:flex;align-items:center;justify-content:center;padding:3.5em 4em}
.shop-lightbox[hidden]{display:none}
.shop-lightbox img{max-width:100%;max-height:100%;object-fit:contain;border-radius:var(--shop-radius);box-shadow:0 0 2em rgba(0,0,0,.6)}
.shop-lightbox .lb-btn{position:absolute;background:var(--shop-surface);border:2px solid var(--shop-line);color:var(--shop-text);width:2.75em;height:2.75em;line-height:2.4em;padding:0;font-size:1.5em;border-radius:50%;cursor:pointer;box-shadow:none}
.shop-lightbox .lb-btn:hover{background:var(--shop-accent);border-color:var(--shop-accent)}
.shop-lightbox .lb-close{top:.5em;right:.5em}
.shop-lightbox .lb-prev{left:.5em;top:50%;transform:translateY(-50%)}
.shop-lightbox .lb-next{right:.5em;top:50%;transform:translateY(-50%)}
.shop-lightbox .lb-count{position:absolute;bottom:.75em;left:0;right:0;text-align:center;color:var(--shop-muted)}
@media (max-width:820px){.shop-lightbox{padding:3.5em .5em}.shop-lightbox .lb-prev,.shop-lightbox .lb-next{top:auto;bottom:.4em;transform:none}}
/* Inputs the theme misses: no type attribute (defaults to text), search, url. Same look as theme text inputs. */
input:not([type]),input[type="search"],input[type="url"]{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:var(--shop-surface);border:solid 2px var(--shop-line);border-radius:5px;color:inherit;display:block;width:100%;height:2.75em;padding:0 1em;font:inherit;outline:0;text-decoration:none}
input:not([type]):focus,input[type="search"]:focus,input[type="url"]:focus{border-color:var(--shop-accent)}
input[type="file"]{color:inherit}
/* Product card v2 (2026-12-04): equal-height cards, square photo, whole card clickable via .pc2-link::after */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(15rem,1fr))}
@media (max-width:640px){.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}}
.card.pc2{position:relative;display:flex;flex-direction:column;padding:0;overflow:hidden;transition:transform .15s,box-shadow .15s}
.card.pc2:hover{transform:translateY(-2px);box-shadow:0 6px 18px rgba(0,0,0,.35)}
.pc2-img{position:relative;aspect-ratio:1/1;background:var(--shop-well);overflow:hidden}
.pc2-img img{width:100%;height:100%;object-fit:cover;display:block;border-radius:0;max-width:none}
.pc2-badge{position:absolute;left:.5rem;top:.5rem;padding:.2rem .6rem;border-radius:999px;font-size:.8rem;font-weight:600;background:var(--shop-bg);color:var(--shop-text)}
.pc2-badge.pc2-one{background:var(--shop-gold);color:var(--shop-accent-ink)}
.pc2-badge.pc2-mto{background:var(--shop-secondary);color:#fff}
.pc2-body{display:flex;flex-direction:column;flex:1;padding:.75rem .85rem 1rem;gap:.35rem}
.card.pc2 h3.pc2-title{margin:0;font-size:1.05rem;line-height:1.3;text-transform:none;letter-spacing:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.pc2-link{color:inherit;text-decoration:none}
.pc2-link::after{content:"";position:absolute;inset:0;z-index:1}
.pc2-detail{margin:0;opacity:.75;font-size:.9rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pc2-price{margin:.15rem 0 0;font-size:1.15rem;font-weight:700}
/* View button = nav-pill OUTLINE style (dark fill, orange border, white text; fills orange on hover).
   Lives in the GLOBAL shop.css so it applies to Shop cards AND Featured cards (shop-home), which both use .pc2-view. */
.card.pc2 .pc2-view{background:var(--shop-surface);border:1px solid var(--shop-accent);color:#fff;border-radius:999px;font-weight:600}
.card.pc2:hover .pc2-view,.card.pc2 .pc2-view:hover{background:var(--shop-accent-hi);border-color:var(--shop-accent-hi);color:#fff}
.pc2-view{margin-top:auto;display:block;text-align:center;min-height:44px;line-height:44px;padding:0 1rem;font-size:1rem;border-radius:999px;background:var(--shop-surface);color:#fff;font-weight:600}
.card.pc2 .quick-add{position:relative;z-index:2;margin:0}
/* Shared OUTLINE button/pill style (matches nav pill + card View): dark surface fill, orange
   border, white text; fills terracotta on hover. Applied to the product "Ask about this piece"
   button and the tooling "Router Parts and Accessories" link so they match the View buttons. */
.buy-static .btn,.info-links .link-styled{display:inline-block;background:var(--shop-surface);border:1px solid var(--shop-accent);color:#fff;border-radius:999px;padding:.45em 1.1em;font-size:.92em;text-decoration:none;transition:background .18s ease,border-color .18s ease,color .18s ease}
.buy-static .btn:hover,.info-links .link-styled:hover{background:var(--shop-accent-hi);border-color:var(--shop-accent-hi);color:#fff}
/* Flag-calc units dropdown: same outline pill look (orange border, dark fill, white text). */
#fc-units{background:var(--shop-surface);border:1px solid var(--shop-accent);color:#fff;border-radius:999px;padding:0 1em;height:2.5em}
#fc-units:focus{border-color:var(--shop-accent-hi)}
#fc-units option{background:var(--shop-bg);color:var(--shop-text)}
/* 2026-12-04 product page stock badge */
.product-badge { display: inline-block; margin: .25rem 0 .5rem; padding: .2rem .6rem; border-radius: 999px; font-size: .85rem; font-weight: 600; background: var(--shop-surface); color: var(--shop-text); }
.product-badge.pb-one { background: var(--shop-accent-soft); color: var(--shop-text); }
.product-badge.pb-qty { background: var(--shop-secondary); color: #fff; }
/* 2026-12-04 card lead-time line */
.pc2-lead{margin:0;font-size:.85rem;opacity:.8}
