/* ==========================================================================
   roots-categories — the only front-end stylesheet of the package.

   Figma: strip 20:479, first column = hover state.
   Column: icon box 104 tall, 32, title Prata 32/36 -0.02em, 32, 42px plus button.
   Dividers: #B39B75 at 40%. Rest icon #B39B75, hover icon #3B2A20.
   Every selector naming a package class is written twice in one list
   (`.roots-ct …` + `#top #wrap_all .roots-ct …`). No !important. Longhands only.
   ========================================================================== */

.roots-ct,
#top #wrap_all .roots-ct {
  --roots-ct-ink: #3b2a20;
  --roots-ct-accent: #b39b75;
  --roots-ct-cream: #f1ede1;
  --roots-ct-green: #838f74;
  --roots-ct-sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --roots-ct-serif: "Prata", Georgia, serif;
  --roots-ct-mt-now: var(--roots-ct-mt, 0px);
  --cap-b: 0.7275;
  --desc: 0.1362;
  --cap-b-t: var(--cap-b);
  --desc-t: var(--desc);
  --roots-ct-line: rgb(179 155 117 / 0.4);
  container-type: inline-size;
  box-sizing: border-box;
  width: 100%;
  margin-top: var(--roots-ct-mt-now);
  margin-right: 0;
  margin-bottom: var(--roots-ct-mb, 0px);
  margin-left: 0;
  padding-top: 0;
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 0;
}

@media (max-width: 1199px) {
.roots-ct.roots-ct--scale,
#top #wrap_all .roots-ct.roots-ct--scale {
  --roots-ct-mt-now: calc(var(--roots-ct-mt, 0px) * 0.75);
}
}

@media (max-width: 899px) {
.roots-ct.roots-ct--scale,
#top #wrap_all .roots-ct.roots-ct--scale {
  --roots-ct-mt-now: calc(var(--roots-ct-mt, 0px) * 0.6);
}
}

.roots-ct *,
#top #wrap_all .roots-ct *,
.roots-ct *::before,
#top #wrap_all .roots-ct *::before,
.roots-ct *::after,
#top #wrap_all .roots-ct *::after {
  box-sizing: border-box;
}

@property --roots-fb { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --roots-ct-tt { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --roots-ct-tb { syntax: "<length>"; inherits: false; initial-value: 0px; }

@supports not ((text-box: trim-both cap alphabetic) or (text-box-trim: trim-both)) {
  .roots-ct, #top #wrap_all .roots-ct { --roots-fb: 1; }
}

.roots-ct .roots-ct-t,
#top #wrap_all .roots-ct .roots-ct-t {
  display: block;
  --roots-ct-tt: calc(var(--roots-fb) * (var(--lh) - var(--fs) * var(--cap-b-t)) / 2);
  --roots-ct-tb: calc(var(--roots-fb) * ((var(--lh) - var(--fs)) / 2 + var(--fs) * var(--desc-t)));
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
  text-box: trim-both cap alphabetic;
  margin-top: calc(-1 * var(--roots-ct-tt));
  margin-right: 0;
  margin-bottom: calc(-1 * var(--roots-ct-tb));
  margin-left: 0;
  padding-top: 0;
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 0;
  border-top-width: 0;
  border-right-width: 0;
  border-bottom-width: 0;
  border-left-width: 0;
  background: none;
}

/* Prata v22: cap 800 / 1000, hhea 993 / 362 */
.roots-ct .roots-ct-t--prata,
#top #wrap_all .roots-ct .roots-ct-t--prata {
  --cap-b-t: 0.969;
  --desc-t: 0.1845;
}

.roots-ct .roots-ct__list,
#top #wrap_all .roots-ct .roots-ct__list {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
  padding-top: 0;
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 0;
}

.roots-ct .roots-ct__item,
#top #wrap_all .roots-ct .roots-ct__item {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  row-gap: 32px;
  min-width: 0;
  min-height: 250px;
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
  padding-top: 7px;
  padding-right: 16px;
  padding-bottom: 8px;
  padding-left: 16px;
  border-top-width: 0;
  border-right-width: 0;
  border-bottom-width: 0;
  border-left-width: 0;
  box-shadow: none;
  background: none;
  color: var(--roots-ct-ink);
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.roots-ct .roots-ct__item + .roots-ct__item,
#top #wrap_all .roots-ct .roots-ct__item + .roots-ct__item {
  box-shadow: inset 1px 0 0 0 var(--roots-ct-line);
}

.roots-ct .roots-ct__item--static,
#top #wrap_all .roots-ct .roots-ct__item--static {
  cursor: default;
}

/* ---- icon: a mask, so rest and hover are one drawing in two colours ---- */
.roots-ct .roots-ct__icon,
#top #wrap_all .roots-ct .roots-ct__icon {
  --roots-ct-icon-c: var(--roots-ct-accent);
  display: block;
  flex: 0 0 auto;
  width: 112px;
  height: 104px;
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
  padding-top: 0;
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 0;
  background-color: var(--roots-ct-icon-c);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transition: background-color 0.25s ease;
}

.roots-ct .roots-ct__icon--wine,
#top #wrap_all .roots-ct .roots-ct__icon--wine {
  width: 62px;
  -webkit-mask-image: url("../assets/icon-wine.svg");
  mask-image: url("../assets/icon-wine.svg");
  -webkit-mask-position: center 0px;
  mask-position: center 0px;
  -webkit-mask-size: 62px 104px;
  mask-size: 62px 104px;
}

.roots-ct .roots-ct__icon--cheese,
#top #wrap_all .roots-ct .roots-ct__icon--cheese {
  width: 102px;
  -webkit-mask-image: url("../assets/icon-cheese.svg");
  mask-image: url("../assets/icon-cheese.svg");
  -webkit-mask-position: center 24px;
  mask-position: center 24px;
  -webkit-mask-size: 102px 64px;
  mask-size: 102px 64px;
}

.roots-ct .roots-ct__icon--fine-foods,
#top #wrap_all .roots-ct .roots-ct__icon--fine-foods {
  width: 112px;
  -webkit-mask-image: url("../assets/icon-fine-foods.svg");
  mask-image: url("../assets/icon-fine-foods.svg");
  -webkit-mask-position: center 24px;
  mask-position: center 24px;
  -webkit-mask-size: 112px 64px;
  mask-size: 112px 64px;
}

.roots-ct .roots-ct__icon--custom,
#top #wrap_all .roots-ct .roots-ct__icon--custom {
  -webkit-mask-image: var(--roots-ct-icon);
  mask-image: var(--roots-ct-icon);
  -webkit-mask-position: center center;
  mask-position: center center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* ---- title ---- */
.roots-ct .roots-ct__title,
#top #wrap_all .roots-ct .roots-ct__title {
  --fs: 32px;
  --lh: 36px;
  width: 100%;
  color: var(--roots-ct-ink);
  font-family: var(--roots-ct-serif);
  font-size: var(--fs);
  font-weight: 400;
  font-style: normal;
  line-height: var(--lh);
  letter-spacing: -0.02em;
  text-align: center;
  text-decoration: none;
  word-break: break-word;
}

/* ---- plus: 42px square, 18px glyph ---- */
.roots-ct .roots-ct__plus,
#top #wrap_all .roots-ct .roots-ct__plus {
  display: block;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
  padding-top: 0;
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 0;
  background-color: var(--roots-ct-cream);
  background-image: url("../assets/icon-plus-dark.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  transition: background-color 0.25s ease;
}

/* ---- hover / keyboard focus (Figma: first column) ---- */
@media (hover: hover) {
.roots-ct a.roots-ct__item:hover .roots-ct__icon,
#top #wrap_all .roots-ct a.roots-ct__item:hover .roots-ct__icon {
  --roots-ct-icon-c: var(--roots-ct-ink);
}

.roots-ct a.roots-ct__item:hover .roots-ct__plus,
#top #wrap_all .roots-ct a.roots-ct__item:hover .roots-ct__plus {
  background-color: var(--roots-ct-ink);
  background-image: url("../assets/icon-plus-light.svg");
}
}

.roots-ct a.roots-ct__item:focus-visible .roots-ct__icon,
#top #wrap_all .roots-ct a.roots-ct__item:focus-visible .roots-ct__icon {
  --roots-ct-icon-c: var(--roots-ct-ink);
}

.roots-ct a.roots-ct__item:focus-visible .roots-ct__plus,
#top #wrap_all .roots-ct a.roots-ct__item:focus-visible .roots-ct__plus {
  background-color: var(--roots-ct-ink);
  background-image: url("../assets/icon-plus-light.svg");
}

.roots-ct a.roots-ct__item:focus-visible,
#top #wrap_all .roots-ct a.roots-ct__item:focus-visible {
  outline: 2px solid var(--roots-ct-accent);
  outline-offset: -2px;
}

/* ---- narrow containers: one column, rows divided by a top line ---- */

@container (max-width: 639px) {
.roots-ct .roots-ct__list,
#top #wrap_all .roots-ct .roots-ct__list {
  flex-direction: column;
}

.roots-ct .roots-ct__item,
#top #wrap_all .roots-ct .roots-ct__item {
  flex: 0 0 auto;
  min-height: 0;
  padding-top: 32px;
  padding-right: 16px;
  padding-bottom: 32px;
  padding-left: 16px;
}

.roots-ct .roots-ct__item + .roots-ct__item,
#top #wrap_all .roots-ct .roots-ct__item + .roots-ct__item {
  box-shadow: inset 0 1px 0 0 var(--roots-ct-line);
}
}
