/* Illustrated taxonomy shares the product catalog's existing filters and cart. */
.has-catalog-groups {
  --group-ink: #302523;
  --group-muted: #685b55;
  --group-wine: #801b34;
  --group-line: #dfd5cc;
  --group-active: #f7e9e8;
  --group-paper: #fff;
}
html body.has-catalog-groups.sf-navigation.sf-enhanced .main-head > .sf-header-categories,
.has-catalog-groups :is(#category-menu-toggle, #category-menu-close, .sf-category-selection),
#catalog-groups [hidden], #group-sheet[hidden], #group-shade[hidden], #group-sheet [hidden] { display:none !important; }

#catalog-groups { display:grid; grid-template-columns:clamp(165px,17vw,222px) minmax(0,1fr); align-items:start; gap:clamp(16px,2.4vw,38px); color:var(--group-ink); }
.group-results { min-width:0; }
#catalog-groups .catalog.catalog-with-sidebar { display:block; width:100%; }
#catalog-groups .group-rail { padding:4px 0; }
#catalog-groups .group-rail h2 { font-family:inherit; font-weight:700; font-size:1.125rem; line-height:1.35; margin:0 0 12px; color:var(--group-ink); }
#category-sidebar[role=group] { display:grid; gap:3px; }
#catalog-groups button, #group-sheet button { touch-action:manipulation; }
.group-art { object-fit:contain; display:block; flex:none; mix-blend-mode:multiply; }
.group-icon { color:var(--group-wine); }
#catalog-groups .v15-cat-item {
  display:flex; align-items:center; width:100%; min-width:0; min-height:46px; gap:9px; padding:5px 9px;
  border:0; border-inline-start:3px solid transparent; border-radius:6px; margin:0; box-shadow:none;
  background:transparent; color:var(--group-ink); font:inherit; font-size:.94rem; font-weight:600; line-height:1.3; text-align:start;
}
#catalog-groups .v15-cat-item .group-art { order:-1; width:34px; height:34px; }
#catalog-groups .v15-cat-item .group-icon { width:25px; height:25px; margin-inline:4.5px; }
#catalog-groups .v15-cat-item b, #group-sheet .catalog-subgroup b { margin-inline-start:auto; flex:none; white-space:nowrap; padding:0; background:none; color:var(--group-muted); font-family:inherit; font-size:.8125rem; font-weight:500; font-variant-numeric:tabular-nums; }
#catalog-groups .v15-cat-item[aria-pressed=true] { background:var(--group-active); color:var(--group-wine); border-inline-start-color:var(--group-wine); font-weight:700; }

.group-banner { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:112px; padding:12px clamp(16px,2.4vw,32px); border:1px solid #e9dbcd; border-radius:13px; background:#f6ecdf; }
html body #catalog-groups #catalog-heading { margin:0; color:#521c26; font-family:inherit; font-weight:750; font-size:clamp(1.5rem,2.55vw,2.35rem); line-height:1.14; letter-spacing:-.035em; }
#group-count { margin:5px 0 0; font-size:.875rem; color:var(--group-muted); }
#group-banner-art { display:flex; align-items:center; justify-content:flex-end; min-width:0; }
#group-banner-art .group-art { width:clamp(65px,9vw,134px); height:90px; }
#group-banner-art .group-icon { width:68px; height:56px; }
#group-banner-art:has(>:nth-child(2)) .group-art { width:clamp(43px,6vw,88px); }

.group-choices { display:flex; align-items:stretch; gap:8px; min-width:0; }
.group-choices:has(.main-shortcuts) { display:none; }
.group-choices:has(#group-shortcuts:not([hidden])) { border-bottom:1px solid var(--group-line); margin-bottom:8px; }
#group-shortcuts { display:flex; align-items:stretch; flex:1; min-width:0; gap:4px; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; scrollbar-color:var(--group-line) transparent; }
#group-shortcuts button, #group-more, #group-switch {
  display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:44px;
  margin:0; padding:4px 10px; border:0; border-bottom:3px solid transparent; border-radius:0;
  background:transparent; color:var(--group-ink); font:inherit; font-size:.9rem; font-weight:600; line-height:1.25; cursor:pointer;
}
#group-shortcuts button { flex:0 0 auto; flex-direction:column; justify-content:flex-start; width:clamp(90px,9vw,128px); gap:3px; padding:6px 4px; }
#group-shortcuts .group-art { width:56px; height:40px; }
#group-shortcuts button span { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; max-width:100%; line-height:1.25; }
#group-shortcuts button[aria-pressed=true] { color:var(--group-wine); border-bottom-color:currentColor; background:var(--group-active); }
#group-more { flex:none; align-self:center; }
#group-more span { width:7px; height:7px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:translateY(-2px) rotate(45deg); }
#group-switch { display:none; }
.group-results > .catalog-filter-tools { margin-top:8px; }
html body.storefront-v9.catalog-toolbar-ready #catalog-groups #catalog-sortbar { background:transparent; padding:0; justify-content:flex-end; }
html body.storefront-v9.catalog-toolbar-ready #catalog-groups #catalog-sortbar :is(.catalog-sortbar-label,.catalog-sort-buttons,.catalog-price-sort) { display:none; }
html body.storefront-v9.catalog-toolbar-ready #catalog-groups #catalog-sortbar .catalog-sort { display:flex; flex:0 1 172px; min-width:0; }
html body.storefront-v9 #catalog-groups #catalog-sortbar select { width:100%; }
html body.storefront-v9 #catalog-groups #catalog-filter-toggle,
html body.storefront-v9 #catalog-groups #sort-products { border-radius:7px; }

#group-shade { position:fixed; inset:0; background:rgb(37 25 27 / .43); z-index:12000; }
#group-sheet {
  position:fixed; z-index:12001; inset:0; margin:auto; width:min(94vw,520px); height:fit-content;
  max-height:min(78dvh,730px); display:flex; flex-direction:column; min-height:0; box-sizing:border-box;
  background:var(--group-paper); color:var(--group-ink); border-radius:18px; box-shadow:0 20px 66px #21141630;
}
#group-sheet header { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:12px 16px 9px; }
#group-sheet-title { margin:0; font-family:inherit; font-size:1.22rem; line-height:1.25; }
#group-sheet-close { display:grid; place-items:center; width:44px; height:44px; flex:none; border:0; border-radius:50%; background:#f3efeb; color:var(--group-ink); font:inherit; font-size:1.6rem; }
.group-sheet-scroll { overflow:auto; overscroll-behavior:contain; min-height:0; padding:0 16px 12px; }
#group-sheet .catalog-subgroup { display:flex; align-items:center; gap:12px; width:100%; min-height:57px; padding:4px 8px; margin:0; border:0; border-bottom:1px solid var(--group-line); border-radius:0; box-shadow:none; text-align:start; font:inherit; line-height:1.35; font-size:.95rem; font-weight:600; background:var(--group-paper); color:var(--group-ink); }
#group-sheet .catalog-subgroup .group-art { width:52px; height:48px; }
#group-sheet .catalog-subgroup .group-icon { padding:7px; box-sizing:border-box; }
#group-sheet .catalog-subgroup > span { min-width:0; flex:1; }
#group-sheet .group-all { border-radius:9px; }
#group-sheet .catalog-subgroup[aria-pressed=true] { background:var(--group-active); color:var(--group-wine); box-shadow:inset 3px 0 currentColor; }
#group-sheet .catalog-subgroup[aria-pressed=true]::after { content:"✓"; font-weight:750; }
#group-sheet .catalog-subgroup:disabled { color:#6b6463; background:#f5f3f1; cursor:default; }
#catalog-groups button:focus-visible, #group-sheet button:focus-visible { outline:3px solid #245c87; outline-offset:-3px; }
@media(hover:hover) {
  #catalog-groups .v15-cat-item:hover, #group-shortcuts button:hover, #group-more:hover, #group-sheet .catalog-subgroup:not(:disabled):hover { background:#f5eeea; }
}
@media (min-width:701px) and (min-height:501px), (min-width:1001px) {
  #catalog-groups .group-rail {
    --group-rail-top:calc(var(--sf-header-height, 140px) + 12px);
    position:sticky;
    top:var(--group-rail-top);
    display:flex;
    flex-direction:column;
    max-height:calc(100dvh - var(--group-rail-top) - 12px);
  }
  #catalog-groups .group-rail h2 { flex:none; }
  #catalog-groups .group-rail #category-sidebar { min-height:0; overflow-y:auto; }
}
@media (min-width:1001px) {
  html body.storefront-v9.sf-enhanced #catalog-groups #cards { grid-template-columns:repeat(4,minmax(0,1fr)); }
  html body.storefront-v9.sf-enhanced #catalog-groups #cards .product-art { aspect-ratio:4/3; }
}
@media (min-width:701px) and (max-width:1000px) and (min-height:501px) {
  html body.storefront-v9.sf-enhanced #catalog-groups #cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:700px), (max-width:1000px) and (max-height:500px) {
  #catalog-groups { display:block; }
  #catalog-groups .group-rail { display:none; }
  .group-banner { min-height:84px; padding:8px 13px; gap:6px; }
  .group-banner > div:first-child { min-width:0; }
  #group-banner-art .group-art { height:68px; width:78px; }
  #group-banner-art:has(>:nth-child(2)) .group-art { width:42px; }
  #group-switch { display:inline-flex; gap:5px; border:1px solid var(--group-line); padding:3px 9px; border-radius:7px; background:var(--group-paper); color:var(--group-wine); }
  #group-switch .group-icon { width:18px; height:18px; }
  .group-meta { display:flex; flex-wrap:wrap; align-items:center; gap:2px 10px; margin-top:4px; }
  #group-count { margin:0; }
  .group-choices:has(.main-shortcuts) { display:flex; }
  #group-shortcuts button { width:auto; flex-basis:calc((100% - 8px)/3); font-size:.8125rem; }
  #group-shortcuts.main-shortcuts button { flex-basis:calc((100% - 12px)/4); }
  #group-shortcuts .group-art { width:48px; height:34px; }
  #group-more { flex-direction:column; width:54px; gap:5px; font-size:.8125rem; padding:4px 2px; border-inline-start:1px solid var(--group-line); text-align:center; }
  #group-shortcuts, .group-choices { gap:4px; }
  html body.storefront-v9.catalog-toolbar-ready #catalog-groups #catalog-sortbar .catalog-sort { flex:1; max-width:none; }
  #group-sheet { inset:auto 0 0; width:100%; max-height:88vh; max-height:88dvh; border-radius:20px 20px 0 0; padding-bottom:env(safe-area-inset-bottom,0px); }
  #group-sheet::before { content:""; width:36px; height:4px; flex:none; background:#c7b9b2; border-radius:2px; margin:8px auto 0; }
  #group-sheet header { padding:4px 16px; }
  .group-sheet-scroll { padding-bottom:8px; }
}
@media (max-width:350px) {
  #group-shortcuts:not(.main-shortcuts) button { flex-basis:calc((100% - 4px)/2); }
}
@media (min-width:501px) and (max-width:700px), (min-width:701px) and (max-width:1000px) and (max-height:500px) {
  #group-shortcuts button, #group-shortcuts.main-shortcuts button { flex-basis:calc((100% - 16px)/5); }
}
@media (max-height:360px) {
  #group-sheet { max-height:96dvh; }
}
