/* Mobile catalogue controls: keep the frosted search and swipe rail below the sticky site header. */
@media (max-width: 760px) {
  .home-product-catalogue {
    overflow: visible !important;
    scroll-margin-top: 66px;
  }

  .home-catalogue-sticky {
    position: sticky;
    top: 66px;
    z-index: 30;
    margin-inline: -5vw;
    padding: 8px 5vw;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .22s ease, box-shadow .22s ease;
    will-change: transform;
  }

  .home-search-status {
    min-height: 16px;
    margin: 4px 0 0 14px;
    color: #68594a;
  }

  .home-category-rail {
    gap: 8px;
    padding: 5px 5vw 7px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 5vw;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  }

  .home-category-link {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    flex-basis: 72px;
    min-height: 82px;
    padding: 5px 3px 7px;
    border: 1px solid transparent;
    border-radius: 22px;
    scroll-snap-align: center;
    -webkit-tap-highlight-color: transparent;
    transition: background .22s ease, border-color .22s ease, box-shadow .22s ease, transform .22s ease;
  }

  .home-category-link.is-active {
    border-color: #ffffffec;
    background: linear-gradient(145deg, #fffef2c9, #f0e3d09c 62%, #ffffff80);
    box-shadow: 0 8px 22px #49331b20, inset 0 1px 0 #fffffffa, inset 0 -1px 0 #ffffff80;
    backdrop-filter: blur(18px) saturate(205%);
    -webkit-backdrop-filter: blur(18px) saturate(205%);
    transform: translateY(-2px);
  }

  .home-category-link > * { position: relative; z-index: 1; }

  .home-category-link.is-active::after {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(118deg, transparent 18%, #ffffff91 43%, #ffffff24 54%, transparent 72%);
    transform: translateX(-125%);
    animation: catalogue-glass-sheen 7s ease-in-out infinite;
    pointer-events: none;
  }

  .home-category-image {
    box-shadow: 0 0 0 1px #d9ccb9, 0 3px 10px #39271a18;
  }

  .home-category-link.is-active .home-category-image {
    box-shadow: 0 0 0 2px #c59a5c, 0 5px 13px #39271a28;
  }

  .home-add-button {
    min-width: 68px;
    min-height: 38px;
    gap: 5px;
    padding: 0 11px;
    border-radius: 999px;
    background: linear-gradient(145deg, #fffefa, #f3e9db);
    box-shadow: inset 0 1px 0 #ffffffed, 0 3px 10px #39271a0e;
    font-size: 11px;
    white-space: nowrap;
  }

  .home-add-button > span { font-size: 15px; }

  .home-glass-nav {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 18px);
    transition: opacity .24s ease, transform .32s cubic-bezier(.2, .8, .2, 1), visibility .24s ease;
    overflow: hidden;
    border-color: #fffffff0;
    background: linear-gradient(135deg, #ffffffb8, #ffffff78 48%, #e6d6c09c);
    box-shadow: 0 16px 40px #24170e33, inset 0 1px 0 #fffffffa, inset 0 -1px 0 #ffffff8c;
    backdrop-filter: blur(30px) saturate(220%) brightness(1.06);
    -webkit-backdrop-filter: blur(30px) saturate(220%) brightness(1.06);
  }

  .home-glass-nav.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }

  .home-glass-nav::after {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    bottom: 0;
    left: -42%;
    width: 32%;
    background: linear-gradient(90deg, transparent, #ffffff75, #ffffff18, transparent);
    transform: skewX(-18deg);
    animation: catalogue-glass-sheen 8s ease-in-out infinite;
    pointer-events: none;
  }

  .home-glass-nav::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 8px;
    bottom: 8px;
    left: 8px;
    width: calc((100% - 26px) / 3);
    border: 1px solid transparent;
    border-radius: 18px;
    background: linear-gradient(145deg, #fffef4d9, #f0dfc9a6 62%, #ffffff82) padding-box, linear-gradient(145deg, #ffffff, #ffffff77 50%, #c59a5c92) border-box;
    box-shadow: 0 7px 20px #4a321722, inset 0 1px 0 #fffffffa, inset 0 -1px 0 #ffffff76;
    backdrop-filter: blur(22px) saturate(220%);
    -webkit-backdrop-filter: blur(22px) saturate(220%);
    transition: left .42s cubic-bezier(.2, .85, .25, 1), transform .42s cubic-bezier(.2, .85, .25, 1);
    pointer-events: none;
  }

  .home-glass-nav[data-glass-active="browse"]::before { left: calc(33.333% + 4px); }
  .home-glass-nav[data-glass-active="order"]::before { left: calc(66.667% + 1px); }

  .home-glass-nav-item {
    z-index: 2;
    min-height: 58px;
    color: #574638;
  }

  .home-glass-nav-item.is-active {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    transform: translateY(-1px);
  }
}

@keyframes catalogue-glass-sheen {
  0%, 70%, 100% { transform: translateX(-125%) skewX(-18deg); opacity: 0; }
  76% { opacity: .8; }
  93% { transform: translateX(390%) skewX(-18deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .home-catalogue-sticky,
  .home-category-link,
  .home-glass-nav,
  .home-glass-nav::before,
  .home-category-link.is-active::after,
  .home-glass-nav::after {
    transition: none !important;
    animation: none !important;
  }
}

.home-add-button.is-added {
  border-color: #cfb58d;
  background: linear-gradient(145deg, #fffefa, #f3e9db);
  color: var(--brown);
  box-shadow: inset 0 1px 0 #ffffffed, 0 3px 10px #39271a0e;
}

.home-add-button.is-added > span { color: #8b6b3e; }
.home-add-button.is-added:hover:not(:disabled) {
  background: linear-gradient(145deg, #fffefa, #f3e9db);
  color: var(--brown);
}

.home-add-button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), background .2s ease, box-shadow .2s ease, color .2s ease;
}

.home-add-button:active:not(:disabled) {
  transform: scale(.96);
  background: linear-gradient(145deg, #fff, #efdfc8);
  box-shadow: inset 0 1px 2px #ffffff, inset 0 -2px 4px #b7874226, 0 1px 4px #39271a12;
}

.home-add-button.is-added:active:not(:disabled) {
  background: linear-gradient(145deg, #fff, #efdfc8);
  color: var(--brown);
}

.home-ribbon-option i {
  background: linear-gradient(128deg, #ffffff40 0 14%, transparent 42%), var(--swatch);
  filter: saturate(1.38) brightness(1.035) contrast(1.035);
  box-shadow: inset 0 1px 2px #ffffff9c, inset 0 -2px 4px #0004, 0 2px 5px #39271a20;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), filter .2s ease, box-shadow .2s ease;
}

.home-ribbon-option:hover i,
.home-ribbon-option[aria-pressed="true"] i {
  filter: saturate(1.52) brightness(1.05) contrast(1.045);
  box-shadow: inset 0 1px 2px #ffffffb0, inset 0 -2px 4px #0004, 0 3px 8px #39271a2b;
  transform: scale(1.06);
}

.home-menu-item {
  padding-inline: 12px;
  border: 1px solid #e9dfd2;
  border-radius: 16px;
  background: linear-gradient(125deg, #fffdf9e6, #f7efe4ba);
  box-shadow: inset 0 1px 0 #ffffffd9, 0 4px 15px #39271a08;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.home-menu-open {
  z-index: 3;
  border-radius: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.home-add-button,
.home-ribbon-options {
  z-index: 4;
}

.home-menu-item:has(.home-menu-open:focus-visible) {
  border-color: #bd965c;
  box-shadow: 0 0 0 3px #bd965c2b, inset 0 1px 0 #fff;
}

.home-menu-item:has(.home-menu-open:active) {
  transform: scale(.992);
  background: linear-gradient(125deg, #fffefa, #f0e2ce);
  box-shadow: inset 0 1px 2px #ffffff, inset 0 -2px 5px #b787421c, 0 2px 8px #39271a12;
}

@media (hover: hover) {
  .home-menu-item:has(.home-menu-open:hover) {
    border-color: #d8c5a9;
    background: linear-gradient(125deg, #fffefa, #f5ead9);
    box-shadow: inset 0 1px 0 #fff, 0 9px 22px #39271a12;
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-ribbon-option i,
  .home-menu-item {
    transition: none !important;
  }
}
