#shop-controls,
#product-grid,
#shop-dialog {
  --fx-ink: #181d23;
  --fx-muted: #5e6670;
  --fx-line: #dce0e3;
  --fx-blue: #145bef;
  color: var(--fx-ink);
}
#shop-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 0 0 24px; }
.fx-filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.fx-filter, .fx-query { cursor: pointer; font: inherit; font-size: .82rem; font-weight: 600; color: var(--fx-ink); background: #fff; border: 1px solid var(--fx-line); border-radius: 99px; padding: 9px 16px; line-height: 1.2; }
.fx-filter:hover, .fx-query:hover { border-color: #878d92; }
.fx-filter[aria-pressed="true"] { color: #fff; background: #1a1e23; border-color: #1a1e23; }
.fx-results { margin-inline-start: auto; font-size: .78rem; color: var(--fx-muted); }
.fx-query { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; overflow-wrap: anywhere; }
.fx-query svg { width: 13px; height: 13px; flex: none; }
.fx-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fx-photo-filters { position: absolute; width: 0; height: 0; pointer-events: none; }
#product-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: clamp(15px,1.7vw,26px); }
.fx-card { min-width: 0; overflow: hidden; display: flex; flex-direction: column; border: 1px solid #e0e3e5; border-radius: 15px; background: #fff; transition: border-color .2s, box-shadow .2s; color: var(--fx-ink); }
.fx-card:hover { border-color: #bec5cc; box-shadow: 0 9px 24px rgb(31 40 54 / .055); }
.fx-picture { width: 100%; position: relative; display: grid; place-items: center; overflow: hidden; aspect-ratio: 1.45; margin: 0; padding: 0; border: 0; background: #eeefee; cursor: pointer; border-radius: 0; color: #20252b; }
.fx-spool { margin: 0; width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 50%; }
.fx-picture .fx-spool { transition: transform .45s ease; }
.fx-picture:hover .fx-spool { transform: scale(1.045); }
.fx-picture-arrow { position: absolute; bottom: 11px; right: 11px; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: #fffffff2; }
.fx-picture-arrow svg { width: 14px; height: 14px; }
.fx-card-body { flex: 1; padding: clamp(14px,1.35vw,21px); display: flex; flex-direction: column; }
.fx-spec { margin: 0; color: var(--fx-muted); font-size: .75rem; line-height: 1.35; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.fx-spec span { margin: 0 .22em; }
.fx-card h3 { font: inherit; font-size: clamp(1.14rem,1.64vw,1.55rem); font-weight: 680; line-height: 1.15; margin: .34em 0 .3em; letter-spacing: -.045em; }
.fx-card h3 button { appearance: none; border: 0; margin: 0; padding: 0; text-align: start; font: inherit; letter-spacing: inherit; color: inherit; background: transparent; cursor: pointer; }
.fx-card h3 button:hover { color: var(--fx-blue); }
.fx-use { margin: 0 0 15px; font-size: .83rem; line-height: 1.45; color: var(--fx-muted); }
.fx-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding-top: 10px; margin-top: auto; border-top: 1px solid #eceef0; }
.fx-swatches { display: flex; width: max-content; align-items: center; gap: 1px; }
.fx-swatch { position: relative; display: grid; place-items: center; width: 27px; height: 28px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.fx-swatch::after { content: ""; width: 15px; height: 15px; border: 1px solid rgb(0 0 0 / .13); box-sizing: border-box; border-radius: 50%; background: var(--fx-color); }
.fx-swatch[aria-pressed="true"]::after { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #272d35; }
.fx-swatch:hover::after { transform: scale(1.08); }
.fx-color-name { display: block; min-height: 1.2em; padding-inline-start: 4px; font-size: .69rem; line-height: 1.3; color: var(--fx-muted); }
.fx-add, .fx-close { display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; margin: 0; padding: 0; border-radius: 50%; background: #fff; border: 1px solid var(--fx-line); color: var(--fx-ink); cursor: pointer; }
.fx-add:hover, .fx-close:hover { border-color: var(--fx-ink); }
.fx-add svg, .fx-close svg { width: 18px; height: 18px; }
#shop-dialog { width: min(760px, calc(100vw - 36px)); max-width: calc(100vw - 24px); max-height: min(87dvh, 850px); padding: 0; margin: auto; border: 1px solid #e1e5e8; border-radius: 21px; background: #fff; overflow: auto; overscroll-behavior: contain; box-shadow: 0 32px 90px rgb(7 15 25 / .24); }
#shop-dialog::backdrop { background: rgb(13 20 28 / .58); }
.fx-dialog-body { box-sizing: border-box; padding: clamp(19px,3.6vw,36px); }
.fx-dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 21px; }
.fx-dialog-top h2 { font-family: inherit; font-size: clamp(1.55rem,3vw,2.1rem); line-height: 1.12; letter-spacing: -.045em; font-weight: 650; margin: 0; color: var(--fx-ink); }
.fx-detail-layout { display: grid; grid-template-columns: minmax(0,.95fr) minmax(0,1fr); gap: clamp(16px,3vw,28px); align-items: start; }
.fx-detail-image { overflow: hidden; border-radius: 12px; background: #f0f1f0; aspect-ratio: 1.2; }
.fx-detail-desc { margin: .65em 0 1.1em; color: #343b44; line-height: 1.55; font-size: .94rem; }
.fx-detail-label { font-size: .82rem; color: var(--fx-muted); margin: 0 0 3px; }
.fx-detail-label strong { margin-inline-start: .35em; font-weight: 600; color: var(--fx-ink); }
.fx-detail-actions, .fx-quote-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.fx-primary, .fx-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; box-sizing: border-box; padding: 9px 15px; border: 1px solid transparent; border-radius: 8px; font: inherit; font-size: .86rem; font-weight: 640; line-height: 1.3; text-decoration: none; cursor: pointer; }
.fx-primary { background: var(--fx-blue); color: #fff; }
.fx-primary:hover { background: #0a47cc; color: #fff; }
.fx-secondary { background: #fff; color: var(--fx-ink); border-color: var(--fx-line); }
.fx-secondary:hover { border-color: var(--fx-ink); }
.fx-primary svg, .fx-secondary svg { width: 17px; height: 17px; }
.fx-note, .fx-guide p { margin: 12px 0 0; color: var(--fx-muted); font-size: .8rem; line-height: 1.52; }
.fx-guide { border-top: 1px solid var(--fx-line); padding-top: 14px; margin-top: 21px; }
.fx-guide summary { cursor: pointer; font-size: .87rem; font-weight: 600; }
.fx-stepper { display: inline-flex; width: max-content; height: 40px; align-items: center; border: 1px solid var(--fx-line); border-radius: 8px; white-space: nowrap; }
.fx-stepper button { display: grid; place-items: center; background: transparent; border: 0; border-radius: 7px; color: currentColor; cursor: pointer; width: 31px; height: 36px; margin: 0; padding: 0; }
.fx-stepper svg { width: 14px; height: 14px; }
.fx-stepper button:disabled { cursor: default; opacity: .3; }
.fx-stepper output { min-width: 20px; color: var(--fx-ink); text-align: center; font-size: .84rem; font-variant-numeric: tabular-nums; }
.fx-cart-list { list-style: none; padding: 0; margin: 0; }
.fx-cart-line { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--fx-line); padding: 13px 0; }
.fx-mini { width: 74px; aspect-ratio: 1.2; overflow: hidden; border-radius: 7px; background: #eef0f2; flex: none; }
.fx-line-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fx-line-info strong { font-size: .97rem; color: var(--fx-ink); line-height: 1.25; }
.fx-line-info span { font-size: .75rem; line-height: 1.35; color: var(--fx-muted); }
.fx-line-tools { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 7px; margin-inline-start: auto; }
.fx-remove { border: 0; cursor: pointer; font: inherit; line-height: 1.4; font-size: .76rem; text-decoration: underline; text-underline-offset: 3px; background: transparent; color: var(--fx-muted); margin: 0; padding: 4px 3px; }
.fx-quote-settings { padding-top: 16px; border-top: 1px solid var(--fx-line); display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.fx-quote-settings label { display: grid; gap: 5px; color: var(--fx-muted); font-size: .75rem; }
.fx-quote-settings select { padding: 8px 10px; width: 100%; min-height: 38px; background: #fff; border: 1px solid var(--fx-line); border-radius: 6px; color: var(--fx-ink); font: inherit; font-size: .86rem; }
.fx-empty { grid-column: 1 / -1; text-align: center; padding: 34px 10px; }
.fx-empty > svg { width: 34px; height: 34px; margin: 0 auto 9px; }
.fx-empty h3 { font: inherit; font-size: 1.15rem; font-weight: 660; margin: 0; }
.fx-empty p { color: var(--fx-muted); font-size: .88rem; line-height: 1.5; margin: 6px 0 16px; }
#product-grid :focus-visible, #shop-dialog :focus-visible, #shop-controls :focus-visible { outline: 2px solid var(--fx-blue); outline-offset: 2px; }
@media (max-width: 880px) {
  #product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .fx-picture { aspect-ratio: 1.55; }
}
@media (max-width: 580px) {
  #shop-controls { gap: 9px; margin-bottom: 16px; }
  .fx-filter-group { gap: 4px; }
  .fx-filter { padding: 8px 11px; font-size: .76rem; }
  .fx-results { font-size: .71rem; }
  #product-grid { gap: 10px; }
  .fx-card { border-radius: 10px; }
  .fx-card-body { padding: 10px; }
  .fx-card h3 { font-size: 1.02rem; }
  .fx-use { font-size: .75rem; margin-bottom: 9px; }
  .fx-spec { font-size: .7rem; }
  .fx-add { width: 32px; height: 32px; }
  .fx-picture { aspect-ratio: 1.35; }
  .fx-picture-arrow { width: 24px; height: 24px; bottom: 6px; right: 6px; }
  .fx-picture-arrow svg { width: 12px; height: 12px; }
  .fx-detail-layout { grid-template-columns: 1fr; }
  .fx-detail-image { max-height: 190px; width: 100%; aspect-ratio: 2.05; }
  .fx-detail-image img { object-fit: contain; background: #111; }
  .fx-dialog-body { padding: 16px; }
  .fx-dialog-top { margin-bottom: 14px; }
  .fx-mini { width: 48px; }
  .fx-line-tools { flex-direction: column; gap: 1px; }
  .fx-cart-line { gap: 8px; }
  .fx-cart-line .fx-stepper { height: 33px; }
  .fx-cart-line .fx-stepper button { width: 25px; height: 30px; }
}
@media (max-width: 360px) {
  #product-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-picture .fx-spool, .fx-card { transition: none; }
}
.fx-store-note { grid-column: 1 / -1; margin-bottom: 2px; padding: 11px 15px; border-inline-start: 3px solid #6b7889; background: #f3f5f7; color: #414a55; font-size: .86rem; line-height: 1.45; }
.fx-store-note .fx-secondary { margin-inline-start: 8px; }
.fx-product-price { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; padding: 3px 0 12px; }
.fx-product-price strong, .fx-subtotal strong { font-size: 1.18rem; font-variant-numeric: tabular-nums; }
.fx-product-price span, .fx-option-single { color: var(--fx-muted); font-size: .77rem; }
.fx-card-footer > div { min-width: 0; }
.fx-options { display: grid; gap: 3px; width: 100%; font-size: .75rem; color: var(--fx-muted); }
.fx-options select { width: 100%; min-width: 0; max-width: 100%; min-height: 36px; border-radius: 6px; padding: 5px; color: var(--fx-ink); background: #fff; border: 1px solid var(--fx-line); font: inherit; font-size: .86rem; }
.fx-detail-info .fx-options select { min-height: 43px; }
.fx-store-alert { color: #882127; border-inline-start: 3px solid #c24b52; background: #fff3f3; padding: 10px 13px; font-size: .86rem; line-height: 1.4; overflow-wrap: anywhere; }
.fx-detail-info { min-width: 0; }
.fx-detail-desc { white-space: pre-line; overflow-wrap: anywhere; }
.fx-guide p { white-space: pre-line; }
.fx-gallery { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.fx-gallery button { padding: 2px; border: 1px solid var(--fx-line); border-radius: 7px; background: white; cursor: pointer; }
.fx-gallery button[aria-pressed="true"] { border-color: #20252b; box-shadow: inset 0 0 0 1px #20252b; }
.fx-gallery img { display: block; width: 41px; height: 41px; object-fit: cover; border-radius: 4px; }
.fx-contact { margin-top: 12px; }
.fx-subtotal { margin-top: 8px; border-top: 1px solid var(--fx-line); padding-top: 15px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px; }
.fx-checkout-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 18px; }
.fx-primary:disabled, .fx-secondary:disabled, .fx-add:disabled, .fx-remove:disabled { cursor: default; opacity: .5; }
.fx-card h3, .fx-cart-line .fx-line-info { overflow-wrap: anywhere; }
@media(max-width:580px) {
  .fx-product-price { display: grid; gap: 2px; }
  .fx-product-price strong { font-size: 1.02rem; }
  .fx-options select { font-size: .76rem; }
  .fx-checkout-actions > button { flex: 1 1 120px; }
}
