/* ===== MOBILE TAB BAR ===== */

.tm-tab-bar {
  display: none;
}

@media (max-width: 768px) {
  .tm-tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: var(--wp--preset--color--bg);
    border-top: 1px solid var(--wp--preset--color--border);
    padding-top: 14px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  .tm-tab-bar a,
  .tm-tab-bar-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 3px;
    text-decoration: none;
    color: var(--wp--preset--color--text-muted);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.04em;
    font-family: var(--wp--preset--font-family--inter);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    transition: color 0.2s ease;
  }

  .tm-tab-bar a.active,
  .tm-tab-bar-btn.active {
    color: var(--wp--preset--color--accent);
  }

  .tm-tab-bar a:hover,
  .tm-tab-bar-btn:hover {
    color: var(--wp--preset--color--accent);
  }

  .tm-tab-bar svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
  }

  .tm-tab-bar-counter {
    position: absolute;
    top: 8px;
    right: calc(50% - 20px);
    min-width: 16px;
    height: 16px;
    background: var(--wp--preset--color--accent);
    color: #fff;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
  }

  .tm-tab-bar-counter[hidden] {
    display: none;
  }

  /* push page content above tab bar */
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  body.tm-is-product-page .tm-tab-bar {
    display: none;
  }

  body.tm-is-product-page {
    padding-bottom: 0;
  }
}
