/* Match Fashion Vally — final owner review corrections.
 * Loaded after the existing convergence stack. Repeated UI is normalized here
 * rather than patched independently per route. */

:root {
  --mfv-client-shell: min(92vw, 1440px);
  --mfv-client-reading: min(88vw, 1180px);
  --mfv-client-line: #ded8d2;
  --mfv-client-warm: #f7f4f1;
  --mfv-client-ink: #111;
}

/* One content shell for header, navigation and shared lower modules. */
.mfv-shell,
.mfv-global-prefooter__grid,
.mfv-instagram-feed__inner,
.mfv-help-strip > .mfv-home-finder-band,
.mfv-home-finder-band {
  width: var(--mfv-client-shell) !important;
  max-width: 1440px !important;
  margin-inline: auto !important;
  box-sizing: border-box !important;
}

@media (min-width: 1000px) {
  .ct-header [data-row="middle"] .ct-container,
  .ct-header [data-row="bottom"] .ct-container {
    width: var(--mfv-client-shell) !important;
    max-width: 1440px !important;
    margin-inline: auto !important;
  }

  .ct-header [data-row="middle"] [data-column="start"] {
    max-width: 300px !important;
  }
  .ct-header [data-row="middle"] .ct-header-search {
    width: 100% !important;
    max-width: 280px !important;
  }
  .ct-header [data-row="middle"] [data-column="end"] {
    gap: 20px !important;
  }

  .ct-header [data-row="bottom"] nav,
  .ct-header [data-row="bottom"] nav > ul {
    width: 100% !important;
  }
  .ct-header [data-row="bottom"] nav > ul {
    max-width: 1040px !important;
    margin-inline: auto !important;
    display: flex !important;
    justify-content: space-between !important;
    gap: 0 !important;
  }
  .ct-header [data-row="bottom"] nav > ul > li {
    flex: 0 1 auto !important;
  }
  .ct-header [data-row="bottom"] nav > ul > li.mfv-client-collections-menu {
    display: inline-flex !important;
    align-items: center !important;
  }
  .ct-header [data-row="bottom"] nav > ul > li > a {
    padding-inline: 12px !important;
  }
  .ct-header [data-row="bottom"] nav > ul > li.mfv-client-collections-menu > a {
    padding-right: 2px !important;
  }
  .ct-header [data-row="bottom"] nav > ul > li.mfv-client-collections-menu > .mfv-collections-toggle {
    margin-left: -4px !important;
  }
}

/* Logo is an interactive home control; JS supplies the fallback behavior if
 * the theme did not render the branding as an anchor. */
.ct-header .site-branding,
.ct-header .site-branding a,
.ct-header .site-title {
  cursor: pointer !important;
}

/* Collections dropdown — same treatment in desktop and mobile menus. */
.mfv-client-collections-menu {
  position: relative !important;
}
.mfv-collections-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 44px !important;
  min-height: 44px !important;
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  color: inherit !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}
.mfv-client-collections-submenu {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 8px 0 !important;
  background: #fff !important;
  border: 1px solid #e8e4df !important;
  min-width: 220px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.10) !important;
  z-index: 9999 !important;
}
.mfv-client-collections-submenu[hidden] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}
.mfv-client-collections-menu.is-open > .mfv-client-collections-submenu {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
.mfv-client-collections-submenu li { margin: 0 !important; padding: 0 !important; }
.mfv-client-collections-submenu a {
  display: block !important;
  padding: 10px 18px !important;
  color: #111 !important;
  background: #fff !important;
  text-decoration: none !important;
  font-size: .74rem !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
}
.mfv-client-collections-submenu a:hover,
.mfv-client-collections-submenu a:focus-visible { background: #f7f4f1 !important; }

/* Commerce CTAs — true vertical/horizontal centering everywhere. */
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product button.button,
.woocommerce a.add_to_cart_button,
.woocommerce button.single_add_to_cart_button,
.single-product .single_add_to_cart_button,
.single-product .mfv-buy-now,
.mfv-finder-results-product__btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1.1 !important;
  box-sizing: border-box !important;
}
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product button.button {
  width: 100% !important;
  min-height: 44px !important;
  padding-block: 0 !important;
}

/* Native quantity remains the authority; make its value visibly occupy the
 * center between Blocksy's minus and plus controls. */
.single-product .summary .quantity,
.woocommerce .quantity {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
}
.single-product .summary .quantity input.qty,
.woocommerce .quantity input.qty,
.woocommerce input.qty {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
  text-align: center !important;
  text-indent: 0 !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  width: 46px !important;
  min-width: 46px !important;
  max-width: 46px !important;
  padding-inline: 4px !important;
  margin-inline: auto !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  appearance: textfield !important;
  z-index: 3 !important;
}
.single-product .summary .quantity input.qty::-webkit-outer-spin-button,
.single-product .summary .quantity input.qty::-webkit-inner-spin-button { -webkit-appearance: none !important; margin: 0 !important; }

/* Reusable full-bleed lower sections with one inner shell. */
.mfv-help-strip,
.mfv-vc-newsletter,
.mfv-instagram-feed {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  box-sizing: border-box !important;
}

/* Scent-finder banner: one canonical geometry across Product, Shop, About,
 * Gift and Discovery pages. */
.mfv-help-strip.mfv-vc-scent-journey,
.mfv-help-strip:has(.mfv-home-finder-band) {
  padding: 28px 0 !important;
  margin-bottom: 28px !important;
  background: #faf7f4 !important;
}
.mfv-home-finder-band {
  display: grid !important;
  grid-template-columns: minmax(260px, .78fr) minmax(560px, 1.22fr) !important;
  align-items: center !important;
  gap: 36px !important;
}
.mfv-home-finder-band__left { min-width: 0 !important; }
.mfv-home-finder-band__steps {
  min-width: 0 !important;
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
}
.mfv-home-finder-step {
  min-width: 0 !important;
  padding: 10px 16px !important;
  border-left: 1px solid #e2ddd6 !important;
}
.mfv-home-finder-step:first-child { border-left: 0 !important; }

/* Newsletter stays aligned to the site but does not stretch into an oversized
 * form. */
.mfv-vc-newsletter__inner,
html body.single-product .mfv-vc-newsletter__inner,
body.single-product .mfv-vc-newsletter__inner,
.single-product .mfv-vc-newsletter__inner,
.woocommerce .mfv-vc-newsletter__inner,
.woocommerce-page .mfv-vc-newsletter__inner,
.mfv-vc-newsletter .mfv-vc-newsletter__inner {
  width: var(--mfv-client-reading) !important;
  max-width: 1180px !important;
  min-height: 104px !important;
  margin-inline: auto !important;
  padding: 22px 0 !important;
  display: grid !important;
  grid-template-columns: minmax(260px, .8fr) minmax(420px, 1.2fr) !important;
  gap: 36px !important;
}
.mfv-vc-newsletter__form {
  width: 100% !important;
  max-width: 680px !important;
  justify-self: end !important;
}

/* Shared editorial banners. One component rhythm, regardless of route. */
.mfv-vc-wide-cta,
.mfv-ref-wide-cta,
.mfv-vc-story,
.mfv-ref-story,
.mfv-vc-editorial-checklist,
.mfv-ref-editorial-split {
  width: var(--mfv-client-shell) !important;
  max-width: 1440px !important;
  margin-inline: auto !important;
  box-sizing: border-box !important;
}
.mfv-vc-wide-cta,
.mfv-ref-wide-cta {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  min-height: 320px !important;
  overflow: hidden !important;
}
.mfv-vc-wide-cta__media,
.mfv-ref-wide-cta .mfv-vc-wide-cta__media { min-height: 320px !important; }
.mfv-vc-wide-cta__media img,
.mfv-ref-wide-cta .mfv-vc-wide-cta__media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
.mfv-vc-wide-cta__copy,
.mfv-ref-wide-cta .mfv-vc-wide-cta__copy {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  padding: clamp(28px, 4vw, 54px) !important;
}

/* Finder progress: centered, equal steps, predictable spacing. */
.mfv-vc-finder-progress {
  padding-block: 30px !important;
}
.mfv-vc-finder-progress-bar,
.mfv-vc-finder-progress .mfv-vc-finder-progress-bar,
.mfv-vc-finder-progress ol.mfv-vc-finder-progress-bar,
ol.mfv-vc-finder-progress-bar {
  width: min(100%, 760px) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 28px !important;
  list-style: none !important;
  align-items: stretch !important;
}
.mfv-vc-finder-progress-bar li,
.mfv-vc-finder-progress .mfv-vc-finder-progress-bar li,
.mfv-vc-finder-progress ol.mfv-vc-finder-progress-bar li,
ol.mfv-vc-finder-progress-bar li {
  width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  min-height: 54px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  text-align: center !important;
  border-top: 2px solid #d8d1ca !important;
  border-bottom: 2px solid #d8d1ca !important;
  writing-mode: horizontal-tb !important;
}
.mfv-vc-finder-progress-bar li.is-active,
.mfv-vc-finder-progress-bar li.is-complete,
.mfv-vc-finder-progress ol.mfv-vc-finder-progress-bar li.is-active,
.mfv-vc-finder-progress ol.mfv-vc-finder-progress-bar li.is-complete { border-color: #111 !important; }

/* Finder result rail: never crop cards; desktop and mobile both get explicit
 * horizontal navigation plus touch/trackpad scrolling. */
.mfv-vc-finder-results {
  grid-template-columns: minmax(300px, .38fr) minmax(0, .62fr) !important;
  gap: 32px !important;
  align-items: start !important;
  overflow: hidden !important;
}
.mfv-vc-finder-results__products {
  min-width: 0 !important;
  width: 100% !important;
  position: relative !important;
  overflow: hidden !important;
}
.mfv-vc-finder-results__products > .mfv-vc-tiles,
.mfv-finder-result-rail {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 18px !important;
  width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x mandatory !important;
  scroll-behavior: smooth !important;
  overscroll-behavior-inline: contain !important;
  scrollbar-width: thin !important;
  padding-bottom: 10px !important;
}
.mfv-finder-results-product {
  flex: 0 0 min(330px, 82vw) !important;
  min-width: min(330px, 82vw) !important;
  max-width: min(330px, 82vw) !important;
  scroll-snap-align: start !important;
  box-sizing: border-box !important;
}
.mfv-finder-rail-controls {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
}
.mfv-finder-rail-controls button {
  width: 42px !important;
  height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid #111 !important;
  background: #fff !important;
  color: #111 !important;
  font-size: 20px !important;
  cursor: pointer !important;
}

/* Finder lower cadence follows the same shared spacing as other editorial
 * routes instead of becoming oversized or detached. */
.mfv-vc-page--finder .mfv-vc-wide-cta,
.mfv-vc-page--finder .mfv-vc-story,
.mfv-vc-page--finder .mfv-vc-finder-reminder {
  margin-top: 28px !important;
  margin-bottom: 28px !important;
}
.mfv-vc-page--finder .mfv-vc-finder-reminder {
  width: var(--mfv-client-reading) !important;
  max-width: 1180px !important;
  padding-block: 36px !important;
}

/* New In uses the shared Woo archive family; remove the duplicate Blocksy
 * page-title band and force result-count text back to ordinary horizontal flow. */
.mfv-route-new-in .hero-section,
.mfv-route-new-in .ct-page-title,
.mfv-route-new-in .entry-header:not(.mfv-archive-hero *) {
  display: none !important;
}
.mfv-route-new-in .mfv-shop-layout,
.tax-product_tag .mfv-shop-layout {
  display: contents !important;
}
.mfv-route-new-in .woocommerce-result-count,
.mfv-route-new-in .woocommerce .woocommerce-result-count,
.mfv-route-new-in [class*="result-count"],
.tax-product_tag .woocommerce-result-count,
.tax-product_tag [class*="result-count"] {
  grid-column: 2 !important;
  grid-row: 1 !important;
  display: block !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  transform: none !important;
  letter-spacing: .04em !important;
  white-space: normal !important;
  width: auto !important;
  min-width: 120px !important;
  height: auto !important;
  position: static !important;
  margin: .7rem 0 0 !important;
}
.mfv-route-new-in .mfv-archive-intro { margin-top: 0 !important; }
.mfv-route-new-in main,
.mfv-route-new-in .site-main { padding-top: 0 !important; }

/* Collections is a real curated route rather than an empty placeholder. */
.mfv-route-collections .hero-section,
.mfv-route-collections .ct-page-title { display: none !important; }
.mfv-collections-page { padding-block: clamp(46px, 6vw, 84px) !important; }
.mfv-collections-page h1 {
  margin: 4px 0 12px !important;
  font-family: inherit !important;
  font-size: clamp(2rem, 4vw, 3.6rem) !important;
  line-height: 1 !important;
  color: #111 !important;
}
.mfv-collections-intro { max-width: 720px !important; margin-bottom: 30px !important; }
.mfv-collections-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
}
.mfv-collection-card {
  min-height: 180px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  padding: 24px !important;
  border: 1px solid var(--mfv-client-line) !important;
  background: var(--mfv-client-warm) !important;
  color: #111 !important;
  text-decoration: none !important;
}
.mfv-collection-card strong { font-size: 1rem !important; text-transform: uppercase !important; letter-spacing: .05em !important; }
.mfv-collection-card span { margin-top: 7px !important; color: #5e5955 !important; line-height: 1.45 !important; }
.mfv-collection-card em { margin-top: 18px !important; font-style: normal !important; font-size: .72rem !important; font-weight: 700 !important; text-transform: uppercase !important; }

/* Generated policy pages share one readable family. */
.mfv-policy-page { padding-block: clamp(42px, 6vw, 80px) !important; }
.mfv-policy-page h1 { margin: 6px 0 24px !important; font-size: clamp(2rem, 4vw, 3.3rem) !important; }
.mfv-policy-copy { max-width: 820px !important; }
.mfv-policy-copy h2 { margin: 28px 0 8px !important; font-size: 1.15rem !important; }
.mfv-policy-copy p { margin: 0 0 14px !important; line-height: 1.7 !important; color: #3f3b38 !important; }
.mfv-policy-contact { margin-top: 30px !important; }
.mfv-policy-contact a { color: #111 !important; }

/* CubeGraphiX studio credit. */
.mfv-cgx-credit {
  width: 100% !important;
  border-top: 1px solid #e4dfda !important;
  background: #f4efeb !important;
  color: #6a645f !important;
  font-size: .66rem !important;
  text-align: right !important;
  padding: 8px 0 !important;
}
.mfv-cgx-credit a { color: #111 !important; font-weight: 650 !important; text-decoration: none !important; }

/* Mobile utility row injected into the native mobile panel. */
.mfv-mobile-utilities {
  display: grid !important;
  gap: 12px !important;
  padding: 16px !important;
  margin: 0 0 12px !important;
  border-bottom: 1px solid #e8e4df !important;
}
.mfv-mobile-search-form {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto !important;
  gap: 8px !important;
}
.mfv-mobile-search-form input {
  min-width: 0 !important;
  height: 42px !important;
  border: 1px solid #d9d3ce !important;
  background: #fff !important;
  padding: 0 12px !important;
}
.mfv-mobile-search-form button {
  height: 42px !important;
  border: 1px solid #111 !important;
  background: #111 !important;
  color: #fff !important;
  padding: 0 14px !important;
  font-weight: 700 !important;
}
.mfv-mobile-utility-links {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0,1fr)) !important;
  gap: 8px !important;
}
.mfv-mobile-utility-links a {
  min-height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid #ddd7d1 !important;
  color: #111 !important;
  text-decoration: none !important;
  font-size: .72rem !important;
  font-weight: 650 !important;
  text-transform: uppercase !important;
}

@media (max-width: 999px) {
  :root { --mfv-client-shell: min(92vw, 720px); --mfv-client-reading: min(92vw, 680px); }

  .ct-header [data-row="middle"] .ct-container,
  .ct-header [data-row="bottom"] .ct-container {
    width: var(--mfv-client-shell) !important;
    margin-inline: auto !important;
  }

  .mfv-home-finder-band {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }
  .mfv-home-finder-band__left {
    max-width: 520px !important;
    margin-inline: auto !important;
    text-align: center !important;
  }
  .mfv-home-finder-band__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0 !important;
  }
  .mfv-home-finder-step:nth-child(odd) { border-left: 0 !important; }

  .mfv-vc-newsletter__inner,
  .mfv-vc-newsletter .mfv-vc-newsletter__inner {
    width: var(--mfv-client-reading) !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    text-align: left !important;
  }
  .mfv-vc-newsletter__form { max-width: none !important; justify-self: stretch !important; }

  .mfv-vc-wide-cta,
  .mfv-ref-wide-cta {
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
  }
  .mfv-vc-wide-cta__media,
  .mfv-ref-wide-cta .mfv-vc-wide-cta__media { min-height: 240px !important; }

  .mfv-vc-finder-progress-bar {
    width: 100% !important;
    gap: 8px !important;
  }
  .mfv-vc-finder-progress-bar li {
    min-height: 48px !important;
    gap: 6px !important;
    font-size: .65rem !important;
  }

  .mfv-vc-finder-results {
    display: block !important;
    overflow: visible !important;
  }
  .mfv-vc-finder-results__products { margin-top: 24px !important; overflow: visible !important; }

  .mfv-collections-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

  .single-product .summary .quantity {
    width: 132px !important;
    min-width: 132px !important;
    max-width: 132px !important;
    margin-right: auto !important;
  }
}

@media (max-width: 560px) {
  .mfv-home-finder-band__steps { grid-template-columns: 1fr !important; }
  .mfv-home-finder-step { border-left: 0 !important; border-top: 1px solid #e2ddd6 !important; }
  .mfv-home-finder-step:first-child { border-top: 0 !important; }

  .mfv-vc-newsletter__form { grid-template-columns: 1fr !important; }
  .mfv-vc-newsletter__form button { width: 100% !important; min-width: 0 !important; }

  .mfv-vc-finder-progress-bar { gap: 5px !important; }
  .mfv-vc-finder-progress-bar li {
    flex-direction: column !important;
    padding: 8px 4px !important;
    line-height: 1.15 !important;
  }

  .mfv-collections-grid { grid-template-columns: 1fr !important; }
  .mfv-mobile-utility-links { grid-template-columns: 1fr !important; }
  .mfv-cgx-credit { text-align: center !important; }
}
