/* Catalog (mf-catalog). Every value reads --mf-cat-* set by an Elementor control,
   with the brand token as fallback, so an untouched widget IS the design.
   Selectors are prefixed with .mf-cat so they outrank Hello Elementor's own
   `[type=button]` / `input[type=search]` rules by specificity, never !important. */

.mf-cat [hidden] { display: none !important; } /* the one allowed !important: see playbook, [hidden] vs display */
.mf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.mf-cat {
  background: var(--mf-cat-bg, var(--mf-cream));
  color: var(--mf-ink);
  font-family: var(--mf-font-sans);
  scroll-margin-top: 90px;
}
.mf-cat__frame {
  max-width: var(--mf-cat-frame-max, var(--mf-frame-max, 1320px));
  margin-inline: auto;
  padding: var(--mf-cat-pad, 52px var(--mf-frame-gutter, 16px) 90px);
  box-sizing: border-box;
}
@media (min-width: 640px) { .mf-cat__frame { padding: var(--mf-cat-pad, 56px var(--mf-frame-gutter, 24px) 88px); } }

.mf-cat__intro { display: flex; justify-content: var(--mf-cat-intro-align, center); text-align: center; margin-bottom: 28px; }
.mf-cat__intro .mf-intro { max-width: 720px; }
.mf-cat__intro .mf-intro__standfirst, .mf-cat__intro .mf-intro__heading { margin-inline: auto; }
.mf-cat__intro .mf-intro__eyebrow { justify-content: center; }

/* ------------------------------------------------------------ filter bar -- */
.mf-cat__bar {
  background: color-mix(in srgb, var(--mf-cat-bar-bg, var(--mf-cream)) 94%, transparent);
  border-bottom: 1px solid var(--mf-cat-line, var(--mf-hair));
  padding: 12px 0;
  margin-bottom: 22px;
  z-index: 50;
}
.mf-cat__bar.is-sticky { position: sticky; top: var(--mf-cat-top, 0px); }
.mf-cat__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.mf-cat__tabs { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }

.mf-cat .mf-cat__tab {
  padding: 10px 18px; margin: 0;
  border-radius: var(--mf-radius-pill, 999px);
  border: 1.5px solid var(--mf-cat-line, var(--mf-hair));
  background: var(--mf-cat-tab-bg, var(--mf-card));
  color: var(--mf-cat-tab-fg, var(--mf-forest));
  font: 600 15px/1.2 var(--mf-font-sans);
  cursor: pointer;
  transition: background-color var(--mf-dur-fast, 200ms) var(--mf-ease-out), color var(--mf-dur-fast, 200ms) var(--mf-ease-out);
}
.mf-cat .mf-cat__tab span { font-weight: 500; opacity: .6; margin-left: 4px; font-size: .85em; }
.mf-cat .mf-cat__tab:hover { background: var(--mf-cat-tab-bg, var(--mf-card)); color: var(--mf-cat-tab-fg, var(--mf-forest)); border-color: var(--mf-cat-tab-on-bg, var(--mf-forest)); }
.mf-cat .mf-cat__tab.is-on,
.mf-cat .mf-cat__tab.is-on:hover { background: var(--mf-cat-tab-on-bg, var(--mf-forest)); border-color: var(--mf-cat-tab-on-bg, var(--mf-forest)); color: var(--mf-cat-tab-on-fg, var(--mf-card)); }

.mf-cat .mf-cat__cartbtn {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  height: 46px; padding: 0 18px 0 16px; margin: 0;
  border: 0; border-radius: var(--mf-radius-pill, 999px);
  background: var(--mf-saffron); color: #fff;
  font: 700 15px/1 var(--mf-font-sans);
  box-shadow: var(--mf-shadow-saffron-glow);
  cursor: pointer;
}
.mf-cat .mf-cat__cartbtn:hover { background: var(--mf-saffron); color: #fff; filter: brightness(1.06); }
.mf-cat__cartico { width: 19px; height: 19px; }
.mf-count {
  min-width: 24px; height: 24px; padding: 0 7px; box-sizing: border-box;
  display: inline-grid; place-items: center;
  border-radius: 999px; background: #fff; color: var(--mf-saffron);
  font: 800 13px/1 var(--mf-font-sans);
}

.mf-cat__tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mf-cat__occ { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mf-cat__occlbl { font: 600 12px/1.4 var(--mf-font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--mf-body); margin-right: 4px; }
.mf-cat .mf-cat__chip {
  padding: 6px 14px; margin: 0;
  border-radius: 999px; border: 1px solid var(--mf-cat-line, var(--mf-hair));
  background: transparent; color: var(--mf-ink);
  font: 500 14px/1.3 var(--mf-font-sans); cursor: pointer;
}
.mf-cat .mf-cat__chip:hover { background: transparent; color: var(--mf-ink); border-color: var(--mf-cat-chip-on-bg, var(--mf-saffron)); }
.mf-cat .mf-cat__chip.is-on,
.mf-cat .mf-cat__chip.is-on:hover { background: var(--mf-cat-chip-on-bg, var(--mf-saffron)); border-color: var(--mf-cat-chip-on-bg, var(--mf-saffron)); color: #fff; }

.mf-cat__selects { display: none; }
.mf-cat__sel { position: relative; display: block; min-width: 0; margin: 0; }
.mf-cat .mf-cat__sel select {
  width: 100%; height: 46px; margin: 0;
  padding: 0 34px 0 14px;
  border-radius: 999px; border: 1.5px solid var(--mf-cat-line, var(--mf-hair));
  background: var(--mf-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23123D1B' stroke-width='2.2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  -webkit-appearance: none; appearance: none;
  font: 600 15px/1.2 var(--mf-font-sans); color: var(--mf-forest);
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
}
.mf-cat .mf-cat__sel.is-set select {
  background-color: var(--mf-cat-tab-on-bg, var(--mf-forest)); border-color: var(--mf-cat-tab-on-bg, var(--mf-forest)); color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.mf-cat .mf-cat__sel--occ.is-set select { background-color: var(--mf-cat-chip-on-bg, var(--mf-saffron)); border-color: var(--mf-cat-chip-on-bg, var(--mf-saffron)); }

.mf-cat__search { position: relative; flex: 0 1 300px; margin: 0; }
.mf-cat__searchico { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--mf-body); pointer-events: none; }
.mf-cat .mf-cat__search input {
  width: 100%; height: 44px; margin: 0; box-sizing: border-box;
  padding: 0 16px 0 42px;
  border-radius: 999px; border: 1.5px solid var(--mf-cat-line, var(--mf-hair));
  background: var(--mf-card); color: var(--mf-ink);
  font: 400 16px/1.2 var(--mf-font-sans);
}
.mf-cat .mf-cat__search input:focus { border-color: var(--mf-forest); outline: none; }

/* ------------------------------------------------------------------ grid -- */
.mf-cat__grid {
  display: grid;
  grid-template-columns: repeat(var(--mf-cat-cols, 4), minmax(0, 1fr));
  gap: var(--mf-cat-gap, 20px);
}
.mf-cat__card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--mf-cat-card-bg, var(--mf-card));
  border: 1px solid var(--mf-cat-line, var(--mf-hair));
  border-radius: var(--mf-cat-card-radius, var(--mf-radius-card, 18px));
  transition: transform 350ms var(--mf-ease-out), box-shadow 350ms var(--mf-ease-out);
}
.mf-cat__card:hover { transform: translateY(-4px); box-shadow: var(--mf-cat-card-hover, var(--mf-shadow-card-hover)); }
.mf-cat__card.is-hide { display: none; }
.mf-cat__media { background: var(--mf-cat-media-bg, var(--mf-panel)); overflow: hidden; }
.mf-cat .mf-cat__img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 1 / 1; object-fit: cover;
  transition: transform 600ms var(--mf-ease-out);
}
.mf-cat .mf-cat__card:hover .mf-cat__img { transform: scale(1.05); }
.mf-cat__noimg { aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--mf-gold); }
.mf-cat__noimgico { width: 40px; height: 40px; }
.mf-cat__noimg small { font: 600 11px/1.3 var(--mf-font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--mf-body); }

.mf-cat__body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: var(--mf-cat-card-pad, 16px 16px 18px); }
.mf-cat__sku { font: 600 11px/1.3 var(--mf-font-sans); letter-spacing: .14em; color: var(--mf-cat-sku, var(--mf-saffron)); }
.mf-cat .mf-cat__title {
  margin: 0; color: var(--mf-cat-title, var(--mf-forest));
  font-family: var(--mf-font-display); font-weight: 500; font-size: var(--mf-type-h3-size, 18px); line-height: 1.2; letter-spacing: 0;
}
.mf-cat__desc { margin: 0; font-size: 14px; line-height: 1.45; color: var(--mf-cat-desc, var(--mf-body)); }
.mf-cat__price { font: 700 16px/1.3 var(--mf-font-sans); color: var(--mf-cat-price, var(--mf-ink)); }
.mf-cat__price .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mf-cat__price .mf-price-soon { font-weight: 500; font-size: 14px; color: var(--mf-cat-soon, var(--mf-body)); font-style: italic; }

.mf-cat__opts { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.mf-cat__sizes { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--mf-cat-size-track, var(--mf-panel)); }
.mf-cat .mf-cat__size {
  margin: 0; padding: 5px 11px; border: 0; border-radius: 999px;
  background: transparent; color: var(--mf-body);
  font: 600 13px/1.2 var(--mf-font-sans); white-space: nowrap; cursor: pointer;
}
.mf-cat .mf-cat__size:hover { background: transparent; color: var(--mf-forest); }
.mf-cat .mf-cat__size.is-on,
.mf-cat .mf-cat__size.is-on:hover { background: var(--mf-cat-size-on-bg, var(--mf-card)); color: var(--mf-cat-size-on-fg, var(--mf-forest)); box-shadow: 0 1px 4px rgb(0 0 0 / .12); }
.mf-cat__note { font: 600 13px/1.2 var(--mf-font-sans); color: var(--mf-body); background: var(--mf-cat-size-track, var(--mf-panel)); border-radius: 999px; padding: 8px 12px; }

.mf-cat__qty { display: flex; align-items: center; border: 1px solid var(--mf-cat-line, var(--mf-hair)); border-radius: 999px; overflow: hidden; }
.mf-cat .mf-cat__qty button {
  display: grid; place-items: center; width: 32px; height: 32px; margin: 0; padding: 0;
  border: 0; border-radius: 0; background: transparent; color: var(--mf-cat-qty-fg, var(--mf-forest)); cursor: pointer;
}
.mf-cat .mf-cat__qty button:hover { background: var(--mf-panel); color: var(--mf-cat-qty-fg, var(--mf-forest)); }
.mf-cat__qty svg { width: 15px; height: 15px; }
.mf-cat .mf-cat__qty input {
  width: 34px; height: 32px; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: transparent; text-align: center;
  font: 600 15px/1 var(--mf-font-sans); color: var(--mf-cat-qty-fg, var(--mf-forest));
  -moz-appearance: textfield;
}
.mf-cat__qty input::-webkit-outer-spin-button, .mf-cat__qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.mf-cat .mf-cat__add {
  width: 100%; margin: 6px 0 0; padding: 12px 14px;
  border: 0; border-radius: 999px;
  background: var(--mf-forest); color: #fff;
  font: 600 15px/1.2 var(--mf-font-sans); letter-spacing: .01em;
  cursor: pointer;
  transition: background-color var(--mf-dur-fast, 200ms) var(--mf-ease-out), transform 150ms var(--mf-ease-out);
}
.mf-cat .mf-cat__add:hover { background: var(--mf-deep); color: #fff; }
.mf-cat .mf-cat__add:active { transform: scale(.97); }
.mf-cat .mf-cat__add.is-added { background: var(--mf-cat-added-bg, var(--mf-saffron)); }
.mf-cat .mf-cat__add:disabled,
.mf-cat .mf-cat__add:disabled:hover { background: var(--mf-panel); color: var(--mf-body); cursor: not-allowed; transform: none; }
.mf-cat .mf-cat__add.is-busy { opacity: .65; pointer-events: none; }
.mf-cat__err { margin: 4px 0 0; font-size: 13px; color: var(--mf-danger); }
.mf-cat__empty { text-align: center; color: var(--mf-body); padding: 40px 0; }

/* Fallbacks match the control's tablet/mobile defaults (Elementor breakpoints 1024 / 767). */
@media (max-width: 1024px) { .mf-cat__grid { grid-template-columns: repeat(var(--mf-cat-cols, 3), minmax(0, 1fr)); } }
@media (max-width: 767px)  { .mf-cat__grid { grid-template-columns: repeat(var(--mf-cat-cols, 2), minmax(0, 1fr)); gap: var(--mf-cat-gap, 12px); } }

/* ---------------------------------------------------------------- phones -- */
@media (max-width: 820px) {
  /* Row 1: search + cart. Row 2: two equal dropdowns. Nothing scrolls sideways. */
  .mf-cat__bar { display: grid; grid-template-columns: 1fr; grid-template-areas: "s" "m"; gap: 8px; margin-inline: calc(-1 * var(--mf-frame-gutter, 16px)); padding: 10px var(--mf-frame-gutter, 16px); }
  .mf-cat__row, .mf-cat__tools { display: contents; }
  .mf-cat__tabs, .mf-cat__occ { display: none; }
  .mf-cat__search { grid-area: s; flex: none; }
  .mf-cat .mf-cat__search input { height: 46px; }
  .mf-cat__selects { grid-area: m; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .mf-cat__selects .mf-cat__sel:only-child { grid-column: 1 / -1; }
  .mf-cat__body { padding: var(--mf-cat-card-pad, 12px 12px 14px); gap: 6px; }
  .mf-cat .mf-cat__title { font-size: var(--mf-type-h3-size, 16px); }
  .mf-cat__desc { display: none; }
  .mf-cat__opts { flex-direction: column; align-items: stretch; }
  .mf-cat__sizes { justify-content: center; }
  .mf-cat .mf-cat__size { flex: 1; padding: 5px 6px; font-size: 12px; }
  .mf-cat__note { text-align: center; }
  .mf-cat__qty { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .mf-cat__card, .mf-cat__img { transition: none; }
  .mf-cat__card:hover, .mf-cat .mf-cat__card:hover .mf-cat__img { transform: none; }
}
