/* Thanh điều hướng đáy — chỉ mobile. Ẩn hoàn toàn từ 769px trở lên. */
.bottomnav {
  display: none;
}

@media (max-width: 768px) {
  .bottomnav {
    /* sticky (không phải fixed) — .storefront tự cuộn trong shell riêng (html/body/#root
       bị khoá height:100%/overflow:hidden cho canvas editor), nên đây MỚI là khối cuộn
       thực sự của trang. fixed lồng trong 1 div đang cuộn là kiểu dễ vỡ nhất ở các
       WebView trong-app (Facebook/Instagram) — bám sai mốc, để lại khoảng trống dưới
       nội dung. .sf-header cũng dùng sticky vì cùng lý do này, không hề bị lỗi tương tự. */
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: stretch;
    background: var(--bg-header, #fff);
    border-top: 1px solid var(--border, rgba(0, 0, 0, 0.08));
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
  }

  .bottomnav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 9px 4px 8px;
    text-decoration: none;
    color: var(--text-tertiary, #8e8e93);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease;
  }

  .bottomnav__item svg {
    width: 22px;
    height: 22px;
  }

  /* Mục giỏ là <button> → reset để giống các <a> khác */
  .bottomnav__item--btn {
    border: none;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
  }
  .bottomnav__cart-wrap { position: relative; display: inline-flex; }
  .bottomnav__cart-badge {
    position: absolute;
    top: -6px;
    right: -9px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
  }

  .bottomnav__item.is-active {
    color: var(--sf-gold, #131316);
  }

  .bottomnav__item:active {
    background: var(--bg-input, #f5f5f7);
  }

  /* Mục "Thiết kế" nổi bật — vòng tròn gold, nhô nhẹ lên */
  .bottomnav__item--cta {
    color: var(--text-secondary, #636366);
  }

  .bottomnav__cta-ring {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: -18px;
    border-radius: 50%;
    background: #131316;
    color: #fff;
    box-shadow: 0 6px 16px rgba(15, 15, 20, 0.3);
    border: 3px solid var(--bg-header, #fff);
  }

  [data-theme='dark'] .bottomnav__cta-ring {
    background: #FFD100;
    color: #131313;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  }

  .bottomnav__cta-ring svg {
    width: 20px;
    height: 20px;
  }

  .bottomnav__item--cta.is-active {
    color: var(--sf-gold, #131316);
  }
}

