/* copy-site kit file */
/* cl-shop.css: the site's own shop parts (the title band, the cart page and the cart drawer), written
   against the site's tokens (cl-site.css :root), so the chrome agent's token block restyles them. The shop
   pages (the hub, the listings, the search, the product page) and the vehicle band are the kit's, drawn in
   its --parts-* tokens (storefront-kit ADRs 0006 and 0007): no rule here names one of their classes.
   Where the shop came from: templates, CSS and routes of the Carline Muffler demo (carlinemufflerburlington.ca, itself built from the Flowmaster site), made generic.
   The chrome (header, footer, .cl-btn, the fonts) is cl-site.css's and base.html's.
   Two layouts: from 980px the desktop; below, the title band in the phone stage's units (var(--mx)) and
   the cart a clean phone layout in px.
   Its tokens sit on :root outside any layer, its rules in @layer site (cl-site.css: the layer order). */
@layer base, kit, site;

:root {
  --cs-accent: var(--site-accent-ink);
  --cs-accent-fg: var(--site-accent-fg);
  --cs-bg: var(--site-bg);
  --cs-fg: var(--site-fg);
  --cs-muted: var(--site-muted);
  --cs-line: var(--site-line);
  --cs-band: var(--site-band);
  --cs-card: var(--site-card);
  --cs-photo: #FFFFFF;   /* product photos sit on white whatever the theme */
  --cs-field: var(--site-field-bg);
  --cs-heading: var(--site-font-heading);
  --cs-body: var(--site-font-body);
  --cs-button-font: var(--site-font-button);
}

@layer site {

.cl-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cl-shop { display: block; background: var(--cs-bg); color: var(--cs-fg); font-family: var(--cs-body); overflow-x: clip; }
.cl-shop *, .cl-cd * { box-sizing: border-box; }
.cl-shop a { color: inherit; }
.cl-shop :focus-visible, .cl-cd :focus-visible { outline: 2px solid var(--cs-accent); outline-offset: 2px; }

/* ---- the secondary button (.cl-grey: the cart's actions, a page's secondary links) ---- */
.cl-grey {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 10px; margin: 0;
  background: var(--site-button-bg); color: var(--site-button-fg) !important; border: 1px solid var(--site-button-bg); border-radius: var(--site-radius);
  font: 400 14px/normal var(--cs-button-font); letter-spacing: 0; text-decoration: none; text-align: center;
  cursor: pointer; transition: all 0.2s ease; -webkit-appearance: none; appearance: none;
}
.cl-grey:hover { background: var(--site-button-hover-bg); border-color: var(--site-button-hover-bg); color: var(--site-button-hover-fg) !important; }
.cl-grey:disabled, .cl-grey[aria-disabled="true"] { background: var(--site-disabled-bg); border-color: var(--site-disabled-bg); color: var(--site-disabled-fg) !important; cursor: default; }

/* the primary button (cl-site.css .cl-btn) in the flow of a page: the cart's Check out or call button */
.cl-shop .cl-btn, .cl-cd .cl-btn { position: relative; text-decoration: none; cursor: pointer; }

/* the tick, in the accent colour */
.cl-tick { display: inline-block; width: 14px; height: 8px; margin: 0 8px 3px 1px; border: solid var(--cs-accent); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg); vertical-align: middle; flex: none; }

/* a field: the field colour, a rule, the site's radius (the cart's discount code) */
.cl-input {
  height: 42px; margin: 0; padding: 0 14px; width: 100%;
  background: var(--cs-field); color: var(--cs-fg); border: 1px solid var(--cs-line); border-radius: var(--site-radius);
  font: 400 16px/normal var(--cs-body); letter-spacing: -0.16px;
}
.cl-input:focus-visible { outline: 2px solid var(--cs-accent); outline-offset: 0; }
.cl-input::placeholder { color: var(--cs-muted); }

/* ================================================================================================
   The title band: the h1 centred in an 858 box, the paragraph 20px below it centred in 732; on a phone
   the phone stage's units (var(--mx)). The chrome agent matches it to the client's page titles.
   ================================================================================================ */
.cl-band { background: var(--cs-bg); color: var(--cs-fg); text-align: center; padding: 86px 20px 50px; }
.cl-band__h1 {
  position: relative; max-width: 858px; margin: 0 auto;
  font: 700 44px/44px var(--cs-heading); letter-spacing: -0.88px; color: var(--cs-fg); outline: none;
}
.cl-band__text { max-width: 732px; margin: 20px auto 0; }
.cl-band__text p { margin: 0; font: 400 16px/28.8px var(--cs-body); letter-spacing: -0.16px; }

/* ================================================================================================
   The cart page: the band, then the lines (840) and the summary (440), 40 apart
   ================================================================================================ */
.cl-cart { max-width: 1440px; margin: 0 auto; padding: 0 60px 80px; }
.cl-cart[aria-busy="true"], .cl-cd__body[aria-busy="true"] { opacity: 0.6; }
.cl-cart__layout { display: grid; grid-template-columns: minmax(0, 840fr) minmax(0, 440fr); gap: 40px; align-items: start; }
.cl-cart__count { margin: 0 0 16px; font: 400 16px/24px var(--cs-body); color: var(--cs-muted); }
.cl-cart__error, .cl-cd__error { margin: 0 0 24px; padding: 12px 16px; border: 1px solid var(--cs-accent); color: var(--cs-fg); font: 400 16px/24px var(--cs-body); }
.cl-line { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 24px; background: var(--cs-card); padding: 24px; color: var(--cs-fg); }
.cl-line + .cl-line { margin-top: 16px; }
.cl-line__img { display: block; width: 120px; height: 120px; background: var(--cs-photo); padding: 8px; }
.cl-line__img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.cl-line__info p { margin: 0; }
.cl-line__brand { font: 400 14px/21px var(--cs-body); color: var(--cs-muted); }
.cl-line__title { display: block; font: 400 18px/27px var(--cs-body); letter-spacing: -0.18px; color: var(--cs-fg) !important; text-decoration: none; }
.cl-line__title:hover { text-decoration: underline; }
.cl-line__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px !important; font: 400 14px/21px var(--cs-body); color: var(--cs-muted); }
.cl-line__meta > span { display: inline-flex; align-items: center; }
.cl-line__special { color: var(--cs-accent); font-weight: 400; }
.cl-line__unit { margin-top: 4px !important; font: 400 14px/21px var(--cs-body); color: var(--cs-muted); }
.cl-line__row { display: flex; align-items: center; gap: 24px; margin-top: 16px; }
.cl-line__total { margin: 0; font: 700 26px/31px var(--cs-heading); letter-spacing: -0.78px; color: var(--cs-fg); text-align: right; white-space: nowrap; }
.cl-line__total s { font: 400 14px/normal var(--cs-body); color: var(--cs-muted); }
.cl-line__remove { background: none; border: 0; padding: 0; font: 400 14px/normal var(--cs-body); color: var(--cs-muted); text-decoration: underline; cursor: pointer; }
.cl-stepper { display: inline-flex; border: 1px solid var(--cs-line); height: 42px; }
.cl-stepper button { width: 42px; height: 40px; background: var(--cs-field); color: var(--cs-fg); border: 0; font: 400 20px/1 var(--cs-body); cursor: pointer; }
.cl-stepper button:hover { background: var(--cs-band); }
.cl-stepper input { width: 48px; height: 40px; background: var(--cs-field); color: var(--cs-fg); border: 0; border-left: 1px solid var(--cs-line); border-right: 1px solid var(--cs-line); text-align: center; font: 400 16px/1 var(--cs-body); -moz-appearance: textfield; }
.cl-stepper input::-webkit-inner-spin-button, .cl-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cl-cart__continue { display: inline-block; margin-top: 24px; font: 400 16px/24px var(--cs-body); color: var(--cs-muted) !important; }

.cl-sum { background: var(--cs-band); padding: 40px; color: var(--cs-fg); }
.cl-sum__title { margin: 0 0 24px; font: 700 26px/normal var(--cs-heading); letter-spacing: -0.78px; }
.cl-sum__code { display: flex; gap: 12px; margin-bottom: 16px; }
.cl-sum__code .cl-input { flex: 1; }
.cl-sum__code .cl-grey { min-width: 90px; }
.cl-sum__error { margin: -8px 0 16px; color: var(--cs-accent); font: 400 14px/21px var(--cs-body); }
.cl-sum__codes { list-style: none; margin: 0 0 16px; padding: 0; font: 400 14px/21px var(--cs-body); }
.cl-sum__codes button { background: none; border: 0; color: var(--cs-muted); cursor: pointer; font-size: 18px; }
.cl-sum__rows { margin: 0; font: 400 16px/28.8px var(--cs-body); }
.cl-sum__rows > div { display: flex; justify-content: space-between; gap: 16px; }
.cl-sum__rows dt, .cl-sum__rows dd { margin: 0; }
.cl-sum__rows .cl-sum__total { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--cs-line); font: 700 30px/33px var(--cs-heading); letter-spacing: -0.6px; }
.cl-sum__total small { font: 400 14px/normal var(--cs-body); letter-spacing: 0; color: var(--cs-muted); }
.cl-sum__ship { display: flex; align-items: center; margin: 16px 0 0; font: 400 14px/21px var(--cs-body); color: var(--cs-fg); }
.cl-sum__tax, .cl-sum__notice { margin: 4px 0 0; font: 400 14px/21px var(--cs-body); color: var(--cs-muted); }
.cl-sum__note { margin: 24px 0 16px; font: 400 16px/24px var(--cs-body); color: var(--cs-fg); }
.cl-sum__cta { display: flex !important; width: 100%; height: 49px; margin-top: 24px; text-decoration: none; }
.cl-sum__note + .cl-sum__cta { margin-top: 0; }
.cl-sum__cta .cl-btn-label { font-size: 18px; line-height: 24px; }
.cl-sum__mail { display: flex; width: 100%; margin-top: 12px; }
.cl-sum__secure { margin: 12px 0 0; text-align: center; font: 400 14px/21px var(--cs-body); color: var(--cs-muted); }
.cl-sum__notefield { margin-top: 24px; font: 400 14px/21px var(--cs-body); color: var(--cs-muted); }
.cl-sum__notefield summary { cursor: pointer; }
.cl-sum__notefield textarea { height: auto; margin-top: 8px; padding: 10px 14px; resize: vertical; }
.cl-cart__empty { padding: 20px 0 40px; text-align: center; }
.cl-cart__empty-title { margin: 0 0 32px; font: 700 26px/normal var(--cs-heading); letter-spacing: -0.78px; color: var(--cs-fg); }
.cl-cart__brands { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 0; }
.cl-cart__brands .cl-grey { min-width: 170px; }

/* ================================================================================================
   The cart drawer: 420 from the right, a rule on its left
   ================================================================================================ */
/* the drawer and its overlay sit above any client header (a sticky header at z-index 991 hid the drawer's title on one copy) */
.cl-cd-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0, 0, 0, 0.5); opacity: 0; transition: opacity 0.25s ease; }
.cl-cd-overlay.is-open { opacity: 1; }
.cl-cd {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 10001; width: 420px; max-width: 100vw;
  background: var(--cs-bg); color: var(--cs-fg); border-left: 1px solid var(--cs-band);
  font-family: var(--cs-body); transform: translateX(100%); transition: transform 0.25s ease;
}
.cl-cd.is-open { transform: none; }
.cl-cd[hidden], .cl-cd-overlay[hidden] { display: none; }
.cl-cd__body { height: 100%; display: flex; flex-direction: column; overflow-y: auto; }
.cl-cd__head { display: flex; align-items: center; justify-content: space-between; padding: 24px; border-bottom: 1px solid var(--cs-band); }
.cl-cd__title { margin: 0; font: 700 26px/normal var(--cs-heading); letter-spacing: -0.78px; color: var(--cs-fg); }
.cl-cd__count { color: var(--cs-muted); }
.cl-cd__close { width: 36px; height: 36px; background: none; border: 0; color: var(--cs-fg); font: 300 36px/1 var(--cs-body); cursor: pointer; transition: transform 0.2s ease, color 0.2s ease; }
.cl-cd__close:hover { color: var(--cs-muted); transform: rotate(180deg); }
.cl-cd__error { margin: 16px 24px 0; }
.cl-cd__lines { padding: 16px 24px; }
.cl-line--sm { grid-template-columns: 80px minmax(0, 1fr); gap: 16px; padding: 16px; }
.cl-line--sm .cl-line__img { width: 80px; height: 80px; padding: 4px; }
.cl-line--sm .cl-line__title { font-size: 16px; line-height: 24px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cl-line--sm .cl-line__row { justify-content: space-between; margin-top: 12px; }
.cl-line--sm .cl-line__total { font-size: 20px; line-height: 24px; letter-spacing: -0.6px; }
.cl-line--sm .cl-line__remove { margin-top: 8px; }
.cl-line--sm .cl-stepper { height: 36px; }
.cl-line--sm .cl-stepper button { width: 36px; height: 34px; }
.cl-line--sm .cl-stepper input { width: 40px; height: 34px; }
.cl-cd__foot { margin-top: auto; padding: 24px; background: var(--cs-band); }
.cl-cd__foot .cl-sum__rows .cl-sum__total { font-size: 24px; line-height: 28px; }
.cl-cd__view { display: block; margin-top: 16px; text-align: center; font: 400 14px/21px var(--cs-body); color: var(--cs-muted) !important; }
.cl-cd__empty { padding: 32px 24px; display: grid; gap: 12px; }
.cl-cd__empty p { margin: 0; color: var(--cs-muted); }
.cl-cd__empty-title { margin: 0 0 12px !important; font: 700 26px/normal var(--cs-heading) !important; letter-spacing: -0.78px; color: var(--cs-fg) !important; }

/* ================================================================================================
   Below 980px: the title band in the phone stage's units (var(--mx)), the cart a phone layout
   ================================================================================================ */
@media (max-width: 979.98px) {
  .cl-band { padding: 32px 16px 24px; }
  .cl-band__h1 { left: 0; max-width: none; font-size: 36px; line-height: 38px; letter-spacing: -0.62px; }
  .cl-band__text { max-width: none; margin-top: 14px; }
  .cl-band__text p { font-size: 16px; line-height: 1.5; letter-spacing: 0; }
  .cl-band--small .cl-band__text p { font-size: 14px; line-height: 1.5; }

  .cl-cart { padding: 0 20px 60px; }
  .cl-cart__layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .cl-line { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 16px; }
  .cl-line__img { width: 96px; height: 96px; }
  .cl-line > .cl-line__total { grid-column: 2; text-align: left; font-size: 22px; }
  .cl-sum { padding: 24px 20px; }
}
@media (max-width: 599.98px) {
  .cl-cd { width: 100vw; border-left: 0; }
}

}

/* The kit's checkout page (kit-checkout.css) in the site's colours, through its --kc-* tokens alone (storefront-kit
   README, Checkout): ink and soft text both full contrast, the Pay button the cart's Check out. Outside any layer
   like every token, and main.kc-page so it wins over the kit's own unlayered .kc-page defaults, loaded after this. */
main.kc-page {
  --kc-ink: var(--site-fg);
  --kc-soft: var(--site-muted);
  --kc-line: var(--site-line);
  --kc-surface: var(--site-card);
  --kc-bg: var(--site-bg);
  --kc-accent: var(--site-button-bg);
}
/* in the dark the Pay button is their blue with white words (the cart's Check out turns light there, and the kit's
   Pay is white on --kc-accent) */
:root[data-parts-theme="dark"] main.kc-page { --kc-accent: var(--site-accent); }
