:root {
  --font-sans: "Lato", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Montserrat", "Lato", ui-sans-serif, system-ui, sans-serif;
  --mm-ink: #1c1a18;
  --mm-muted: #89837b;
  --mm-line: #ece7e1;
  --mm-tile: #efeeed;
  --mm-accent: #bd5400;
  --mm-paper: #fff;
}

body.home-page {
  min-width: 320px;
  background: #f5f4f2;
  color: var(--mm-ink);
  font-family: var(--font-sans);
}

body.home-page > :not(#mm-app):not(.mm-bottom-nav):not(.cart-toast):not(.cart-flying-image) {
  display: none !important;
}

html body.home-page > #mm-app {
  display: block !important;
}

body.home-page > .mm-bottom-nav {
  display: flex !important;
}

body.home-page::before {
  display: none !important;
  content: none !important;
}

#mm-app,
#mm-app * {
  box-sizing: border-box;
}

#mm-app {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 16px calc(84px + env(safe-area-inset-bottom, 0px));
  background: var(--mm-paper);
  font-size: 14px;
}

.mm-header {
  display: contents;
}

.mm-desktop-nav {
  display: none;
}

#mm-app button,
#mm-app input {
  color: inherit;
  font: inherit;
}

#mm-app button {
  cursor: pointer;
}

.mm-brand {
  display: inline-flex;
  align-items: center;
  padding: 18px 0 14px;
  color: var(--mm-ink);
  text-decoration: none;
}

.mm-brand img {
  display: block;
  width: 120px;
  height: 40px;
  object-fit: contain;
}

.mm-topline,
.mm-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mm-topline {
  justify-content: space-between;
}

.mm-profile {
  color: var(--mm-muted);
  font-size: .75rem;
  text-decoration: none;
}

.mm-search-row {
  margin-top: 8px;
}

.mm-searchbox {
  display: flex;
  flex: 1;
  min-width: 0;
  height: 50px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--mm-line);
  border-radius: 10px;
}

.mm-searchbox svg,
.mm-cart-shortcut svg {
  width: 22px;
  height: 22px;
  flex: none;
}

.mm-searchbox svg {
  color: var(--mm-muted);
}

.mm-cart-shortcut svg {
  color: #fff;
}

.mm-searchbox input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
}

.mm-searchbox input::placeholder {
  color: #aaa49c;
}

.mm-cart-shortcut {
  position: relative;
  display: grid;
  width: 50px;
  height: 50px;
  flex: none;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--mm-ink);
  color: #fff !important;
  text-decoration: none;
}

.mm-cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 19px;
  padding: 2px 5px;
  border-radius: 99px;
  background: var(--mm-accent);
  color: #fff;
  font-size: .68rem;
  text-align: center;
}

.mm-promo {
  position: relative;
  aspect-ratio: 543 / 191;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 14px;
  background: #f0efee;
}

.mm-promo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mm-promo-copy a,
.mm-add-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--mm-accent);
  color: #fff !important;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
}

.mm-product-card .mm-add-button {
  display: flex;
  width: 100%;
  margin-top: 9px;
}

.mm-category-strip {
  display: flex;
  gap: 14px;
  margin: 20px -16px 0;
  overflow-x: auto;
  padding: 0 16px 4px;
  scrollbar-width: none;
}

.mm-category-strip::-webkit-scrollbar {
  display: none;
}

.mm-category {
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--mm-muted) !important;
  font-size: .72rem !important;
  font-weight: 600 !important;
  text-align: center;
}

.mm-category-image {
  display: grid;
  width: 60px;
  height: 60px;
  margin: 0 auto 6px;
  overflow: hidden;
  place-items: center;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--mm-tile);
}

.mm-category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mm-category.is-active {
  color: var(--mm-accent) !important;
}

.mm-category.is-active .mm-category-image {
  border-color: var(--mm-accent);
}

.mm-section-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 22px 0 14px;
}

.mm-section-title h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.mm-section-title span {
  color: var(--mm-muted);
  font-size: .7rem;
}

.mm-product-tools {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mm-sort-label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--mm-muted);
  font-size: .7rem;
}

.mm-sort-label select {
  width: min(210px, 58vw);
  min-width: 0;
  height: 38px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--mm-line);
  border-radius: 8px;
  background: #fff;
  color: var(--mm-ink);
  font: inherit;
}

.mm-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 12px;
}

.mm-product-card {
  position: relative;
  min-width: 0;
}

.mm-wish-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 88%);
  color: var(--mm-ink);
  font-size: 1.2rem !important;
  line-height: 1;
}

.mm-wish-toggle.is-saved {
  color: var(--mm-accent);
}

.mm-product-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.mm-product-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(#f0efee, #e0deda);
}

.mm-product-image img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 8px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.mm-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--mm-ink);
  color: #fff;
  font-size: .62rem;
}

.mm-price {
  margin: 8px 0 0;
  font-size: .88rem;
  font-weight: 700;
}

.mm-product-name {
  display: block;
  width: 100%;
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--mm-muted);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mm-bottom-nav {
  position: fixed;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: min(430px, 100%);
  margin: 0 auto;
  border-top: 1px solid var(--mm-line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #fff;
}

.mm-bottom-nav button {
  display: grid;
  min-height: 60px;
  flex: 1;
  place-items: center;
  border: 0;
  background: none;
  color: var(--mm-ink);
}

.mm-bottom-nav button.is-active {
  color: var(--mm-accent);
}

.mm-bottom-nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

@media (min-width: 600px) {
  #mm-app {
    margin: 24px auto;
    min-height: calc(100vh - 48px);
    box-shadow: 0 12px 45px rgb(29 25 21 / 8%);
  }
}

@media (min-width: 801px) {
  body.home-page {
    background: #fff;
  }

  #mm-app {
    width: 100%;
    max-width: 1280px;
    min-height: calc(100vh - 150px);
    margin: 0 auto;
    padding: 30px 40px 64px;
    box-shadow: none;
  }

  .mm-header {
    position: sticky;
    z-index: 12;
    top: 16px;
    display: grid;
    width: calc(100% + 80px);
    height: 80px;
    grid-template-columns: auto minmax(160px, 1fr) auto auto;
    align-items: center;
    gap: 24px;
    margin-left: -40px;
    border: 1px solid var(--mm-line);
    border-radius: 12px;
    padding: 0 40px;
    background: rgb(255 255 255 / 95%);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgb(29 25 21 / 8%);
  }

  .mm-topline {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }

  .mm-brand {
    padding: 0;
    white-space: nowrap;
  }

  .mm-brand img {
    width: 160px;
    height: 48px;
  }

  .mm-profile {
    display: none;
  }

  .mm-search-row {
    display: contents;
  }

  .mm-searchbox {
    width: min(100%, 560px);
    grid-column: 2;
    grid-row: 1;
    height: 50px;
    border-radius: 10px;
    background: #fff;
  }

  .mm-desktop-nav {
    display: flex;
    grid-column: 3;
    grid-row: 1;
    align-items: center;
    gap: 6px;
    margin-left: auto;
  }

  .mm-desktop-nav button {
    display: flex;
    height: 44px;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--mm-ink);
    font-size: .82rem;
  }

  .mm-desktop-nav button:hover {
    background: var(--mm-tile);
  }

  .mm-desktop-nav button.is-active {
    color: var(--mm-accent);
  }

  .mm-desktop-nav svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
  }

  .mm-cart-shortcut {
    grid-column: 4;
    grid-row: 1;
  }

  .mm-promo {
    margin-top: 56px;
    border-radius: 20px;
  }

  .mm-category-strip {
    gap: 32px;
    margin: 36px 0 0;
    padding: 4px 0;
  }

  .mm-category {
    font-size: .85rem !important;
  }

  .mm-category-image {
    width: 88px;
    height: 88px;
    margin-bottom: 10px;
  }

  .mm-section-title {
    margin: 44px 0 24px;
  }

  .mm-section-title h2 {
    font-size: 1.7rem;
  }

  .mm-section-title {
    display: flex;
    justify-content: space-between;
    gap: 20px;
  }

  .mm-product-tools {
    justify-content: flex-end;
  }

  .mm-section-title span {
    font-size: .8rem;
  }

  .mm-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px 28px;
  }

  .mm-product-image {
    border-radius: 14px;
  }

  .mm-product-card:hover .mm-product-image {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgb(0 0 0 / 10%);
  }

  .mm-product-image,
  .mm-product-card:hover .mm-product-image {
    transition: transform .25s, box-shadow .25s;
  }

  .mm-price {
    margin-top: 12px;
    font-size: 1rem;
  }

  .mm-product-name {
    font-size: .85rem;
  }

  .mm-add-button {
    display: none;
  }

  .mm-bottom-nav {
    display: none !important;
  }
}

@media (min-width: 801px) and (max-width: 1100px) {
  #mm-app {
    padding-right: 24px;
    padding-left: 24px;
  }

  .mm-header {
    width: calc(100% + 48px);
    grid-template-columns: auto minmax(140px, 1fr) auto auto;
    gap: 14px;
    margin-left: -24px;
    padding-right: 24px;
    padding-left: 24px;
  }

  .mm-desktop-nav button {
    padding-right: 10px;
    padding-left: 10px;
  }

  .mm-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}