/* Hidden by default; shown only inside the media queries below */
.nav-mobile-toggle,
.info-sidebar-toggle {
  display: none;
}

@media (max-width: 900px) {
  .nav-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    margin-left: auto;
    border: 1.5px solid var(--surface-3, #e8e4de);
    border-radius: 999px;
    background: var(--white, #fff);
    color: var(--ink, #0f0d0b);
    font-family: "DM Sans", sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
  }

  .nav-mobile-toggle:hover,
  .nav-mobile-toggle:focus-visible {
    background: var(--surface-2, #f2f0ec);
    border-color: var(--ink-3, #7a736c);
    outline: none;
  }

  .nav-mobile-toggle i {
    font-size: 16px;
    line-height: 1;
  }

  /* ── Original static nav (no template active) ── */
  .navbar .nav-actions {
    display: none;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-left: 0;
    padding-top: 10px;
    border-top: 1px solid var(--surface-3, #e8e4de);
  }

  .navbar.mobile-nav-open .nav-actions {
    display: grid;
  }

  /* ── sfm-navbar (storefront template active) ── */
  /* Hide the nav-actions and search in the sfm-navbar on mobile so the
     hamburger toggle controls their visibility. */
  html[data-storefront-template="modern"] .sfm-navbar-inner .sfm-nav-actions {
    display: none !important;
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    overflow-x: visible;
    padding-top: 10px;
    border-top: 1px solid var(--sfm-surface-3, #e8e4de);
  }

  html[data-storefront-template="modern"] .sfm-navbar-inner .sfm-search {
    display: none !important;
    order: 10;
    width: 100%;
    max-width: none;
  }

  html[data-storefront-template="modern"] .sfm-navbar-inner {
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  html[data-storefront-template="modern"] .sfm-navbar-inner .sfm-logo {
    flex: 1 1 auto;
    min-width: 0;
  }

  html[data-storefront-template="modern"] .sfm-navbar.mobile-nav-open .sfm-navbar-inner {
    flex-wrap: wrap;
  }

  html[data-storefront-template="modern"] .sfm-navbar.mobile-nav-open .sfm-navbar-inner .sfm-logo {
    flex-basis: 100%;
  }

  html[data-storefront-template="modern"] .sfm-navbar.mobile-nav-open .sfm-navbar-inner .sfm-nav-actions {
    display: flex !important;
  }

  html[data-storefront-template="modern"] .sfm-navbar.mobile-nav-open .sfm-navbar-inner .sfm-search {
    display: flex !important;
  }

  /* ── Sidebar ── */
  .sidebar {
    width: 100%;
  }

  .info-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 50px;
    margin-bottom: 12px;
    padding: 0 18px;
    border: 1px solid var(--surface-3, #e8e4de);
    border-radius: var(--radius-lg, 22px);
    background: var(--white, #fff);
    color: var(--ink, #0f0d0b);
    font-family: "Syne", sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 13, 11, 0.05);
  }

  .info-sidebar-toggle i {
    font-size: 15px;
    color: var(--ink-3, #7a736c);
    transition: transform 0.2s ease;
  }

  .sidebar .sidebar-nav {
    display: none;
  }

  .sidebar.sidebar-open .sidebar-nav {
    display: block;
  }

  .sidebar.sidebar-open .info-sidebar-toggle i {
    transform: rotate(180deg);
  }
}

@media (max-width: 600px) {
  .nav-mobile-toggle {
    min-height: 40px;
    padding: 0 12px;
  }

  .nav-mobile-toggle span {
    font-size: 12px;
  }

  html[data-storefront-template="modern"] .sfm-navbar-inner .sfm-site-name {
    display: none;
  }

  .navbar .nav-actions {
    grid-template-columns: 1fr;
  }

  .navbar .nav-actions .nav-btn.primary {
    grid-column: auto;
  }

  .info-sidebar-toggle {
    padding: 0 16px;
    border-radius: var(--radius-md, 14px);
  }
}