/* ─────────────────────────────────────────────────────────────
   Techwish — mobile bottom nav (FAB-style) + categories sheet.
   Only renders below 900px; on desktop everything is display: none.
   ───────────────────────────────────────────────────────────── */

/* ---- Bottom nav bar ---- */
.tw-bottom-nav {
  display: none;          /* shown only on mobile, override below */
}

@media (max-width: 900px) {
  /* Make space at the bottom so sticky content / pagination doesn't get
     covered by the fixed nav. 72px bar + safe-area on iPhone notch. */
  body.has-tw-bottom-nav {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .tw-bottom-nav {
    display: grid;
    grid-template-columns: 1fr 1fr 88px 1fr 1fr;
    align-items: end;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: #ffffff;
    border-top: 1px solid var(--tw-line-soft, #ECEFED);
    box-shadow: 0 -8px 28px rgba(11, 15, 13, 0.06);
    z-index: 9000;
    font-family: var(--tw-display, "Space Grotesk", system-ui, sans-serif);
  }
}

.tw-bottom-nav__item {
  appearance: none;
  background: none;
  border: 0;
  padding: 6px 4px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--tw-mute, #6B7470);
  font: inherit;
  cursor: pointer;
  transition: color .15s ease;
  min-width: 0;
}
.tw-bottom-nav__item:hover,
.tw-bottom-nav__item.is-active {
  color: var(--tw-ink, #0B0F0D);
}
.tw-bottom-nav__icon {
  position: relative;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tw-bottom-nav__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

/* ---- FAB (centre / Search) ---- */
.tw-bottom-nav__fab {
  position: relative;
}
.tw-bottom-nav__fab-circle {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--tw-mint, #2DCE92);
  color: #062319;
  display: grid;
  place-items: center;
  margin-top: -22px;        /* lifts the circle above the bar */
  box-shadow:
    0 8px 20px rgba(45, 206, 146, 0.35),
    0 2px 6px rgba(11, 15, 13, 0.08);
  transition: transform .18s ease, box-shadow .18s ease;
}
.tw-bottom-nav__fab:hover .tw-bottom-nav__fab-circle,
.tw-bottom-nav__fab:active .tw-bottom-nav__fab-circle {
  transform: translateY(-2px);
  box-shadow:
    0 12px 26px rgba(45, 206, 146, 0.42),
    0 2px 6px rgba(11, 15, 13, 0.1);
}
.tw-bottom-nav__fab .tw-bottom-nav__label {
  color: var(--tw-ink, #0B0F0D);
  font-weight: 600;
}

/* ---- Cart count badge ---- */
.tw-bottom-nav__cart-count {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--tw-mint, #2DCE92);
  color: #062319;
  font-family: var(--tw-mono, "IBM Plex Mono", monospace);
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: 0 2px 4px rgba(11, 15, 13, 0.18);
}
.tw-bottom-nav__cart-count.is-empty {
  display: none;
}

/* ─────────────────────────────────────────────────────────────
   Bottom sheet — categories
   ───────────────────────────────────────────────────────────── */
.tw-bottom-sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9500;
  font-family: var(--tw-display, "Space Grotesk", system-ui, sans-serif);
}
.tw-bottom-sheet.is-open {
  display: block;
}
.tw-bottom-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 13, 0.45);
  opacity: 0;
  transition: opacity .22s ease;
}
.tw-bottom-sheet.is-open .tw-bottom-sheet__backdrop {
  opacity: 1;
}
.tw-bottom-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  border-radius: 18px 18px 0 0;
  padding: 8px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  max-height: 86vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 -12px 36px rgba(11, 15, 13, 0.18);
}
.tw-bottom-sheet.is-open .tw-bottom-sheet__panel {
  transform: translateY(0);
}
.tw-bottom-sheet__handle {
  width: 38px;
  height: 4px;
  background: var(--tw-line, #DDE3E0);
  border-radius: 999px;
  margin: 6px auto 4px;
}
.tw-bottom-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 8px;
}
.tw-bottom-sheet__title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--tw-ink, #0B0F0D);
  letter-spacing: -0.01em;
}
.tw-bottom-sheet__close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 0;
  background: var(--tw-paper-2, #F4F7F5);
  color: var(--tw-ink, #0B0F0D);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s ease;
}
.tw-bottom-sheet__close:hover {
  background: var(--tw-mint-050, #F1FAF5);
  color: var(--tw-mint-600, #1FB37C);
}

/* List */
.tw-bottom-sheet__list {
  list-style: none;
  margin: 0;
  padding: 4px 8px 12px;
}
.tw-bottom-sheet__list-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--tw-ink, #0B0F0D);
  font-weight: 500;
  font-size: 15.5px;
  letter-spacing: -0.005em;
  transition: background .15s ease, color .15s ease;
}
.tw-bottom-sheet__list-item a:hover,
.tw-bottom-sheet__list-item a:active {
  background: var(--tw-mint-050, #F1FAF5);
  color: var(--tw-mint-600, #1FB37C);
}
.tw-bottom-sheet__list-arrow {
  color: var(--tw-mute-2, #98A09B);
  display: inline-flex;
}
.tw-bottom-sheet__list-item a:hover .tw-bottom-sheet__list-arrow {
  color: var(--tw-mint-600, #1FB37C);
}

.tw-bottom-sheet__foot {
  border-top: 1px solid var(--tw-line-soft, #ECEFED);
  margin-top: 8px;
  padding: 14px 20px 6px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.tw-bottom-sheet__foot-link {
  font-family: var(--tw-mono, "IBM Plex Mono", monospace);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tw-mint-600, #1FB37C);
  text-decoration: none;
  font-weight: 600;
}
.tw-bottom-sheet__foot-link:hover {
  color: var(--tw-mint, #2DCE92);
}

/* Prevent background scroll when sheet is open */
body.tw-sheet-open {
  overflow: hidden;
}
