.md-home-categories {
  margin-top: 52px;
}

.md-home-categories__head {
  display: flex;
  margin-bottom: 18px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.md-home-categories__eyebrow,
.md-home-price-quiz__eyebrow,
.md-home-light-kit__eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  align-items: center;
  gap: 8px;
  color: var(--brand-blue, #2f2f83);
  font: 700 12px/1.2 var(--font-body, Inter, sans-serif);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.md-home-categories__eyebrow i,
.md-home-price-quiz__eyebrow i,
.md-home-light-kit__eyebrow i {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--brand-red, #de0d1a);
}

.md-home-categories h2,
.md-home-price-quiz h2,
.md-home-light-kit h2 {
  margin: 0;
  color: var(--ink, #262626);
  font: 700 clamp(25px, 2vw, 32px)/1.1 var(--font-display, Georgia, serif);
}

.md-home-categories__head > p {
  max-width: 520px;
  margin: 0;
  color: var(--text, #424242);
  font-size: 14px;
  line-height: 1.5;
}

.md-home-category-grid {
  display: flex;
  padding: 10px;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
  border: 1px solid var(--border, #ebe7e4);
  border-radius: 14px;
  background: #fff;
}

.md-home-category {
  position: relative;
  display: flex;
  width: clamp(82px, 8.5vw, 128px);
  height: 78px;
  padding: 8px;
  overflow: hidden;
  align-items: flex-end;
  border: 1px solid rgba(38, 38, 38, .12);
  border-radius: 9px;
  background: #f4f1ed;
  color: var(--ink, #262626) !important;
  isolation: isolate;
  text-decoration: none !important;
}

.md-home-category:nth-of-type(9n + 3),
.md-home-category:nth-of-type(9n + 7) {
  width: clamp(112px, 12vw, 176px);
}

.md-home-category img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .18s ease;
}

.md-home-category::after {
  position: absolute;
  z-index: -1;
  inset: 25% 0 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, .22));
  content: "";
}

.md-home-category:hover img {
  transform: scale(1.035);
}

.md-home-category__label {
  display: inline-block;
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 1px 4px rgba(20, 21, 33, .12);
  font: 750 10px/1.15 var(--font-body, Inter, sans-serif);
}

.md-home-category--all {
  align-items: flex-end;
  border-color: #23b96d;
  background: #fff;
}

.md-home-category--all::after {
  display: none;
}

.md-home-category--all .md-home-category__label {
  padding-inline: 0;
  background: transparent;
  box-shadow: none;
}

.md-home-category__check {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  background: #23b96d;
  color: #fff;
  font: 800 11px/1 sans-serif;
}

.md-home-category--extra {
  display: none;
}

.md-home-category-grid.is-expanded .md-home-category--extra {
  display: flex;
}

.md-home-category-more {
  display: flex;
  min-width: 100px;
  min-height: 78px;
  padding: 10px 14px;
  border: 1px solid var(--border, #ebe7e4);
  border-radius: 9px;
  background: var(--surface, #faf8f6);
  color: var(--ink, #262626);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  text-decoration: none !important;
  font: 700 11px/1.2 var(--font-body, Inter, sans-serif);
}

.md-home-stock-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--border, #ebe7e4);
  border-radius: 14px;
  background: #fff;
}

.md-home-stock-card__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--surface, #faf8f6);
}

.md-home-stock-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .18s ease;
}

.md-home-stock-card:hover .md-home-stock-card__media img { transform: scale(1.015); }

.md-home-stock-card__body {
  display: flex;
  min-height: 230px;
  padding: 16px;
  flex: 1;
  flex-direction: column;
}

.md-home-stock-card__status {
  display: flex;
  min-height: 28px;
  align-items: center;
  gap: 7px;
  color: var(--sage-text, #2e4b33);
  font: 700 12px/1.3 var(--font-body, Inter, sans-serif);
}

.md-home-stock-card__status span {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--sale-green, #2fbe6b);
}

.md-home-stock-card h3 {
  margin: 10px 0 0;
  font: 700 18px/1.25 var(--font-display, Georgia, serif);
}

.md-home-stock-card h3 a { color: var(--ink, #262626); }
.md-home-stock-card__article { margin-top: 5px; color: var(--muted, #6f7280); font-size: 12px; }
.md-home-stock-card__price-row { display: flex; margin-top: 14px; align-items: baseline; justify-content: space-between; gap: 10px; }
.md-home-stock-card__price-row strong { color: var(--ink, #262626); font-size: 18px; }
.md-home-stock-card__price-row span { color: var(--muted, #6f7280); font-size: 12px; text-align: right; }

.md-home-stock-card__footer {
  display: grid;
  margin-top: auto;
  padding-top: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border, #ebe7e4);
}

.md-home-stock-card__footer > span { color: var(--muted, #6f7280); font-size: 12px; line-height: 1.4; }
.md-home-stock-card__footer > a {
  display: inline-flex;
  min-height: 44px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--ink, #262626);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.md-home-stock-card a:focus-visible { outline: 3px solid rgba(47, 47, 131, .25); outline-offset: 2px; }

.md-home-category:focus-visible,
.md-home-category-more:focus-visible,
.md-home-price-quiz button:focus-visible,
.md-home-price-quiz__cta:focus-visible,
.md-home-light-kit__card:focus-visible,
.md-home-light-kit__chip:focus-visible {
  outline: 3px solid rgba(47, 47, 131, .25);
  outline-offset: 2px;
}

.md-home-price-quiz {
  display: grid;
  margin-top: 26px;
  padding: 24px 28px;
  grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: 28px;
  border: 1px solid var(--border, #ebe7e4);
  border-radius: 14px;
  background: #fff;
}

.md-home-price-quiz__copy p {
  margin: 8px 0 0;
  color: var(--muted, #6f7280);
  font-size: 12px;
  line-height: 1.45;
}

.md-home-price-quiz__actions {
  min-width: 0;
}

.md-home-price-quiz__options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.md-home-price-quiz__options button {
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid var(--border, #ebe7e4);
  border-radius: 8px;
  background: #fff;
  color: var(--ink, #262626);
  cursor: pointer;
  font: 700 12px/1.25 var(--font-body, Inter, sans-serif);
}

.md-home-price-quiz__options button.is-active {
  border-color: var(--brand-blue, #2f2f83);
  background: rgba(47, 47, 131, .055);
  box-shadow: inset 0 0 0 1px var(--brand-blue, #2f2f83);
  color: var(--brand-blue, #2f2f83);
}

.md-home-price-quiz__cta {
  display: inline-flex;
  margin-top: 11px;
  align-items: center;
  gap: 5px;
  color: var(--brand-blue, #2f2f83) !important;
  font: 750 12px/1.3 var(--font-body, Inter, sans-serif);
  text-decoration: none !important;
}

.md-home-light-kit {
  margin-top: 34px;
  scroll-margin-top: 96px;
}

.md-home-light-kit__head {
  display: flex;
  margin-bottom: 16px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.md-home-light-kit__chips {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.md-home-light-kit__chip {
  appearance: none;
  border: 1px solid var(--border, #ebe7e4);
  border-radius: 999px;
  background: #fff;
  color: var(--ink, #262626);
  min-height: 41px;
  padding: 0 14px;
  cursor: pointer;
  font: 700 14px/1.2 var(--font-body, Inter, sans-serif);
  transition: border-color var(--motion-fast), background-color var(--motion-fast), color var(--motion-fast);
}

.md-home-light-kit__chip.is-active {
  border-color: var(--brand-blue, #2f2f83);
  background: var(--brand-blue, #2f2f83);
  color: #fff;
}

.md-home-light-kit__grid {
  display: flex;
  gap: 12px;
  height: 450px;
}

.md-home-light-kit__card {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  flex: 1 1 0;
  min-width: 60px;
  border: 1px solid rgba(38, 38, 38, .12);
  border-radius: 8px;
  background: var(--surface, #faf8f6);
  color: #fff !important;
  text-decoration: none !important;
  transition: flex .5s cubic-bezier(.4, 0, .2, 1), box-shadow .2s ease, border-color .2s ease;
}

.md-home-light-kit__card:hover,
.md-home-light-kit__card:focus-visible,
.md-home-light-kit__card.is-open {
  flex: 4.4;
  border-color: rgba(47, 47, 131, .34);
  box-shadow: 0 16px 34px rgba(38, 38, 38, .09);
}

.md-home-light-kit__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  transition: transform .2s ease;
}

.md-home-light-kit__media::after {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(transparent, rgba(0, 0, 0, .22));
  content: "";
}

.md-home-light-kit__card:hover .md-home-light-kit__media,
.md-home-light-kit__card:focus-visible .md-home-light-kit__media,
.md-home-light-kit__card.is-open .md-home-light-kit__media {
  transform: scale(1.02);
}

.md-home-light-kit__closed {
  position: absolute;
  inset: auto auto 18px 50%;
  transform: translateX(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .06em;
  white-space: nowrap;
  z-index: 1;
}

.md-home-light-kit__card:hover .md-home-light-kit__closed,
.md-home-light-kit__card:focus-visible .md-home-light-kit__closed,
.md-home-light-kit__card.is-open .md-home-light-kit__closed {
  display: none;
}

.md-home-light-kit__body {
  position: absolute;
  inset: 0;
  z-index: 1;
  min-width: 0;
  display: none;
  padding: 60px 22px 20px;
  align-items: flex-end;
  justify-content: flex-end;
  flex-direction: column;
  gap: 10px;
}

.md-home-light-kit__card:hover .md-home-light-kit__body,
.md-home-light-kit__card:focus-visible .md-home-light-kit__body,
.md-home-light-kit__card.is-open .md-home-light-kit__body {
  display: flex;
}

.md-home-light-kit__name {
  color: #fff;
  font: 800 20px/1.15 var(--font-body, Inter, sans-serif);
}

.md-home-light-kit__text {
  color: rgba(255, 255, 255, .88);
  font-size: 13px;
  line-height: 1.45;
  max-width: 72%;
}

.md-home-light-kit__action {
  display: inline-flex;
  margin-top: 4px;
  align-items: center;
  gap: 6px;
  color: #fff;
  font: 800 12px/1.2 var(--font-body, Inter, sans-serif);
  text-transform: uppercase;
  letter-spacing: .04em;
}

@media (max-width: 960px) {
  .md-home-categories__head,
  .md-home-price-quiz,
  .md-home-light-kit__head {
    grid-template-columns: 1fr;
  }

  .md-home-categories__head,
  .md-home-light-kit__head {
    display: grid;
    align-items: start;
    gap: 10px;
  }

  .md-home-price-quiz {
    gap: 18px;
  }

  .md-home-light-kit__chips {
    margin-top: 2px;
  }

  .md-home-light-kit__grid {
    height: 390px;
  }
}

@media (max-width: 620px) {
  .md-home-categories {
    margin-top: 34px;
  }

  .md-home-category-grid {
    padding: 7px;
    gap: 6px;
  }

  .md-home-category,
  .md-home-category:nth-of-type(9n + 3),
  .md-home-category:nth-of-type(9n + 7) {
    width: calc(33.333% - 4px);
    min-width: 0;
    height: 70px;
  }

  .md-home-category-more {
    width: calc(33.333% - 4px);
    min-width: 0;
    min-height: 70px;
  }

  .md-home-price-quiz {
    padding: 20px 16px;
  }

  .md-home-price-quiz__options {
    grid-template-columns: 1fr;
  }

  .md-home-light-kit {
    margin-top: 28px;
  }

  .md-home-light-kit__card {
    display: grid;
    min-height: 136px;
    grid-template-columns: 112px minmax(0, 1fr);
    flex: 1 1 auto;
  }

  .md-home-light-kit__grid {
    display: grid;
    gap: 10px;
    height: auto;
  }

  .md-home-light-kit__card:hover,
  .md-home-light-kit__card:focus-visible,
  .md-home-light-kit__card.is-open {
    flex: 1 1 auto;
    box-shadow: 0 10px 24px rgba(38, 38, 38, .05);
  }

  .md-home-light-kit__media {
    position: relative;
    inset: auto;
    min-height: 136px;
    z-index: 0;
  }

  .md-home-light-kit__media::after {
    position: absolute;
  }

  .md-home-light-kit__closed {
    display: none;
  }

  .md-home-light-kit__body {
    position: relative;
    inset: auto;
    padding: 14px;
    display: flex !important;
    justify-content: center;
  }

  .md-home-light-kit__name {
    font-size: 19px;
  }

  .md-home-light-kit__text {
    font-size: 12px;
    max-width: none;
  }

  .md-home-light-kit__action {
    margin-top: 2px;
  }

  .md-home-light-kit__chips {
    width: 100%;
  }

  .md-home-light-kit__chip {
    min-height: 39px;
    font-size: 13px;
  }

  .md-home-light-kit {
    margin-top: 28px;
  }

  .md-home-light-kit__grid {
    display: grid;
    gap: 10px;
    min-height: 136px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .md-home-category img,
  .md-home-light-kit__card,
  .md-home-light-kit__media {
    transition: none;
  }
}

/* homepage category reference geometry 2026-08-18 */
@media (min-width: 1024px) {
  .md-home-category-grid:not(.is-expanded) {
    flex-wrap: nowrap;
  }

  .md-home-category-grid:not(.is-expanded) .md-home-category {
    width: auto;
    min-width: 0;
    flex: 1 1 0;
  }

  .md-home-category-grid:not(.is-expanded) .md-home-category-more {
    min-width: 100px;
    flex: 0 0 100px;
  }
}

@media (max-width: 767px) {
  .md-home-category-grid,
  .md-home-category-grid:not(.is-expanded) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .md-home-category,
  .md-home-category:nth-of-type(9n + 3),
  .md-home-category:nth-of-type(9n + 7),
  .md-home-category-more {
    width: 100%;
    min-width: 0;
  }

  .md-home-category { height: 78px; }
  .md-home-category-more { min-height: 78px; }
}

@media (max-width: 520px) {
  .md-home-stock-card__body {
    min-height: 245px;
    padding: 10px;
  }

  .md-home-stock-card__status {
    min-height: 30px;
    gap: 5px;
    font-size: 10px;
    line-height: 1.25;
  }

  .md-home-stock-card__status span {
    width: 6px;
    height: 6px;
  }

  .md-home-stock-card h3 {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 7px;
    font-size: 14px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .md-home-stock-card__article {
    margin-top: 4px;
    font-size: 10px;
  }

  .md-home-stock-card__price-row {
    display: block;
    margin-top: 9px;
  }

  .md-home-stock-card__price-row strong {
    display: block;
    font-size: 15px;
    line-height: 1.25;
  }

  .md-home-stock-card__price-row span {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    line-height: 1.3;
    text-align: left;
  }

  .md-home-stock-card__footer {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding-top: 9px;
  }

  .md-home-stock-card__footer > span {
    overflow-wrap: anywhere;
    font-size: 10px;
    line-height: 1.3;
  }

  .md-home-stock-card__footer > a {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    padding-inline: 8px;
    font-size: 12px;
  }
}
