/* =====================================================================
   CaddyLucky - Find dealer (/dealers) + Find parts (/parts) pages (.mk-*)
   Same tokens as style.css / pages-extra.css: #0f0f0f ink, #f4f4f2 soft,
   #deded9 borders, Instrument Sans, 7px / 11px radii, pill chips.
   Reuses .car-listing-hero, .car-product-card, .cd-* (details, forms).
   Breakpoints: 1199 / 991 / 767 / 575
   ===================================================================== */

.mk-page {
  --ink: var(--color-primary, #0f0f0f);
  --soft: #f4f4f2;
  --line: #deded9;
  --line-soft: #e7e7e4;
  --muted: #6c6c68;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}
.mk-page h1, .mk-page h2, .mk-page h3 { margin: 0; font-weight: 600; line-height: 1.1; }
.mk-page p { font-size: 15px; line-height: 1.6; }
.mk-page ul, .mk-page dl { margin: 0; padding: 0; list-style: none; }
.mk-page button, .mk-page select, .mk-page input, .mk-page textarea { font-family: inherit; }
.mk-page.cd-page { padding-bottom: 100px; }
.mk-section { padding: 44px 0 100px; }
.mk-ok { color: #1f7a3d; }
.mk-muted { color: var(--muted); font-size: 14px; }
.mk-gap { margin-top: 14px; }
.mk-pre { white-space: pre-line; overflow-wrap: anywhere; }
.mk-underline { text-decoration: underline; text-underline-offset: 3px; }
.mk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- search bar (dealers) --------------------------------------- */
.mk-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--soft);
}
.mk-bar__search {
  position: relative;
  display: block;
  margin: 0;
}
.mk-bar__search i {
  position: absolute;
  top: 50%;
  left: 15px;
  color: #77776f;
  font-size: 14px;
  transform: translateY(-50%);
  pointer-events: none;
}
.mk-bar__search input,
.mk-bar__field select {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid #dededb;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.mk-bar__search input { padding-left: 40px; }
.mk-bar__search input:focus,
.mk-bar__field select:focus { border-color: var(--ink); outline: 0; box-shadow: 0 0 0 3px rgba(15, 15, 15, 0.08); }
.mk-bar__field { display: flex; min-width: 0; flex-direction: column; gap: 6px; margin: 0; }
.mk-bar__field > span { color: #363632; font-size: 12px; font-weight: 600; }
.mk-bar__actions { display: flex; gap: 8px; }
.mk-bar__actions .cd-btn { min-height: 48px; }

.mk-resultbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  margin: 28px 0 22px;
}
.mk-resultbar h2 { font-size: 26px; letter-spacing: -0.6px; }
.mk-resultbar span { color: var(--muted); font-size: 13px; }

/* ---------- grids ------------------------------------------------------ */
.mk-page .car-product-grid.mk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mk-page .car-product-grid.mk-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.mk-noimg {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: linear-gradient(135deg, #ececea, #dcdcd8);
  color: #8a8a84;
  font-size: 40px;
}
.mk-noimg b { color: var(--ink); font-size: 44px; font-weight: 700; letter-spacing: -1px; }

/* ---------- dealer card ------------------------------------------------ */
.mk-dealer-card .car-product-card__body { gap: 0; }
.mk-dealer-card .car-product-year i { margin-right: 4px; }
.mk-loc { margin: 8px 0 0; color: #4a4a46; font-size: 13px !important; }
.mk-loc i { margin-right: 5px; color: #77776f; }
.mk-about {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  color: #5a5a56;
  font-size: 13.5px !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.mk-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px !important; }
.mk-tags li {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #363632;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}
.mk-tags--lg li { padding: 8px 14px; font-size: 13.5px; }
.mk-tags--lg i { margin-right: 4px; color: #1f7a3d; font-size: 11px; }
.mk-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px !important;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.mk-counts li { padding: 10px 0; color: var(--muted); font-size: 12px; }
.mk-counts li + li { padding-left: 12px; border-left: 1px solid var(--line-soft); }
.mk-counts strong { display: block; color: var(--ink); font-size: 18px; line-height: 1.1; }
.mk-dealer-card .car-product-card__footer { margin-top: auto; padding-top: 14px; gap: 10px; flex-wrap: wrap; }
.mk-phone { color: #363632; font-size: 13px; font-weight: 600; white-space: nowrap; }
.mk-phone i { margin-right: 4px; color: #77776f; }
.mk-phone:hover { text-decoration: underline; }

/* ---------- part card -------------------------------------------------- */
.mk-part-title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 20px !important;
  letter-spacing: -0.4px !important;
  line-height: 1.2 !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}
.mk-fit { margin: 10px 0 0; color: #5a5a56; font-size: 13px !important; }
.mk-fit i { margin-right: 5px; color: #77776f; }
.mk-part-card .car-product-card__footer { margin-top: auto; padding-top: 14px; }
.mk-part-card .car-product-seller { min-width: 0; }
.mk-part-card .car-product-seller-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- parts: filter sidebar + results ---------------------------- */
.mk-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 36px; align-items: start; }
.mk-results { min-width: 0; }
.mk-filters {
  position: sticky;
  top: 110px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}
.mk-filters__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.mk-filters__head h2 { font-size: 20px; letter-spacing: -0.4px; }
.mk-filters__clear { color: #363632; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.mk-filters__search { margin-bottom: 16px; }
.mk-filters .cd-field { margin-bottom: 14px; }
.mk-filters .cd-field-row { gap: 0 10px; }
.mk-filter-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.mk-filter-toggle__count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  line-height: 1;
}
.mk-scope {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 6px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--soft);
  font-size: 14px !important;
}
.mk-scope a:not(.mk-scope__clear) { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.mk-scope__clear { margin-left: auto; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- pagination / empty ----------------------------------------- */
.mk-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 44px; }
.mk-pagination__nums { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.mk-pagination__item { display: inline-flex; align-items: center; gap: 6px; }
.mk-pg {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
a.mk-pg:hover { border-color: var(--ink); }
.mk-pg.is-current { border-color: var(--ink); background: var(--ink); color: #fff; }
.mk-pg--gap { border-color: transparent; min-width: 20px; padding: 0; }
.mk-pg--nav { display: inline-flex; gap: 8px; align-items: center; }
.mk-pg--nav i { font-size: 12px; }
.mk-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 64px 20px;
  border: 1px dashed #c9c9c3;
  border-radius: 11px;
  background: var(--soft);
  text-align: center;
}
.mk-empty > i { color: #8a8a84; font-size: 28px; }
.mk-empty h3 { font-size: 24px; letter-spacing: -0.5px; }
.mk-empty p { max-width: 420px; margin: 0 0 10px; color: #5a5a56; }

/* ---------- dealer detail ---------------------------------------------- */
.mk-dhead {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding-top: 30px;
}
.mk-dhead__media {
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f1f1ef;
}
.mk-dhead__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mk-dhead__initials {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: linear-gradient(135deg, #ececea, #dcdcd8);
  color: var(--ink);
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -2px;
}
.mk-dhead__body { min-width: 0; }
.mk-dhead__body .cd-eyebrow { display: block; margin-bottom: 8px; }
.mk-dhead h1 {
  margin-bottom: 14px;
  font-size: clamp(34px, 4.6vw, 58px);
  letter-spacing: -2px;
  line-height: 1.02;
  overflow-wrap: anywhere;
}
.mk-page .cd-heading__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.mk-stats { display: flex; flex-wrap: wrap; gap: 0; margin: 20px 0 0; }
.mk-stats li { padding: 0 24px 0 0; margin-right: 24px; border-right: 1px solid var(--line); }
.mk-stats li:last-child { padding-right: 0; margin-right: 0; border-right: 0; }
.mk-stats strong { display: block; font-size: 30px; letter-spacing: -1px; line-height: 1; }
.mk-stats span { color: var(--muted); font-size: 13px; }
.mk-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.mk-actions .cd-btn { white-space: normal; }
.mk-dhead + .cd-layout { padding-top: 12px; }
.mk-sechead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; }

.mk-services { display: grid; gap: 16px; }
.mk-service {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}
.mk-service__img { position: relative; min-height: 180px; background: #f1f1ef; }
.mk-service__img img, .mk-service__img .mk-noimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-service__body { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px 20px; }
.mk-service__body h3 { font-size: 22px; letter-spacing: -0.5px; line-height: 1.15; overflow-wrap: anywhere; }
.mk-service__sum { margin: 0; color: #4a4a46; font-size: 14px !important; }
.mk-service__price { margin: 0; font-size: 17px !important; font-weight: 700; }
.mk-service__price small { color: var(--muted); font-size: 13px; font-weight: 500; }
.mk-more { width: 100%; }
.mk-more summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #363632;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.mk-more summary::-webkit-details-marker { display: none; }
.mk-more summary::after { content: "+"; display: inline-grid; width: 20px; height: 20px; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 14px; line-height: 1; }
.mk-more[open] summary::after { content: "−"; }
.mk-more__body { display: grid; gap: 10px; padding-top: 12px; color: #4a4a46; font-size: 14px; }
.mk-more__body p { margin: 0; font-size: 14px !important; }
.mk-dl { display: grid; gap: 0; }
.mk-dl > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 13.5px; }
.mk-dl dt { color: var(--muted); }
.mk-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.mk-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.mk-link i { font-size: 11px; transition: transform 0.2s ease; }
.mk-link:hover i { transform: translateX(4px); }
.mk-contact-list { display: grid; gap: 10px; margin: 12px 0 4px !important; }
.mk-contact-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; overflow-wrap: anywhere; }
.mk-contact-list i { width: 18px; flex: 0 0 18px; padding-top: 3px; color: #77776f; text-align: center; }
.mk-contact-list a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.mk-page .cd-side-card .cd-contact { margin-top: 16px; border-top: 1px solid var(--line-soft); }
.mk-callbtn { margin-bottom: 4px; }

/* ---------- part detail ------------------------------------------------ */
.mk-ptitle { font-size: clamp(30px, 3.8vw, 50px) !important; letter-spacing: -1.6px; line-height: 1.05 !important; overflow-wrap: anywhere; }
.mk-page .cd-heading h1.mk-ptitle { display: block; }
.mk-gallery-empty {
  display: grid;
  aspect-ratio: 3 / 2;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(135deg, #ececea, #dcdcd8);
  color: #77776f;
}
.mk-gallery-empty i { font-size: 44px; }

/* ===================== responsive ===================== */
@media only screen and (max-width: 1199.98px) {
  .mk-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mk-bar__search { grid-column: 1 / -1; }
  .mk-bar__actions { grid-column: 1 / -1; }
  .mk-page .car-product-grid.mk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 26px; }
  .mk-dhead { grid-template-columns: 280px minmax(0, 1fr); gap: 28px; }
}
@media only screen and (max-width: 991.98px) {
  .mk-section { padding: 30px 0 70px; }
  .mk-layout { display: block; }
  .mk-filter-toggle { display: inline-flex; }
  .mk-filters { position: static; display: none; max-height: none; margin-bottom: 22px; overflow: visible; }
  .mk-filters.is-open { display: block; }
  .mk-filters form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
  .mk-filters__head, .mk-filters__search, .mk-filters form > .cd-btn, .mk-filters form > input { grid-column: 1 / -1; }
  .mk-filters .cd-field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-filters .cd-field-row, .mk-filters .cd-field { margin-bottom: 14px; }
  .mk-page .car-product-grid.mk-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-dhead { grid-template-columns: 1fr; padding-top: 20px; }
  .mk-dhead__media { max-width: 520px; }
  .mk-page .cd-side-card { max-height: none; }
  .mk-mobile-cta { margin-bottom: 8px; }
}
@media only screen and (max-width: 767.98px) {
  .mk-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; gap: 10px; }
  .mk-bar__actions .cd-btn { flex: 1 1 0; }
  .mk-resultbar h2 { font-size: 22px; }
  .mk-page .car-product-grid.mk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; row-gap: 24px; }
  .mk-service { grid-template-columns: 1fr; }
  .mk-service__img { min-height: 0; aspect-ratio: 16 / 9; }
  .mk-dl > div { grid-template-columns: 1fr; gap: 2px; }
  .mk-stats strong { font-size: 26px; }
  .mk-page.cd-page { padding-bottom: 70px; }
}
@media only screen and (max-width: 575.98px) {
  .mk-bar { grid-template-columns: 1fr; }
  .mk-page .car-product-grid.mk-grid,
  .mk-page .car-product-grid.mk-grid--2 { grid-template-columns: 1fr; }
  .mk-filters form { display: block; }
  .mk-filters { padding: 16px; }
  .mk-actions .cd-btn { flex: 1 1 100%; }
  .mk-stats li { padding-right: 16px; margin-right: 16px; }
  .mk-pagination { gap: 6px; }
  .mk-pg--nav { flex: 1 1 100%; justify-content: center; }
  .mk-pagination .mk-pg--nav:first-child { order: 0; }
  .mk-pagination__nums { order: 1; }
  .mk-scope__clear { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mk-page * { transition: none !important; }
}

/* ---------- header menu: two extra links (Find Dealer / Find Parts) must still fit on one line ---------- */
@media only screen and (min-width: 1200px) and (max-width: 1549.98px) {
  .main-menu > ul > li { margin: 0 13px; }
  .main-menu > ul > li > a { font-size: 16px; }
}
@media only screen and (min-width: 992px) and (max-width: 1199.98px) {
  .main-menu > ul > li { margin: 0 7px; }
  .main-menu > ul > li > a { font-size: 14.5px; letter-spacing: -0.1px; }
  .main-menu .v-performance-menu-item img { width: 62px; flex-basis: 62px; }
}
