/* Shop templates — five flavours, three palettes each (Admin → Appearance → Shop template). Loaded after shop.css on
   every shop page; the <html> tag carries data-template and data-palette. Each template keeps the shop's structure
   (the parts, filters, cart and checkout are untouched) and changes the tokens, type, shapes and header. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Barlow+Condensed:wght@600;700&family=Barlow:wght@400;500;600&family=Nunito+Sans:wght@400;600;700;800&display=swap');

/* =============================================================== Classic ==== */
/* The trade store look (shop.css as it is). Palettes only move the colours. */
html[data-template="classic"][data-palette="forest"] { --blue: #1f4d3a; --blue-dark: #163a2b; --blue-tint: #e6efea; --orange: #d9a441; --orange-dark: #c7912f; --on-orange: #1d2433; --page: #f6f7f4; }
html[data-template="classic"][data-palette="slate"] { --blue: #2f3e4e; --blue-dark: #222d39; --blue-tint: #e9edf2; --orange: #ff6b4a; --orange-dark: #ef5a39; --on-orange: #1d2433; --page: #f5f6f8; }

/* ============================================================ Storefront ==== */
/* A coloured header band holding the wordmark, search and icons; rounded cards with soft shadows; pill buttons. */
html[data-template="storefront"] { --radius: 12px; --heading: "Nunito Sans", "Open Sans", sans-serif; --body: "Nunito Sans", "Open Sans", sans-serif; --line: #e5e8ef; --muted: #5f6b7a; }
html[data-template="storefront"][data-palette="midnight"] { --blue: #101828; --blue-dark: #0a0f1c; --blue-tint: #eef0f6; --orange: #b7f13c; --orange-dark: #a3de2a; --on-orange: #101828; --page: #f4f6fb; --hdr: #101828; --hdr-ink: #ffffff; --link: #1d4ed8; }
html[data-template="storefront"][data-palette="ocean"] { --blue: #0e4c73; --blue-dark: #0a3a58; --blue-tint: #e6f0f7; --orange: #ff7a59; --orange-dark: #f26a48; --on-orange: #1d2433; --page: #f3f8fb; --hdr: #0e4c73; --hdr-ink: #ffffff; --link: #0e4c73; }
html[data-template="storefront"][data-palette="ember"] { --blue: #7a1f1f; --blue-dark: #5e1616; --blue-tint: #f7ecea; --orange: #f4b942; --orange-dark: #e6a930; --on-orange: #2a1a00; --page: #fbf7f2; --hdr: #7a1f1f; --hdr-ink: #ffffff; --link: #7a1f1f; }
html[data-template="storefront"] body { font-size: 15px; }
html[data-template="storefront"] .site-header { background: var(--hdr); box-shadow: 0 2px 12px rgba(0, 0, 0, .12); }
html[data-template="storefront"] .utility { background: rgba(0, 0, 0, .22); }
html[data-template="storefront"] .header-main { padding-top: 14px; padding-bottom: 14px; }
html[data-template="storefront"] .wm-text strong { color: var(--hdr-ink); font-size: 1.1rem; }
html[data-template="storefront"] .wm-text small { color: rgba(255, 255, 255, .7); }
html[data-template="storefront"] .search { max-width: 620px; }
html[data-template="storefront"] .search input { background: #fff; border-radius: 999px 0 0 999px; padding-left: 18px; }
html[data-template="storefront"] .search button { border-radius: 0 999px 999px 0; width: 52px; }
html[data-template="storefront"] .site-header .icon-btn { color: var(--hdr-ink); }
html[data-template="storefront"] .site-header .icon-btn:hover { color: var(--orange); }
html[data-template="storefront"] .basket-count { background: var(--orange); color: var(--on-orange); }
html[data-template="storefront"] .main-nav { border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 6px; padding-bottom: 8px; }
html[data-template="storefront"] .nav-links a { color: rgba(255, 255, 255, .85); border-right: 0; padding: 6px 14px; border-radius: 999px; }
html[data-template="storefront"] .nav-links a:first-child { padding-left: 14px; }
html[data-template="storefront"] .nav-links a:hover, html[data-template="storefront"] .nav-links a[aria-current="page"] { color: var(--hdr); background: #fff; }
html[data-template="storefront"] .crumbs a { color: var(--link); }
html[data-template="storefront"] .nav-box, html[data-template="storefront"] .cat-box, html[data-template="storefront"] .card, html[data-template="storefront"] .tabpanel, html[data-template="storefront"] .gallery, html[data-template="storefront"] .empty { border-radius: var(--radius); border-color: var(--line); box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 18px rgba(16, 24, 40, .05); }
html[data-template="storefront"] .card .img { border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
html[data-template="storefront"] .card:hover { box-shadow: 0 10px 28px rgba(16, 24, 40, .12); transform: translateY(-2px); }
html[data-template="storefront"] .card { transition: box-shadow .15s, transform .15s; overflow: hidden; }
html[data-template="storefront"] .card form.add { padding: 0 12px 12px; gap: 8px; }
html[data-template="storefront"] .card form.add .qty { border: 1px solid var(--line); border-radius: 999px; width: 58px; }
html[data-template="storefront"] .btn-orange, html[data-template="storefront"] .btn-blue, html[data-template="storefront"] .btn-line, html[data-template="storefront"] .drawer .btn, html[data-template="storefront"] .more .btn-line { border-radius: 999px; text-transform: none; letter-spacing: 0; font-size: .9rem; font-weight: 700; }
html[data-template="storefront"] .pinfo .buy .btn-orange { border-radius: 999px; }
html[data-template="storefront"] .pinfo .buy .qty { border-radius: 999px 0 0 999px; }
html[data-template="storefront"] input, html[data-template="storefront"] select, html[data-template="storefront"] textarea { border-radius: 8px; }
html[data-template="storefront"] .nav-level select, html[data-template="storefront"] .toolbar select { border-radius: 8px; }
html[data-template="storefront"] .guest-bar { border-radius: var(--radius); border-left: 0; border: 1px solid var(--line); background: #fff; }
html[data-template="storefront"] .tabbar { gap: 6px; }
html[data-template="storefront"] .tabbar button { border-radius: 999px; background: #fff; border: 1px solid var(--line); }
html[data-template="storefront"] .tabbar button[aria-selected="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
html[data-template="storefront"] .cats a, html[data-template="storefront"] .cats button { color: var(--text); }
html[data-template="storefront"] .cats a:hover, html[data-template="storefront"] .cats button:hover { color: var(--blue); }
html[data-template="storefront"] .ctag, html[data-template="storefront"] .seg { border-radius: 999px; }
html[data-template="storefront"] .drawer input, html[data-template="storefront"] .drawer textarea, html[data-template="storefront"] .drawer select { border-radius: 8px; }
html[data-template="storefront"] .site-footer { background: var(--hdr); }

/* Storefront footer: soft band, rounded badges, social icons in bubbles */
html[data-template="storefront"] .site-footer h2 { font-family: var(--heading); font-size: 1.02rem; letter-spacing: 0; }
html[data-template="storefront"] .site-footer { border-radius: 22px 22px 0 0; margin-top: 48px; }
html[data-template="storefront"] .footer-base { background: rgba(0, 0, 0, .22); }
html[data-template="storefront"] .pay { border-radius: 8px; height: 28px; }
html[data-template="storefront"] .f-social svg { width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: rgba(255, 255, 255, .14); box-sizing: border-box; }
html[data-template="storefront"] .f-links a, html[data-template="storefront"] .f-contact a { opacity: .9; }
html[data-template="storefront"] .f-links a:hover { opacity: 1; color: var(--orange); text-decoration: none; }

/* ============================================================ Industrial ==== */
/* Dark header, hard edges, condensed uppercase headings, one high-visibility accent — the parts-counter look. */
html[data-template="industrial"] { --radius: 0; --heading: "Barlow Condensed", "Source Sans 3", sans-serif; --body: "Barlow", "Open Sans", sans-serif; --line: #d9d9d9; --muted: #5c5c5c; --text: #1f1f1f; }
html[data-template="industrial"][data-palette="carbon"] { --blue: #1c1f24; --blue-dark: #0f1114; --blue-tint: #ececec; --orange: #ffd400; --orange-dark: #f0c800; --on-orange: #1c1f24; --page: #efefef; --hdr: #1c1f24; --accent: #ffd400; }
html[data-template="industrial"][data-palette="steel"] { --blue: #2b3a4a; --blue-dark: #1d2833; --blue-tint: #e8ecf0; --orange: #ff8a1f; --orange-dark: #ef7a0f; --on-orange: #1d2433; --page: #eef1f4; --hdr: #2b3a4a; --accent: #ff8a1f; }
html[data-template="industrial"][data-palette="graphite"] { --blue: #262626; --blue-dark: #111111; --blue-tint: #ebebeb; --orange: #e3262d; --orange-dark: #c91f26; --on-orange: #ffffff; --page: #f2f2f2; --hdr: #262626; --accent: #e3262d; }
html[data-template="industrial"] body { font-size: 15.5px; }
html[data-template="industrial"] h1, html[data-template="industrial"] h2, html[data-template="industrial"] h3, html[data-template="industrial"] .page-title, html[data-template="industrial"] .drawer-head h2, html[data-template="industrial"] .nav-box h3, html[data-template="industrial"] .cat-box h3 { text-transform: uppercase; letter-spacing: .03em; }
html[data-template="industrial"] h1, html[data-template="industrial"] .page-title { font-size: 2.3rem; }
html[data-template="industrial"] .site-header { background: var(--hdr); box-shadow: inset 0 -4px 0 var(--accent); }
html[data-template="industrial"] .utility { background: #000; }
html[data-template="industrial"] .wm-text strong { color: #fff; font-family: var(--heading); font-size: 1.35rem; text-transform: uppercase; letter-spacing: .04em; }
html[data-template="industrial"] .wm-text small { color: var(--accent); }
html[data-template="industrial"] .search input { background: #fff; border-radius: 0; }
html[data-template="industrial"] .search button { background: var(--accent); color: var(--on-orange); }
html[data-template="industrial"] .site-header .icon-btn { color: #fff; }
html[data-template="industrial"] .site-header .icon-btn:hover { color: var(--accent); }
html[data-template="industrial"] .basket-count { background: var(--accent); color: var(--on-orange); }
html[data-template="industrial"] .main-nav { border-top: 1px solid rgba(255, 255, 255, .12); background: transparent; }
html[data-template="industrial"] .nav-links a { color: #fff; font-family: var(--heading); text-transform: uppercase; letter-spacing: .06em; font-size: 1.05rem; border-right: 1px solid rgba(255, 255, 255, .18); padding: 4px 16px; }
html[data-template="industrial"] .nav-links a:hover, html[data-template="industrial"] .nav-links a[aria-current="page"] { color: var(--accent); }
html[data-template="industrial"] .nav-box, html[data-template="industrial"] .cat-box, html[data-template="industrial"] .card, html[data-template="industrial"] .tabpanel, html[data-template="industrial"] .gallery { border: 1px solid #cfcfcf; }
html[data-template="industrial"] .card { border-top: 3px solid var(--hdr); }
html[data-template="industrial"] .card:hover { border-top-color: var(--accent); box-shadow: 0 6px 16px rgba(0, 0, 0, .12); }
html[data-template="industrial"] .card .title { font-family: var(--heading); font-size: 1.15rem; text-transform: uppercase; letter-spacing: .02em; font-weight: 700; }
html[data-template="industrial"] .card .price, html[data-template="industrial"] .pinfo .big { font-family: var(--heading); color: var(--text-strong); }
html[data-template="industrial"] .btn-orange, html[data-template="industrial"] .drawer .btn.primary { background: var(--accent); color: var(--on-orange); font-family: var(--heading); font-size: 1rem; letter-spacing: .06em; }
html[data-template="industrial"] .btn-orange:hover, html[data-template="industrial"] .drawer .btn.primary:hover { background: var(--orange-dark); }
html[data-template="industrial"] .btn-blue { font-family: var(--heading); font-size: 1rem; letter-spacing: .06em; }
html[data-template="industrial"] .nav-level { color: var(--text); }
html[data-template="industrial"] .nav-level select, html[data-template="industrial"] input, html[data-template="industrial"] select, html[data-template="industrial"] textarea { border: 1px solid #b9b9b9; border-radius: 0; }
html[data-template="industrial"] .cats a, html[data-template="industrial"] .cats button { color: var(--text); font-weight: 600; }
html[data-template="industrial"] .guest-bar { background: #fff; border-left: 4px solid var(--accent); }
html[data-template="industrial"] .tabbar button[aria-selected="true"] { box-shadow: inset 0 -3px 0 var(--accent); }
html[data-template="industrial"] .crumbs a { color: var(--text); }
html[data-template="industrial"] .cats a::after, html[data-template="industrial"] .cats button::after { color: var(--accent); }
html[data-template="industrial"] .site-footer { background: var(--hdr); box-shadow: inset 0 4px 0 var(--accent); }

/* Industrial footer: condensed uppercase headings with an accent bar, black base strip */
html[data-template="industrial"] .site-footer h2 { font-family: var(--heading); text-transform: uppercase; letter-spacing: .08em; font-size: 1.1rem; padding-left: 10px; border-left: 4px solid var(--accent); }
html[data-template="industrial"] .f-links a:hover, html[data-template="industrial"] .f-contact a:hover, html[data-template="industrial"] .f-social a:hover { color: var(--accent); text-decoration: none; }
html[data-template="industrial"] .f-contact svg, html[data-template="industrial"] .f-social svg { fill: var(--accent); }
html[data-template="industrial"] .pay { border-radius: 0; }
html[data-template="industrial"] .footer-base { background: #000; text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; }
html[data-template="industrial"] .stock.in { color: #1f7a3d; }

/* =============================================================== Minimal ==== */
/* White space, hairlines, large type, thin dark buttons; the picture is the card. */
html[data-template="minimal"] { --radius: 0; --heading: "Inter", "Open Sans", sans-serif; --body: "Inter", "Open Sans", sans-serif; --line: #e7e7e7; --muted: #5c5c5c; --text: #222222; --page-max: 1440px; }
html[data-template="minimal"][data-palette="mono"] { --blue: #111111; --blue-dark: #000000; --blue-tint: #f2f2f2; --orange: #111111; --orange-dark: #333333; --on-orange: #ffffff; --page: #ffffff; --surface: #ffffff; }
html[data-template="minimal"][data-palette="sage"] { --blue: #3b5d50; --blue-dark: #2b463c; --blue-tint: #eef3f0; --orange: #3b5d50; --orange-dark: #2b463c; --on-orange: #ffffff; --page: #fbfcfa; --surface: #ffffff; }
html[data-template="minimal"][data-palette="sand"] { --blue: #5b4636; --blue-dark: #3f3025; --blue-tint: #f3ede6; --orange: #a0583b; --orange-dark: #8a4a31; --on-orange: #ffffff; --page: #fcfaf6; --surface: #ffffff; }
html[data-template="minimal"] body { font-size: 15px; line-height: 1.6; }
html[data-template="minimal"] h1, html[data-template="minimal"] .page-title { font-weight: 600; letter-spacing: -.02em; font-size: 2.1rem; }
html[data-template="minimal"] h2, html[data-template="minimal"] h3 { font-weight: 600; letter-spacing: -.01em; }
html[data-template="minimal"] .utility { display: none; }
html[data-template="minimal"] .site-header { box-shadow: none; border-bottom: 1px solid var(--line); background: var(--page); }
html[data-template="minimal"] .header-main { padding-top: 22px; padding-bottom: 18px; gap: 40px; }
html[data-template="minimal"] .wm-text strong { font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
html[data-template="minimal"] .wm-text small { letter-spacing: .14em; font-size: .6rem; }
html[data-template="minimal"] .search input { background: transparent; border: 0; border-bottom: 1px solid var(--text); border-radius: 0; padding-left: 0; font-size: .95rem; }
html[data-template="minimal"] .search input:focus { outline: 0; border-bottom-width: 2px; }
html[data-template="minimal"] .search button { background: transparent; color: var(--text); width: 40px; }
html[data-template="minimal"] .search button:hover { background: transparent; color: var(--blue); }
html[data-template="minimal"] .suggest { border-radius: 0; box-shadow: 0 16px 40px rgba(0, 0, 0, .12); }
html[data-template="minimal"] .icon-btn { color: var(--text); font-size: 1.45rem; }
html[data-template="minimal"] .basket-count { background: var(--text); color: #fff; }
html[data-template="minimal"] .main-nav { border-top: 0; padding-top: 0; padding-bottom: 14px; }
html[data-template="minimal"] .nav-links a { border-right: 0; padding: 2px 22px 2px 0; font-size: .92rem; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
html[data-template="minimal"] .nav-links a:hover, html[data-template="minimal"] .nav-links a[aria-current="page"] { color: var(--text); font-weight: 600; }
html[data-template="minimal"] .crumbs { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
html[data-template="minimal"] .shop { grid-template-columns: 230px 1fr; gap: 40px; }
html[data-template="minimal"] .nav-box, html[data-template="minimal"] .cat-box { border: 0; padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); background: transparent; }
html[data-template="minimal"] .nav-box h3, html[data-template="minimal"] .cat-box h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text); margin-bottom: 12px; }
html[data-template="minimal"] .nav-level { color: var(--muted); font-size: .7rem; letter-spacing: .1em; }
html[data-template="minimal"] .nav-level select, html[data-template="minimal"] select, html[data-template="minimal"] input, html[data-template="minimal"] textarea { border: 1px solid var(--line); border-radius: 0; background: #fff; }
html[data-template="minimal"] .cats li + li { border-top: 0; }
html[data-template="minimal"] .cats a, html[data-template="minimal"] .cats button { padding: 5px 0; color: var(--text); font-size: .95rem; }
html[data-template="minimal"] .cats a::after, html[data-template="minimal"] .cats button::after { content: none; }
html[data-template="minimal"] .guest-bar { background: transparent; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; color: var(--muted); font-size: .85rem; }
html[data-template="minimal"] .grid { gap: 36px 24px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
html[data-template="minimal"] .card { border: 0; background: transparent; }
html[data-template="minimal"] .card:hover { box-shadow: none; }
html[data-template="minimal"] .card .img { border: 1px solid var(--line); }
html[data-template="minimal"] .card:hover .img { border-color: var(--text); }
html[data-template="minimal"] .card .body { padding: 12px 0 8px; }
html[data-template="minimal"] .card .title { font-weight: 500; font-size: 1rem; }
html[data-template="minimal"] .card .code { color: var(--muted); font-size: .78rem; }
html[data-template="minimal"] .card .price { font-weight: 600; color: var(--text); font-size: 1.05rem; }
html[data-template="minimal"] .card form.add .qty { border: 1px solid var(--line); border-right: 0; }
html[data-template="minimal"] .btn-orange, html[data-template="minimal"] .btn-blue, html[data-template="minimal"] .drawer .btn.primary { background: var(--text); color: #fff; letter-spacing: .1em; font-size: .75rem; font-weight: 600; }
html[data-template="minimal"] .btn-orange:hover, html[data-template="minimal"] .btn-blue:hover, html[data-template="minimal"] .drawer .btn.primary:hover { background: var(--blue); }
html[data-template="minimal"][data-palette="sand"] .btn-orange, html[data-template="minimal"][data-palette="sand"] .drawer .btn.primary { background: var(--orange); }
html[data-template="minimal"] .btn-line { box-shadow: inset 0 0 0 1px var(--text); color: var(--text); letter-spacing: .1em; font-size: .75rem; }
html[data-template="minimal"] .toolbar select { border: 0; border-bottom: 1px solid var(--text); background: transparent; }
html[data-template="minimal"] .product { gap: 48px; }
html[data-template="minimal"] .gallery { border: 1px solid var(--line); }
html[data-template="minimal"] .pinfo h1 { font-size: 1.9rem; }
html[data-template="minimal"] .pinfo .big { color: var(--text); font-weight: 600; }
html[data-template="minimal"] .facts, html[data-template="minimal"] .facts div { border-color: var(--line); }
html[data-template="minimal"] .facts dd { font-weight: 500; }
html[data-template="minimal"] .tabbar { border-bottom: 1px solid var(--line); gap: 24px; }
html[data-template="minimal"] .tabbar button { padding: 10px 0; background: transparent; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; }
html[data-template="minimal"] .tabbar button[aria-selected="true"] { background: transparent; box-shadow: inset 0 -2px 0 var(--text); color: var(--text); }
html[data-template="minimal"] .tabpanel { background: transparent; padding: 20px 0; }
html[data-template="minimal"] .drawer { border-left: 1px solid var(--line); box-shadow: none; }
html[data-template="minimal"] .drawer-head h2 { font-weight: 600; letter-spacing: -.01em; }
html[data-template="minimal"] .stepper { border-color: var(--line); }
html[data-template="minimal"] .site-footer { background: var(--text); }

/* Minimal footer: light, hairline above, quiet type */
html[data-template="minimal"] .site-footer { background: var(--page, #fff); color: var(--text); border-top: 1px solid var(--line); margin-top: 56px; }
html[data-template="minimal"] .site-footer h2 { color: var(--muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
html[data-template="minimal"] .site-footer a { color: var(--text); }
html[data-template="minimal"] .site-footer a:hover { color: var(--blue); }
html[data-template="minimal"] .f-contact svg, html[data-template="minimal"] .f-social svg { fill: var(--muted); }
html[data-template="minimal"] .f-contact svg [stroke] { stroke: var(--muted); }
html[data-template="minimal"] .site-footer .vat { color: var(--muted); }
html[data-template="minimal"] .pay { border: 1px solid var(--line); border-radius: 4px; }
html[data-template="minimal"] .footer-grid { padding-top: 44px; padding-bottom: 40px; }
html[data-template="minimal"] .footer-base { background: transparent; color: var(--muted); border-top: 1px solid var(--line); }
html[data-template="minimal"] .ph { background-image: none; }

/* =========================================================== Marketplace ==== */
/* Dense and compact: slim dark header, six small cards across, strong call-to-action, light grey page. */
html[data-template="marketplace"] { --radius: 4px; --heading: "Inter", "Open Sans", sans-serif; --body: "Inter", "Open Sans", sans-serif; --line: #ddd; --muted: #565959; --text: #0f1111; --page-max: 1600px; --gutter: clamp(12px, 1.5vw, 24px); }
html[data-template="marketplace"][data-palette="sunrise"] { --blue: #131921; --blue-dark: #0b0f14; --blue-tint: #eef2f6; --orange: #ff9900; --orange-dark: #f08804; --on-orange: #0f1111; --page: #eaeded; --hdr: #131921; --hdr2: #232f3e; --link: #007185; --price: #b12704; }
html[data-template="marketplace"][data-palette="teal"] { --blue: #0b5a5a; --blue-dark: #063f3f; --blue-tint: #e6f1f1; --orange: #ffb703; --orange-dark: #f0a800; --on-orange: #0f1111; --page: #eef5f5; --hdr: #0b5a5a; --hdr2: #084848; --link: #0b5a5a; --price: #8a2d0b; }
html[data-template="marketplace"][data-palette="plum"] { --blue: #3f1d4f; --blue-dark: #2a1235; --blue-tint: #f0e9f3; --orange: #f2c14e; --orange-dark: #e4b03a; --on-orange: #2a1235; --page: #f4f0f6; --hdr: #3f1d4f; --hdr2: #532868; --link: #5b2d73; --price: #8a1d3a; }
html[data-template="marketplace"] body { font-size: 14px; }
html[data-template="marketplace"] .utility { background: var(--hdr2); font-size: .75rem; }
html[data-template="marketplace"] .site-header { background: var(--hdr); box-shadow: none; }
html[data-template="marketplace"] .header-main { padding-top: 8px; padding-bottom: 8px; gap: 18px; }
html[data-template="marketplace"] .wm-text strong { color: #fff; font-size: 1.05rem; }
html[data-template="marketplace"] .wm-text small { color: rgba(255, 255, 255, .7); }
html[data-template="marketplace"] .search { max-width: 760px; }
html[data-template="marketplace"] .search input { background: #fff; border-radius: 4px 0 0 4px; padding: 10px 12px; font-size: .95rem; }
html[data-template="marketplace"] .search button { background: var(--orange); color: var(--on-orange); border-radius: 0 4px 4px 0; width: 46px; }
html[data-template="marketplace"] .site-header .icon-btn { color: #fff; font-size: 1.5rem; }
html[data-template="marketplace"] .site-header .icon-btn:hover { color: var(--orange); }
html[data-template="marketplace"] .basket-count { background: var(--orange); color: var(--on-orange); }
html[data-template="marketplace"] .main-nav { background: var(--hdr2); border-top: 0; padding: 0; max-width: none; }
html[data-template="marketplace"] .nav-links { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); width: 100%; }
html[data-template="marketplace"] .nav-links a { color: #fff; border-right: 0; padding: 8px 12px; font-size: .9rem; }
html[data-template="marketplace"] .nav-links a:first-child { padding-left: 0; }
html[data-template="marketplace"] .nav-links a:hover, html[data-template="marketplace"] .nav-links a[aria-current="page"] { color: var(--orange); }
html[data-template="marketplace"] .crumbs a { color: var(--link); }
html[data-template="marketplace"] .shop { grid-template-columns: 220px 1fr; gap: 16px; }
html[data-template="marketplace"] .nav-box, html[data-template="marketplace"] .cat-box { padding: 12px; margin-bottom: 10px; border-color: var(--line); }
html[data-template="marketplace"] .nav-box h3, html[data-template="marketplace"] .cat-box h3 { font-size: 1rem; color: var(--text); }
html[data-template="marketplace"] .cats a, html[data-template="marketplace"] .cats button { padding: 6px 2px; font-size: .88rem; color: var(--link); }
html[data-template="marketplace"] .cats li + li { border-top: 0; }
html[data-template="marketplace"] .cats a::after, html[data-template="marketplace"] .cats button::after { content: none; }
html[data-template="marketplace"] .page-title { font-size: 1.35rem; font-weight: 600; color: var(--text); }
html[data-template="marketplace"] .guest-bar { background: #fff; border-left: 0; border: 1px solid var(--line); font-size: .85rem; padding: 8px 12px; }
html[data-template="marketplace"] .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
html[data-template="marketplace"] .card { border-color: var(--line); border-radius: var(--radius); }
html[data-template="marketplace"] .card:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
html[data-template="marketplace"] .card .body { padding: 8px 10px 6px; gap: 3px; }
html[data-template="marketplace"] .card .title { font-size: .9rem; font-weight: 500; color: var(--link); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html[data-template="marketplace"] .card .fits, html[data-template="marketplace"] .card .code, html[data-template="marketplace"] .card .sub { font-size: .76rem; }
html[data-template="marketplace"] .card .price { color: var(--price); font-size: 1.1rem; }
html[data-template="marketplace"] .card .price-line .unit { font-size: .7rem; }
html[data-template="marketplace"] .card form.add { padding: 0 10px 10px; gap: 6px; }
html[data-template="marketplace"] .card form.add .qty { border: 1px solid var(--line); border-radius: 999px; width: 54px; padding: 6px 2px; font-size: .85rem; }
html[data-template="marketplace"] .btn-orange, html[data-template="marketplace"] .drawer .btn.primary { border-radius: 999px; text-transform: none; letter-spacing: 0; font-size: .82rem; font-weight: 600; padding: 8px 14px; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); }
html[data-template="marketplace"] .btn-blue, html[data-template="marketplace"] .btn-line { border-radius: 999px; text-transform: none; letter-spacing: 0; }
html[data-template="marketplace"] input, html[data-template="marketplace"] select, html[data-template="marketplace"] textarea { border-radius: 4px; }
html[data-template="marketplace"] .pinfo .big { color: var(--price); }
html[data-template="marketplace"] .pinfo .buy .btn-orange { border-radius: 999px; }
html[data-template="marketplace"] .pinfo .buy .qty { border-radius: 999px 0 0 999px; }
html[data-template="marketplace"] .tabbar button { font-size: .88rem; }
html[data-template="marketplace"] .tabbar button[aria-selected="true"] { box-shadow: inset 0 -3px 0 var(--orange); }
html[data-template="marketplace"] .site-footer { background: var(--hdr2); }

/* Marketplace footer: "Back to top" bar, dense columns, darker base */
html[data-template="marketplace"] .f-top { display: block; text-align: center; padding: 13px 16px; background: color-mix(in srgb, var(--hdr2) 82%, #fff); color: #fff; font-size: .85rem; font-weight: 600; }
html[data-template="marketplace"] .f-top:hover { text-decoration: none; filter: brightness(1.08); }
html[data-template="marketplace"] .site-footer { margin-top: 32px; }
html[data-template="marketplace"] .site-footer h2 { font-family: var(--body); font-weight: 800; font-size: .98rem; }
html[data-template="marketplace"] .f-links li, html[data-template="marketplace"] .f-contact li { font-size: .85rem; margin-bottom: 8px; }
html[data-template="marketplace"] .f-links a, html[data-template="marketplace"] .f-contact a, html[data-template="marketplace"] .f-social a { color: #dddddd; }
html[data-template="marketplace"] .f-links a:hover { color: #fff; }
html[data-template="marketplace"] .pay { border-radius: 4px; }
html[data-template="marketplace"] .footer-base { background: color-mix(in srgb, var(--hdr2) 70%, #000); text-align: center; }
html[data-template="marketplace"] .footer-base .wrap { justify-content: center; }
html[data-template="marketplace"] .ctag { border-radius: 2px; }

/* ----------------------------------------------------------------- phones ---- */
@media (max-width: 860px) {
  html[data-template="storefront"] .nav-links a { padding: 5px 10px; }
  html[data-template="industrial"] h1, html[data-template="industrial"] .page-title { font-size: 1.7rem; }
  html[data-template="industrial"] .nav-links a { font-size: .95rem; padding: 4px 10px; }
  html[data-template="minimal"] .header-main { padding-top: 14px; gap: 12px; }
  html[data-template="minimal"] .shop, html[data-template="marketplace"] .shop { grid-template-columns: 1fr; gap: 16px; }
  html[data-template="minimal"] .grid { gap: 20px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-template="minimal"] .nav-links a { padding-right: 14px; font-size: .8rem; }
  html[data-template="marketplace"] .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  html[data-template="marketplace"] .nav-links a { padding: 7px 10px; }
  html[data-template="marketplace"] .card form.add .qty { width: 48px; }
}

/* Legibility: the graphite palette's red is too dark to read as text on its dark header. */
html[data-template="industrial"][data-palette="graphite"] .nav-links a:hover, html[data-template="industrial"][data-palette="graphite"] .nav-links a[aria-current="page"] { color: #ff6b6f; }
