/* Xpertech — site additions on top of components.css: drawers, search, cart, filters sheet, small utilities.
   Same rules as the design system: square corners, hairlines, one lime signal. */

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
html.xt-lock { overflow: hidden; }
[hidden] { display: none !important; }
.xt-skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--accent); color: var(--on-accent); padding: 10px 14px; font-weight: 500; }
.xt-skip:focus { left: 8px; }

/* buttons that look like links / fields */
button.xt-search { cursor: pointer; text-align: left; font: inherit; font-size: 13px; color: var(--ink-muted); }
button.xt-search:hover { border-color: var(--control-line); }
.xt-linkbtn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--accent-ink); font: inherit; font-size: 13px; font-weight: 500; }
.xt-linkbtn:hover, .xt-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* whole product card clickable, buttons stay on top */
.xt-pcard { position: relative; }
.xt-stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.xt-pcard-fav, .xt-pcard-foot .xt-btn { position: relative; z-index: 2; cursor: pointer; }
.xt-pcard-fav { position: absolute; }
.xt-pcard-fav[aria-pressed="true"] { color: var(--accent-ink); }
.xt-pcard-fav[aria-pressed="true"] svg { fill: currentColor; }
.xt-pcard-name a:hover { text-decoration: underline; text-underline-offset: 3px; }
button.xt-btn { font-family: inherit; }

/* status */
.xt-open.closed { color: var(--danger); }
.xt-map { display: block; }
a.xt-map:hover .xt-map-pin b { background: var(--accent); color: var(--on-accent); }
.xt-pills-deep a { height: 28px; padding: 0 12px; display: inline-flex; align-items: center; border: 1px solid #262626; color: var(--on-deep); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.xt-pills-deep a:hover { border-color: var(--accent); color: var(--accent); }
.xt-footer-contact a:hover, .xt-footer ul a:hover { color: var(--accent); }
.xt-theme-toggle { background: none; border: 1px solid #262626; color: var(--on-deep-muted); height: 28px; padding: 0 12px; font: inherit; cursor: pointer; text-transform: uppercase; }
.xt-theme-toggle:hover { color: var(--on-deep); border-color: var(--on-deep-muted); }

/* ---------- Drawers (cart, menu) ---------- */
.xt-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .6); backdrop-filter: blur(2px); }
.xt-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(420px, 100%); display: flex; flex-direction: column; background: var(--bg); border-left: 1px solid var(--line); transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility 0s .25s; }
.xt-drawer.is-open { transform: none; visibility: visible; transition: transform .25s ease; }
.xt-drawer:focus { outline: 0; }
.xt-drawer-head { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 16px 0 24px; border-bottom: 1px solid var(--line); flex: none; }
.xt-drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.xt-drawer-foot { flex: none; display: grid; gap: 12px; padding: 20px 24px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.xt-drawer-foot .xt-btnrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.xt-cart-total { display: flex; justify-content: space-between; align-items: baseline; }
.xt-cart-total span { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); }
.xt-cart-total b { font-weight: 400; font-size: 28px; }
.xt-cartline { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.xt-cartline b { display: block; font-weight: 500; }
.xt-cartline span { display: block; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.xt-cartline-r { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
.xt-cartline-r .xt-price { font-size: 17px; color: var(--ink); }
.xt-qty { display: inline-flex; align-items: center; margin-top: 10px; border: 1px solid var(--control-line); }
.xt-qty button { width: 32px; height: 32px; background: none; border: 0; cursor: pointer; font-size: 16px; }
.xt-qty button:hover { background: var(--surface-2); }
.xt-qty span { min-width: 28px; text-align: center; color: var(--ink) !important; font-size: 14px !important; }
.xt-empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 56px 12px; }
.xt-empty span:not(.xt-iwell) { color: var(--ink-muted); font-size: 14px; max-width: 280px; }
.xt-empty b { font-weight: 500; font-size: 18px; }
.xt-empty .xt-btn { margin-top: 8px; }

.xt-menu-nav { flex: 1; overflow-y: auto; padding: 8px 24px; }
.xt-menu-nav a { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 24px; letter-spacing: -0.03em; }
.xt-menu-nav a svg { width: 18px; height: 18px; color: var(--ink-muted); }
.xt-menu-nav a:hover { color: var(--accent-ink); }

/* ---------- Search ---------- */
.xt-searchbox { position: fixed; inset: 0 0 auto; z-index: 100; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); transform: translateY(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s .2s; }
.xt-searchbox.is-open { transform: none; visibility: visible; transition: transform .2s ease; }
.xt-searchbox-in { display: flex; align-items: center; gap: 12px; height: 72px; border-bottom: 1px solid var(--line); }
.xt-searchbox-in > svg { width: 22px; height: 22px; color: var(--ink-muted); flex: none; }
.xt-searchbox input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: 0; font-size: 22px; letter-spacing: -0.02em; color: var(--ink); }
.xt-searchbox input::-webkit-search-cancel-button { display: none; }
.xt-search-results { max-height: min(60vh, 520px); overflow-y: auto; padding: 8px 0 20px; }
.xt-search-row { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.xt-search-row:hover b { color: var(--accent-ink); }
.xt-search-row b { display: block; font-weight: 500; }
.xt-search-row span { font-size: 13px; color: var(--ink-muted); }
.xt-search-row .xt-badge { justify-self: start; }
.xt-search-row .xt-price { font-size: 15px; color: var(--ink); }
.xt-search-hint { padding: 20px 0; color: var(--ink-muted); font-size: 14px; }

/* ---------- Toast ---------- */
.xt-toast { position: fixed; left: 50%; bottom: 28px; z-index: 110; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--ink); color: var(--bg); font-size: 14px; box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); }
.xt-toast > svg { width: 18px; height: 18px; flex: none; }
.xt-toast .xt-linkbtn { color: var(--bg); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
:root[data-theme="light"] .xt-toast .xt-linkbtn { color: var(--bg); }

/* ---------- Shop filters ---------- */
.xt-filters-head { display: none; }
.xt-only-sheet { display: none; }
.xt-seg[data-cond] { grid-template-columns: repeat(3, 1fr); }
.xt-fgroup h4 [data-max-label] { font-family: var(--font-mono); font-weight: 400; font-size: 12px; color: var(--ink); }
.xt-rangeinput { width: 100%; accent-color: var(--accent); margin: 8px 0 4px; cursor: pointer; }
.xt-noresults { grid-column: 1 / -1; padding: 56px 0; text-align: center; color: var(--ink-muted); }
.xt-noresults b { display: block; color: var(--ink); font-weight: 500; font-size: 20px; margin-bottom: 6px; }

/* ---------- Forms ---------- */
.xt-form-error { margin: 0 0 4px; color: var(--danger); font-size: 14px; }
.xt-input[aria-invalid="true"] { border-color: var(--danger); }
input[type="date"].xt-input { color-scheme: inherit; }

/* ---------- Contact page ---------- */
.xt-contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.xt-contact-grid > * { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.xt-contact-way { display: flex; align-items: center; gap: 16px; padding: 22px 24px; }
.xt-contact-way b { display: block; font-weight: 500; }
.xt-contact-way span:not(.xt-iwell) { font-size: 14px; color: var(--ink-muted); }
.xt-contact-way:hover b { color: var(--accent-ink); }
.xt-contact-ways { display: grid; align-content: start; }
.xt-contact-ways > * + * { border-top: 1px solid var(--line); }
.xt-tradein-steps { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.xt-tradein-steps > div { padding: 26px 24px 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.xt-tradein-steps h3 { font-weight: 500; font-size: 19px; letter-spacing: -0.02em; margin: 0 0 8px; }
.xt-tradein-steps p { margin: 0; color: var(--ink-muted); font-size: 15px; }

@media (max-width: 760px) {
  .xt-toast { bottom: 96px; }
  .xt-search-row { grid-template-columns: 1fr auto; }
  .xt-search-row .xt-badge { display: none; }
  .xt-searchbox input { font-size: 18px; }

  /* filters become a full-screen sheet */
  .xt-filters.is-open { display: block; position: fixed; inset: 0; z-index: 100; overflow-y: auto; background: var(--bg); border: 0; padding: 0 16px 24px; }
  .xt-filters.is-open .xt-filters-head { display: flex; align-items: center; justify-content: space-between; height: 56px; position: sticky; top: 0; background: var(--bg); border-bottom: 1px solid var(--line); margin: 0 -16px 8px; padding: 0 8px 0 16px; z-index: 1; }
  .xt-filters.is-open .xt-filters-head b { font-weight: 500; }
  .xt-filters.is-open .xt-only-sheet { display: flex; margin-top: 20px; position: sticky; bottom: 16px; }

  .xt-contact-grid, .xt-tradein-steps { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .xt-drawer, .xt-searchbox, .xt-btn { transition: none; }
}

/* Live Google Map in the store card, toned to the black/bone palette */
.xt-map-live iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(1) invert(.92) contrast(.88) brightness(.95); }
:root[data-theme="light"] .xt-map-live iframe { filter: grayscale(1) contrast(.95); }

/* "Check price" links (prices hidden via data.js store.showPrices) */
.xt-ask { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; line-height: 18px; font-weight: 500; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; position: relative; z-index: 2; white-space: nowrap; }
.xt-ask svg { width: 11px; height: 11px; }
.xt-ask.is-text { text-decoration: none; z-index: auto; }
.xt-ask.is-big { font-size: 22px; line-height: 28px; color: var(--accent); }
.xt-ptable .xt-ask { font-size: 15px; }
.ax-latest .xt-ask, .ax-lcard-ask .xt-ask { color: var(--ax-ink); }
.ax-lcard-ask { margin: 0 0 16px; }
.xt-pdp-price .xt-btn { width: 100%; }
